--- /opt/rh/rh-nodejs4/root/usr/lib/node_modules/node-gyp/lib/configure.js 2015-11-24 09:06:13.000000000 -0500
+++ ./lib/configure.js 2016-06-08 11:35:25.821562943 -0400
@@ -59,24 +59,26 @@
if ('v' + release.version !== process.version) {
// if --target was given, then determine a target version to compile for
log.verbose('get node dir', 'compiling against --target node version: %s', release.version)
- } else {
- // if no --target was specified then use the current host node version
- log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', release.version)
- }
- if (!release.semver) {
- // could not parse the version string with semver
- return callback(new Error('Invalid version number: ' + release.version))
- }
+ if (!release.semver) {
+ // could not parse the version string with semver
+ return callback(new Error('Invalid version number: ' + release.version))
+ }
- // ensure that the target node version's dev files are installed
- gyp.opts.ensure = true
- gyp.commands.install([ release.version ], function (err, version) {
- if (err) return callback(err)
- log.verbose('get node dir', 'target node version installed:', release.versionDir)
- nodeDir = path.resolve(gyp.devDir, release.versionDir)
+ // ensure that the target node version's dev files are installed
+ gyp.opts.ensure = true
+ gyp.commands.install([ release.version ], function (err, version) {
+ if (err) return callback(err)
+ log.verbose('get node dir', 'target node version installed:', release.versionDir)
+ nodeDir = path.resolve(gyp.devDir, release.versionDir)
+ createBuildDir()
+ })
+ } else {
+ // if no --target was specified then use RPM installed headers
+ log.verbose('get node dir', 'no --target version specified, falling back to RPM installed headers')
+ nodeDir = '/opt/rh/nodejs010/root/usr/share/node'
createBuildDir()
- })
+ }
}
}
@@ -247,9 +249,10 @@
}
// this logic ported from the old `gyp_addon` python file
- var gyp_script = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
- var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi')
- var common_gypi = path.resolve(nodeDir, 'include/node/common.gypi')
+ var gyp_script = '/opt/rh/v8314/root/usr/bin/gyp'
+ var addon_gypi_file = gyp.opts.target || gyp.opts.nodeDir ? 'addon.gypi' : 'addon-rpm.gypi'
+ var addon_gypi = path.resolve(__dirname, '..', addon_gypi_file)
+ var common_gypi = path.resolve(nodeDir, '/opt/rh/nodejs010/root/usr/include/node/common.gypi')
fs.stat(common_gypi, function (err, stat) {
if (err)
common_gypi = path.resolve(nodeDir, 'common.gypi')
@@ -273,7 +276,7 @@
argv.push('-Dnode_lib_file=' + release.name + '.lib')
argv.push('-Dmodule_root_dir=' + process.cwd())
argv.push('--depth=.')
- argv.push('--no-parallel')
+ //argv.push('--no-parallel')
// tell gyp to write the Makefile/Solution files into output_dir
argv.push('--generator-output', output_dir)