Files
termux-packages/packages/nodejs/node.gyp.patch
termux-pacman-bot cdca6bab76 bump(main/nodejs): v25.2.1
Major changes that might affect end users:

- Notable changes section of releases v25.0.0-v25.2.1
  - https://github.com/nodejs/node/releases/tag/v25.0.0
  - https://github.com/nodejs/node/releases/tag/v25.1.0
  - https://github.com/nodejs/node/releases/tag/v25.2.0
  - https://github.com/nodejs/node/releases/tag/v25.2.1
- V8 has been updated to 14.1
- Your dependencies might not support Node v25 yet, so you might have to
  switch to older v24 release by installing nodejs-lts package.

node_mksnapshot now needs to be built when cross-compiling, so do built
it (removed patch to prevent it from building in node.gyp)

Pass --debug flag to configure.py during debug builds. Else it fails to
generate files which are necessary for compilation of certain symbols
during debug builds. More explanation for this can be found in build.sh
file

Closes #26784
2025-12-10 10:42:58 +00:00

337 lines
8.9 KiB
Diff

--- ./node.gyp.orig 2025-11-26 23:46:03.696854242 +0530
+++ ./node.gyp 2025-12-03 21:00:02.566150699 +0530
@@ -527,7 +527,7 @@
'-Wl,-bnoerrmsg',
],
}],
- ['OS=="linux" and clang==1', {
+ ['(OS=="linux" or OS=="android") and clang==1', {
'libraries': ['-latomic'],
}],
],
@@ -568,7 +568,8 @@
],
'sources': [
- 'src/node_main.cc'
+ 'src/node_main.cc',
+ 'src/getaddrinfo.c'
],
'dependencies': [
@@ -1063,314 +1064,6 @@
},
],
}, # node_lib_target_name
- { # fuzz_env
- 'target_name': 'fuzz_env',
- 'type': 'executable',
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- ],
-
- 'includes': [
- 'node.gypi'
- ],
- 'include_dirs': [
- 'src',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'test/cctest',
- ],
-
- 'defines': [
- 'NODE_ARCH="<(target_arch)"',
- 'NODE_PLATFORM="<(OS)"',
- 'NODE_WANT_INTERNALS=1',
- ],
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'test/fuzzers/fuzz_env.cc',
- ],
- 'conditions': [
- ['OS=="linux" or OS=="openharmony"', {
- 'ldflags': [ '-fsanitize=fuzzer' ]
- }],
- # Ensure that ossfuzz flag has been set and that we are on Linux
- [ 'OS not in "linux openharmony" or ossfuzz!="true"', {
- 'type': 'none',
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # fuzz_env
- { # fuzz_ClientHelloParser.cc
- 'target_name': 'fuzz_ClientHelloParser',
- 'type': 'executable',
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- ],
- 'includes': [
- 'node.gypi'
- ],
- 'include_dirs': [
- 'src',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'test/cctest',
- ],
- 'defines': [
- 'NODE_ARCH="<(target_arch)"',
- 'NODE_PLATFORM="<(OS)"',
- 'NODE_WANT_INTERNALS=1',
- ],
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'test/fuzzers/fuzz_ClientHelloParser.cc',
- ],
- 'conditions': [
- [ 'node_shared_uvwasi=="false"', {
- 'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
- 'include_dirs': [ 'deps/uvwasi/include' ],
- }],
- ['OS=="linux" or OS=="openharmony"', {
- 'ldflags': [ '-fsanitize=fuzzer' ]
- }],
- # Ensure that ossfuzz flag has been set and that we are on Linux
- [ 'OS not in "linux openharmony" or ossfuzz!="true"', {
- 'type': 'none',
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # fuzz_ClientHelloParser.cc
- { # fuzz_strings
- 'target_name': 'fuzz_strings',
- 'type': 'executable',
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/googletest/googletest.gyp:gtest_prod',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/nbytes/nbytes.gyp:nbytes',
- ],
- 'includes': [
- 'node.gypi'
- ],
- 'include_dirs': [
- 'src',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'test/cctest',
- ],
- 'defines': [
- 'NODE_ARCH="<(target_arch)"',
- 'NODE_PLATFORM="<(OS)"',
- 'NODE_WANT_INTERNALS=1',
- ],
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'test/fuzzers/fuzz_strings.cc',
- ],
- 'conditions': [
- [ 'node_shared_uvwasi=="false"', {
- 'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
- 'include_dirs': [ 'deps/uvwasi/include' ],
- }],
- ['OS=="linux" or OS=="openharmony"', {
- 'ldflags': [ '-fsanitize=fuzzer' ]
- }],
- # Ensure that ossfuzz flag has been set and that we are on Linux
- [ 'OS not in "linux openharmony" or ossfuzz!="true"', {
- 'type': 'none',
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # fuzz_strings
- {
- 'target_name': 'cctest',
- 'type': 'executable',
-
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/googletest/googletest.gyp:gtest',
- 'deps/googletest/googletest.gyp:gtest_main',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/nbytes/nbytes.gyp:nbytes',
- 'tools/v8_gypfiles/abseil.gyp:abseil',
- ],
-
- 'includes': [
- 'node.gypi'
- ],
-
- 'include_dirs': [
- 'src',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'test/cctest',
- ],
-
- 'defines': [
- 'NODE_ARCH="<(target_arch)"',
- 'NODE_PLATFORM="<(OS)"',
- 'NODE_WANT_INTERNALS=1',
- ],
-
- 'sources': [ '<@(node_cctest_sources)' ],
-
- 'conditions': [
- [ 'node_use_openssl=="true"', {
- 'defines': [
- 'HAVE_OPENSSL=1',
- ],
- 'dependencies': [
- 'deps/ncrypto/ncrypto.gyp:ncrypto',
- ],
- }, {
- 'sources!': [ '<@(node_cctest_openssl_sources)' ],
- }],
- ['v8_enable_inspector==1', {
- 'defines': [
- 'HAVE_INSPECTOR=1',
- ],
- 'include_dirs': [
- # TODO(legendecas): make node_inspector.gypi a dependable target.
- '<(SHARED_INTERMEDIATE_DIR)', # for inspector
- '<(SHARED_INTERMEDIATE_DIR)/src', # for inspector
- ],
- 'dependencies': [
- 'deps/inspector_protocol/inspector_protocol.gyp:crdtp',
- ],
- }, {
- 'defines': [
- 'HAVE_INSPECTOR=0',
- ],
- 'sources!': [ '<@(node_cctest_inspector_sources)' ],
- }],
- ['OS=="solaris"', {
- 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
- }],
- # Skip cctest while building shared lib node for Windows
- [ 'OS=="win" and node_shared=="true"', {
- 'type': 'none',
- }],
- [ 'node_shared=="true"', {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
- },
- }],
- ['OS=="win"', {
- 'libraries': [
- 'Dbghelp.lib',
- 'winmm.lib',
- 'Ws2_32.lib',
- ],
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # cctest
-
- {
- 'target_name': 'embedtest',
- 'type': 'executable',
-
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/nbytes/nbytes.gyp:nbytes',
- ],
-
- 'includes': [
- 'node.gypi'
- ],
-
- 'include_dirs': [
- 'src',
- 'tools',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'test/embedding',
- ],
-
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'test/embedding/embedtest.cc',
- ],
-
- 'conditions': [
- ['OS=="solaris"', {
- 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
- }],
- # Skip cctest while building shared lib node for Windows
- [ 'OS=="win" and node_shared=="true"', {
- 'type': 'none',
- }],
- [ 'node_shared=="true"', {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
- },
- }],
- ['OS=="win"', {
- 'libraries': [
- 'Dbghelp.lib',
- 'winmm.lib',
- 'Ws2_32.lib',
- ],
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # embedtest
-
- {
- 'target_name': 'overlapped-checker',
- 'type': 'executable',
-
- 'conditions': [
- ['OS=="win"', {
- 'sources': [
- 'test/overlapped-checker/main_win.c'
- ],
- }],
- ['OS!="win"', {
- 'sources': [
- 'test/overlapped-checker/main_unix.c'
- ],
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ]
- }, # overlapped-checker
- {
- 'target_name': 'nop',
- 'type': 'executable',
- 'sources': [
- 'test/nop/nop.c',
- ]
- }, # nop
{
'target_name': 'node_js2c',
'type': 'executable',