Files
nodejs13/node-gyp-addon-gypi.patch
Adam Majer 5a3b5a7abb - Update to upstream 13.0.1:
* deps: Fixed a bug in npm 6.12.0 where warnings are emitted on
    Node.js 13.x
  * esm: Changed file extension resolution order of
    --es-module-specifier-resolution=node to match that
    of the CommonJS loader
- Changes in version 13.0.0:
  * assert:
    + If the validation function passed to assert.throws() or
      assert.rejects() returns a value other than true,
      an assertion error will be thrown instead of the original
      error to highlight the programming mistake
    + If a constructor function is passed to validate the instance
      of errors thrown in assert.throws() or assert.reject(),
      an assertion error will be thrown instead of the original error
  * child_process: ChildProcess._channel (DEP0129) is now
    a Runtime deprecation
  * console: The output console.timeEnd() and console.timeLog()
    will now automatically select a suitable time unit instead
    of always using milliseconds
  * deps: The V8 engine was updated to version 7.8.
  * domain: The domain's error handler is now executed with
    the active domain set to the domain's parent to prevent
    inner recursion
  * fs:
    + The undocumented method FSWatcher.prototype.start() was removed
    + Calling the open() method on a ReadStream or WriteStream
      now emits a runtime deprecation warning. This is an internal
      method that should not be used by user code.
    + fs.read/write, fs.readSync/writeSync and fd.read/write now

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs13?expand=0&rev=1
2019-10-23 15:00:12 +00:00

80 lines
3.1 KiB
Diff

Index: node-git.b4f0a18b5a/addon-rpm.gypi
===================================================================
--- /dev/null
+++ node-git.b4f0a18b5a/addon-rpm.gypi
@@ -0,0 +1,35 @@
+{
+ 'target_defaults': {
+ 'type': 'loadable_module',
+ 'product_prefix': '',
+ 'include_dirs': [
+ '/usr/include/node13/',
+ '/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-git.b4f0a18b5a/deps/npm/node_modules/node-gyp/lib/configure.js
===================================================================
--- node-git.b4f0a18b5a.orig/deps/npm/node_modules/node-gyp/lib/configure.js
+++ node-git.b4f0a18b5a/deps/npm/node_modules/node-gyp/lib/configure.js
@@ -46,10 +46,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
@@ -68,6 +64,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/node13'
+ createBuildDir()
+ }
}
}
@@ -282,7 +284,9 @@ function configure (gyp, argv, callback)
// this logic ported from the old `gyp_addon` python file
var gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
- var addonGypi = path.resolve(__dirname, '..', 'addon.gypi')
+ var addon_gypi_file = gyp.opts.target || gyp.opts.nodedir ? 'addon.gypi' : 'addon-rpm.gypi'
+
+ var addonGypi = path.resolve(__dirname, '..', addon_gypi_file)
var commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
fs.stat(commonGypi, function (err) {
if (err) {