- node-gyp-addon-gypi.patch: adapted for new unit test layouts
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs20?expand=0&rev=74
This commit is contained in:
parent
61451c21f5
commit
5191972b49
@ -1,7 +1,7 @@
|
|||||||
Index: node-v20.10.0/addon-rpm.gypi
|
Index: node-v21.7.1/addon-rpm.gypi
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ node-v20.10.0/addon-rpm.gypi
|
+++ node-v21.7.1/addon-rpm.gypi
|
||||||
@@ -0,0 +1,35 @@
|
@@ -0,0 +1,35 @@
|
||||||
+{
|
+{
|
||||||
+ 'target_defaults': {
|
+ 'target_defaults': {
|
||||||
@ -38,10 +38,10 @@ Index: node-v20.10.0/addon-rpm.gypi
|
|||||||
+ ]
|
+ ]
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
Index: node-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js
|
Index: node-v21.7.1/deps/npm/node_modules/node-gyp/lib/configure.js
|
||||||
===================================================================
|
===================================================================
|
||||||
--- node-v20.10.0.orig/deps/npm/node_modules/node-gyp/lib/configure.js
|
--- node-v21.7.1.orig/deps/npm/node_modules/node-gyp/lib/configure.js
|
||||||
+++ node-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js
|
+++ node-v21.7.1/deps/npm/node_modules/node-gyp/lib/configure.js
|
||||||
@@ -36,10 +36,6 @@ async function configure (gyp, argv) {
|
@@ -36,10 +36,6 @@ async function configure (gyp, argv) {
|
||||||
if ('v' + release.version !== process.version) {
|
if ('v' + release.version !== process.version) {
|
||||||
// if --target was given, then determine a target version to compile for
|
// if --target was given, then determine a target version to compile for
|
||||||
@ -66,13 +66,47 @@ Index: node-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js
|
|||||||
}
|
}
|
||||||
|
|
||||||
return createBuildDir()
|
return createBuildDir()
|
||||||
@@ -201,7 +203,8 @@ async function configure (gyp, argv) {
|
@@ -201,8 +203,16 @@ async function configure (gyp, argv) {
|
||||||
|
|
||||||
// this logic ported from the old `gyp_addon` python file
|
// this logic ported from the old `gyp_addon` python file
|
||||||
const gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
|
const gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
|
||||||
- const addonGypi = path.resolve(__dirname, '..', 'addon.gypi')
|
- const addonGypi = path.resolve(__dirname, '..', 'addon.gypi')
|
||||||
|
- let commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
|
||||||
+ let addon_gypi_file = gyp.opts.target || gyp.opts.nodedir ? 'addon.gypi' : 'addon-rpm.gypi'
|
+ let addon_gypi_file = gyp.opts.target || gyp.opts.nodedir ? 'addon.gypi' : 'addon-rpm.gypi'
|
||||||
+ var addonGypi = path.resolve(__dirname, '..', addon_gypi_file)
|
+ let addonGypi = path.resolve(__dirname, '..', addon_gypi_file)
|
||||||
let commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
|
+ let commonGypi = path.resolve(nodeDir, 'include/node20/common.gypi')
|
||||||
|
+
|
||||||
|
+ try {
|
||||||
|
+ await fs.stat(commonGypi)
|
||||||
|
+ } catch (err) {
|
||||||
|
+ commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
|
||||||
|
+ }
|
||||||
|
+
|
||||||
try {
|
try {
|
||||||
await fs.stat(commonGypi)
|
await fs.stat(commonGypi)
|
||||||
|
} catch (err) {
|
||||||
|
Index: node-v21.7.1/deps/npm/node_modules/node-gyp/addon.gypi
|
||||||
|
===================================================================
|
||||||
|
--- node-v21.7.1.orig/deps/npm/node_modules/node-gyp/addon.gypi
|
||||||
|
+++ node-v21.7.1/deps/npm/node_modules/node-gyp/addon.gypi
|
||||||
|
@@ -18,6 +18,7 @@
|
||||||
|
],
|
||||||
|
|
||||||
|
'include_dirs': [
|
||||||
|
+ '<(node_root_dir)/include/node20',
|
||||||
|
'<(node_root_dir)/include/node',
|
||||||
|
'<(node_root_dir)/src',
|
||||||
|
'<(node_root_dir)/deps/openssl/config',
|
||||||
|
Index: node-v21.7.1/tools/build_addons.py
|
||||||
|
===================================================================
|
||||||
|
--- node-v21.7.1.orig/tools/build_addons.py
|
||||||
|
+++ node-v21.7.1/tools/build_addons.py
|
||||||
|
@@ -27,7 +27,7 @@ def generate_headers(headers_dir, instal
|
||||||
|
def rebuild_addons(args):
|
||||||
|
headers_dir = os.path.abspath(args.headers_dir)
|
||||||
|
out_dir = os.path.abspath(args.out_dir)
|
||||||
|
- node_bin = os.path.join(out_dir, 'node')
|
||||||
|
+ node_bin = os.path.join(out_dir, 'node20')
|
||||||
|
if args.is_win:
|
||||||
|
node_bin += '.exe'
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 9 12:30:22 UTC 2024 - Adam Majer <adam.majer@suse.de>
|
||||||
|
|
||||||
|
- node-gyp-addon-gypi.patch: adapted for new unit test layouts
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 2 14:39:07 UTC 2024 - Adam Majer <adam.majer@suse.de>
|
Tue Apr 2 14:39:07 UTC 2024 - Adam Majer <adam.majer@suse.de>
|
||||||
|
|
||||||
|
@ -393,6 +393,7 @@ Provides: bundled(node-acorn-walk) = 8.3.2
|
|||||||
Provides: bundled(node-busboy) = 1.6.0
|
Provides: bundled(node-busboy) = 1.6.0
|
||||||
Provides: bundled(node-cjs-module-lexer) = 1.2.2
|
Provides: bundled(node-cjs-module-lexer) = 1.2.2
|
||||||
Provides: bundled(node-corepack) = 0.25.2
|
Provides: bundled(node-corepack) = 0.25.2
|
||||||
|
Provides: bundled(node-minimatch) = 9.0.3
|
||||||
Provides: bundled(node-streamsearch) = 1.1.0
|
Provides: bundled(node-streamsearch) = 1.1.0
|
||||||
Provides: bundled(node-undici) = 5.28.3
|
Provides: bundled(node-undici) = 5.28.3
|
||||||
Provides: bundled(node-undici-types) = 5.25.1
|
Provides: bundled(node-undici-types) = 5.25.1
|
||||||
@ -1066,7 +1067,7 @@ make test-ci
|
|||||||
%{_bindir}/corepack%{node_version_number}
|
%{_bindir}/corepack%{node_version_number}
|
||||||
%{_libdir}/node_modules/corepack%{node_version_number}
|
%{_libdir}/node_modules/corepack%{node_version_number}
|
||||||
%dir %{_datadir}/libalternatives/corepack
|
%dir %{_datadir}/libalternatives/corepack
|
||||||
%{_datadir}/libalternatives/corepack/18.conf
|
%{_datadir}/libalternatives/corepack/%{node_version_number}.conf
|
||||||
%if ! %{with libalternatives}
|
%if ! %{with libalternatives}
|
||||||
%ghost %{_bindir}/corepack-default
|
%ghost %{_bindir}/corepack-default
|
||||||
%ghost %{_mandir}/man1/corepack.1%{ext_man}
|
%ghost %{_mandir}/man1/corepack.1%{ext_man}
|
||||||
|
Loading…
Reference in New Issue
Block a user