diff --git a/node-gyp-addon-gypi.patch b/node-gyp-addon-gypi.patch index f37e108..1a4e7fa 100644 --- a/node-gyp-addon-gypi.patch +++ b/node-gyp-addon-gypi.patch @@ -1,7 +1,7 @@ -Index: node-v20.10.0/addon-rpm.gypi +Index: node-v21.7.1/addon-rpm.gypi =================================================================== --- /dev/null -+++ node-v20.10.0/addon-rpm.gypi ++++ node-v21.7.1/addon-rpm.gypi @@ -0,0 +1,35 @@ +{ + '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-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js +--- node-v21.7.1.orig/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) { if ('v' + release.version !== process.version) { // 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() -@@ -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 const gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') - 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' -+ var addonGypi = path.resolve(__dirname, '..', addon_gypi_file) - let commonGypi = path.resolve(nodeDir, 'include/node/common.gypi') ++ let addonGypi = path.resolve(__dirname, '..', addon_gypi_file) ++ 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 { 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' + diff --git a/nodejs20.changes b/nodejs20.changes index 87937d3..a990e2c 100644 --- a/nodejs20.changes +++ b/nodejs20.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 9 12:30:22 UTC 2024 - Adam Majer + +- node-gyp-addon-gypi.patch: adapted for new unit test layouts + ------------------------------------------------------------------- Tue Apr 2 14:39:07 UTC 2024 - Adam Majer diff --git a/nodejs20.spec b/nodejs20.spec index eadc57c..dc89dba 100644 --- a/nodejs20.spec +++ b/nodejs20.spec @@ -393,6 +393,7 @@ Provides: bundled(node-acorn-walk) = 8.3.2 Provides: bundled(node-busboy) = 1.6.0 Provides: bundled(node-cjs-module-lexer) = 1.2.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-undici) = 5.28.3 Provides: bundled(node-undici-types) = 5.25.1 @@ -1066,7 +1067,7 @@ make test-ci %{_bindir}/corepack%{node_version_number} %{_libdir}/node_modules/corepack%{node_version_number} %dir %{_datadir}/libalternatives/corepack -%{_datadir}/libalternatives/corepack/18.conf +%{_datadir}/libalternatives/corepack/%{node_version_number}.conf %if ! %{with libalternatives} %ghost %{_bindir}/corepack-default %ghost %{_mandir}/man1/corepack.1%{ext_man}