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
This commit is contained in:
termux-pacman-bot
2025-12-10 10:42:58 +00:00
parent be02dab605
commit cdca6bab76
3 changed files with 39 additions and 93 deletions

View File

@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://nodejs.org/
TERMUX_PKG_DESCRIPTION="Open Source, cross-platform JavaScript runtime environment"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Yaksh Bariya <thunder-coding@termux.dev>"
TERMUX_PKG_VERSION=24.11.1
TERMUX_PKG_VERSION=25.2.1
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=ea4da35f1c9ca376ec6837e1e30cee30d491847fe152a3f0378dc1156d954bbd
TERMUX_PKG_SHA256=aa7c4ac1076dc299a8949b8d834263659b2408ec0e5bba484673a8ce0766c8b9
# thunder-coding: don't try to autoupdate nodejs, that thing takes 2 whole hours to build for a single arch, and requires a lot of patch updates everytime. Also I run tests everytime I update it to ensure least bugs
TERMUX_PKG_AUTO_UPDATE=false
# Note that we do not use a shared libuv to avoid an issue with the Android
@@ -71,8 +71,8 @@ termux_step_host_build() {
# 'bucket': 'chromium-browser-clang',
# 'objects': [
# {
# 'object_name': 'Linux_x64/clang-llvmorg-21-init-5118-g52cd27e6-5.tar.xz',
# 'sha256sum': '790fcc5b04e96882e8227ba7994161ab945c0e096057fc165a0f71e32a7cb061',
# 'object_name': 'Linux_x64/clang-llvmorg-21-init-9266-g09006611-1.tar.xz',
# 'sha256sum': '2cccd3a5b04461f17a2e78d2f8bd18b448443a9dd4d6dfac50e8e84b4d5176f1',
# 'size_bytes': 54517328,
# 'generation': 1742541959624765,
# 'condition': 'host_os == "linux"',
@@ -87,8 +87,8 @@ termux_step_host_build() {
# llvm-project directory.
#
# Also the sha256sum is the hash of the tarball, which we can directly use
local LLVM_TAR="clang-llvmorg-21-init-5118-g52cd27e6-5.tar.xz"
local LLVM_TAR_HASH=790fcc5b04e96882e8227ba7994161ab945c0e096057fc165a0f71e32a7cb061
local LLVM_TAR="clang-llvmorg-21-init-9266-g09006611-1.tar.xz"
local LLVM_TAR_HASH=2cccd3a5b04461f17a2e78d2f8bd18b448443a9dd4d6dfac50e8e84b4d5176f1
cd $TERMUX_PKG_HOSTBUILD_DIR
mkdir llvm-project-build
termux_download \
@@ -139,7 +139,16 @@ termux_step_configure() {
export CXX_host="$TERMUX_PKG_HOSTBUILD_DIR/llvm-project-build/bin/clang++ -m32"
export LINK_host="$TERMUX_PKG_HOSTBUILD_DIR/llvm-project-build/bin/clang++ -m32"
fi
LDFLAGS+=" -ldl"
# Although without any configuration at all GYP builds both out/Release/ and out/Debug/
# with build.ninja, it is incorrect to use the other directory as configure.py passes
# a build_type variable to GYP which it uses to detect release/debug builds which is
# used in some places to do some debug build specific stuff.
# An example of such errors is the builds failing due to undefined symbols of some
# generated source files that happen only in debug builds
local _DEBUG=()
if [ "${TERMUX_DEBUG_BUILD}" = "true" ]; then
_DEBUG+=("--debug")
fi
# See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv.
# When building with ninja, build.ninja is generated for both Debug and Release builds.
./configure \
@@ -152,7 +161,8 @@ termux_step_configure() {
--shared-zlib \
--with-intl=system-icu \
--cross-compiling \
--ninja
--ninja \
"${_DEBUG[@]}"
export LD_LIBRARY_PATH=$TERMUX_PKG_HOSTBUILD_DIR/icu-installed/lib
sed -i \

View File

@@ -1,6 +1,6 @@
--- ./deps/v8/src/trap-handler/trap-handler.h.orig 2025-05-08 13:56:19.000000000 +0530
+++ ./deps/v8/src/trap-handler/trap-handler.h 2025-05-09 19:48:23.129472068 +0530
@@ -15,45 +15,7 @@
--- ./deps/v8/src/trap-handler/trap-handler.h.orig 2025-10-06 04:33:30.681637509 +0530
+++ ./deps/v8/src/trap-handler/trap-handler.h 2025-10-06 04:33:35.761027106 +0530
@@ -15,49 +15,7 @@
namespace v8::internal::trap_handler {
@@ -9,10 +9,14 @@
- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
- V8_OS_FREEBSD)
-#define V8_TRAP_HANDLER_SUPPORTED true
-// Arm64 (non-simulator) on Linux, Windows, MacOS.
-// Arm64 native on Linux, Windows, MacOS.
-#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \
- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN)
-#define V8_TRAP_HANDLER_SUPPORTED true
-// For Linux and Mac, enable the simulator when it's been requested.
-#if USE_SIMULATOR && ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_DARWIN)
-#define V8_TRAP_HANDLER_VIA_SIMULATOR
-#endif
-// Arm64 simulator on x64 on Linux, Mac, or Windows.
-//
-// The simulator case uses some inline assembly code, which cannot be

View File

@@ -1,6 +1,15 @@
--- ./node.gyp.orig 2025-09-25 20:13:15.000000000 +0530
+++ ./node.gyp 2025-09-29 10:45:45.364950564 +0530
@@ -548,7 +548,8 @@
--- ./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': [
@@ -10,7 +19,7 @@
],
'dependencies': [
@@ -1045,314 +1046,6 @@
@@ -1063,314 +1064,6 @@
},
],
}, # node_lib_target_name
@@ -325,80 +334,3 @@
{
'target_name': 'node_js2c',
'type': 'executable',
@@ -1389,76 +1082,6 @@
}],
]
},
- {
- 'target_name': 'node_mksnapshot',
- 'type': 'executable',
-
- 'dependencies': [
- '<(node_lib_target_name)',
- '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',
- ],
-
- 'defines': [ 'NODE_WANT_INTERNALS=1' ],
-
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'tools/snapshot/node_mksnapshot.cc',
- ],
-
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'EnableCOMDATFolding': '1', # /OPT:NOICF
- },
- },
-
- 'conditions': [
- ['node_write_snapshot_as_array_literals=="true"', {
- 'defines': [ 'NODE_MKSNAPSHOT_USE_ARRAY_LITERALS=1' ],
- }],
- [ 'node_use_openssl=="true"', {
- 'dependencies': [
- 'deps/ncrypto/ncrypto.gyp:ncrypto',
- ],
- 'defines': [
- 'HAVE_OPENSSL=1',
- ],
- }],
- [ 'node_use_node_code_cache=="true"', {
- 'defines': [
- 'NODE_USE_NODE_CODE_CACHE=1',
- ],
- }],
- ['v8_enable_inspector==1', {
- 'defines': [
- 'HAVE_INSPECTOR=1',
- ],
- }],
- ['OS=="win"', {
- 'libraries': [
- 'Dbghelp.lib',
- 'winmm.lib',
- 'Ws2_32.lib',
- ],
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # node_mksnapshot
], # end targets
'conditions': [