Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:Update
nodejs8.7772
node-gyp-addon-gypi.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File node-gyp-addon-gypi.patch of Package nodejs8.7772
Index: node-v8.1.3/addon-rpm.gypi =================================================================== --- /dev/null +++ node-v8.1.3/addon-rpm.gypi @@ -0,0 +1,35 @@ +{ + 'target_defaults': { + 'type': 'loadable_module', + 'product_prefix': '', + 'include_dirs': [ + '/usr/include/node8/', + '/usr/include/' + ], + + 'target_conditions': [ + ['_type=="loadable_module"', { + 'product_extension': 'node', + 'defines': [ 'BUILDING_NODE_EXTENSION' ], + }] + ], + + 'conditions': [ + [ 'OS=="mac"', { + 'libraries': [ '-undefined dynamic_lookup' ], + 'xcode_settings': { + 'DYLIB_INSTALL_NAME_BASE': '@rpath' + }, + }], + [ 'OS=="win"', { + 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ], + # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>' + # needs to have dll-interface to be used by clients of class 'node::ObjectWrap' + 'msvs_disabled_warnings': [ 4251 ], + }], + [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', { + 'cflags': [ '-fPIC' ], + }] + ] + } +} Index: node-v8.1.3/deps/npm/node_modules/node-gyp/lib/configure.js =================================================================== --- node-v8.1.3.orig/deps/npm/node_modules/node-gyp/lib/configure.js +++ node-v8.1.3/deps/npm/node_modules/node-gyp/lib/configure.js @@ -62,10 +62,6 @@ 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 @@ -80,6 +76,12 @@ function configure (gyp, argv, callback) 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/include/node8' + createBuildDir() + } } } @@ -271,7 +273,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)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor