代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/node-gyp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
commit 4daac6e35e1ea8e886a823785e7b06e80c933ac2
Author: Tom Hughes <tom@compton.nu>
Date: Mon Jan 18 17:06:18 2016 +0000
Use custom addon.gypi by default instead of downloading node source
diff --git a/lib/configure.js b/lib/configure.js
index 4e06529..046c12f 100644
--- a/lib/configure.js
+++ b/lib/configure.js
@@ -59,24 +59,26 @@ function configure (gyp, argv, callback) {
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 = '/usr/share/node'
createBuildDir()
- })
+ }
}
}
@@ -248,7 +250,8 @@ function configure (gyp, argv, callback) {
// 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 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, 'include/node/common.gypi')
fs.stat(common_gypi, function (err, stat) {
if (err)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。