upgpkg(main/nodejs): v19.4.0

This commit is contained in:
termux-pacman-bot
2023-01-10 15:35:08 +00:00
parent 6ffdfd2c85
commit 002fcf1699
11 changed files with 60 additions and 154 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 <yakshbari4@gmail.com>"
TERMUX_PKG_VERSION=18.12.1
TERMUX_PKG_VERSION=19.4.0
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=4fa406451bc52659a290e52cfdb2162a760bd549da4b8bbebe6a29f296d938df
TERMUX_PKG_SHA256=020541d670f528bd03ba0b92a1d0c46d6850982175a72f2aa557aefeda31b261
# Note that we do not use a shared libuv to avoid an issue with the Android
# linker, which does not use symbols of linked shared libraries when resolving
# symbols on dlopen(). See https://github.com/termux/termux-packages/issues/462.

View File

@@ -1,16 +1,10 @@
Revert https://github.com/nodejs/node/commit/938212f3e74a74d0b436941aa24e71425ff666c5
Seems like host GCC compiler doesn't support this yet.
--- ./configure.py.orig 2022-10-06 06:09:46.883008809 +0530
+++ ./configure.py 2022-10-06 06:10:31.483008792 +0530
@@ -1245,10 +1245,6 @@
--- ./configure.py.orig 2023-01-07 16:56:02.569241264 +0530
+++ ./configure.py 2023-01-07 16:56:12.326490692 +0530
@@ -1261,7 +1261,6 @@
o['variables']['want_separate_host_toolset'] = int(cross_compiling)
- # Enable branch protection for arm64
- if target_arch == 'arm64':
# Enable branch protection for arm64
if target_arch == 'arm64':
- o['cflags']+=['-msign-return-address=all']
-
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
if options.node_snapshot_main is not None:
if options.shared:
# This should be possible to fix, but we will need to refactor the

View File

@@ -1,10 +1,10 @@
--- ./deps/npm/node_modules/cacache/lib/util/move-file.js.orig 2022-06-06 17:56:02.433293902 +0530
+++ ./deps/npm/node_modules/cacache/lib/util/move-file.js 2022-06-06 17:56:56.713293882 +0530
--- ./deps/npm/node_modules/cacache/lib/util/move-file.js.orig 2023-01-07 16:30:48.424580622 +0530
+++ ./deps/npm/node_modules/cacache/lib/util/move-file.js 2023-01-07 16:34:52.650983798 +0530
@@ -1,56 +1,9 @@
'use strict'
-const fs = require('@npmcli/fs')
const move = require('@npmcli/move-file')
-const fs = require('fs/promises')
const { moveFile: move } = require('@npmcli/fs')
-const pinflight = require('promise-inflight')
module.exports = moveFile
@@ -56,5 +56,5 @@
- return move(src, dest)
- })
- }
+ return move(src, dest);
+ return move(src, dest)
}

View File

@@ -1,7 +1,6 @@
diff '--color=auto' -uNr node-v18.0.0.orig/deps/uv/src/unix/process.c node-v18.0.0/deps/uv/src/unix/process.c
--- node-v18.0.0.orig/deps/uv/src/unix/process.c 2022-04-21 15:15:32.631869790 +0530
+++ node-v18.0.0/deps/uv/src/unix/process.c 2022-04-21 15:42:34.267175190 +0530
@@ -303,23 +303,6 @@
--- ./deps/uv/src/unix/process.c.orig 2022-11-23 18:29:41.212329442 +0530
+++ ./deps/uv/src/unix/process.c 2022-11-23 18:32:37.602329375 +0530
@@ -351,23 +351,6 @@
if (options->cwd != NULL && chdir(options->cwd))
uv__write_errno(error_fd);
@@ -22,6 +21,6 @@ diff '--color=auto' -uNr node-v18.0.0.orig/deps/uv/src/unix/process.c node-v18.0
- if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid))
- uv__write_errno(error_fd);
-
if (options->env != NULL) {
if (options->env != NULL)
environ = options->env;
}

View File

@@ -1,6 +1,5 @@
diff '--color=auto' -uNr node-v18.0.0.orig/deps/uv/uv.gyp node-v18.0.0/deps/uv/uv.gyp
--- node-v18.0.0.orig/deps/uv/uv.gyp 2022-04-21 15:15:32.951869789 +0530
+++ node-v18.0.0/deps/uv/uv.gyp 2022-04-21 15:43:16.397175174 +0530
--- ./deps/uv/uv.gyp.orig 2022-11-14 07:56:05.000000000 +0530
+++ ./deps/uv/uv.gyp 2022-11-25 18:51:25.022527139 +0530
@@ -40,7 +40,7 @@
{
'target_name': 'libuv',
@@ -19,7 +18,7 @@ diff '--color=auto' -uNr node-v18.0.0.orig/deps/uv/uv.gyp node-v18.0.0/deps/uv/u
'conditions': [
['OS == "linux"', {
'defines': [ '_POSIX_C_SOURCE=200112' ],
@@ -247,6 +247,7 @@
@@ -249,6 +249,7 @@
'src/unix/procfs-exepath.c',
'src/unix/random-getrandom.c',
'src/unix/random-sysctl-linux.c',
@@ -27,3 +26,19 @@ diff '--color=auto' -uNr node-v18.0.0.orig/deps/uv/uv.gyp node-v18.0.0/deps/uv/u
],
'link_settings': {
'libraries': [ '-ldl', '-lrt' ],
@@ -256,7 +257,6 @@
}],
[ 'OS=="android"', {
'sources': [
- 'src/unix/android-ifaddrs.c',
'src/unix/linux-core.c',
'src/unix/linux-inotify.c',
'src/unix/linux-syscalls.c',
@@ -267,6 +267,7 @@
'src/unix/random-sysctl-linux.c',
'src/unix/epoll.c',
],
+ 'defines': [ '__USE_GNU' ],
'link_settings': {
'libraries': [ '-ldl' ],
},

View File

@@ -1,11 +1,11 @@
diff '--color=auto' -uNr node-v18.0.0.orig/deps/v8/src/logging/log.cc node-v18.0.0/deps/v8/src/logging/log.cc
--- node-v18.0.0.orig/deps/v8/src/logging/log.cc 2022-04-21 15:15:34.031869789 +0530
+++ node-v18.0.0/deps/v8/src/logging/log.cc 2022-04-21 15:44:33.497175145 +0530
@@ -308,7 +308,7 @@
FILE* perf_output_handle_;
--- ./deps/v8/src/logging/log.cc.orig 2022-11-23 18:22:22.362329609 +0530
+++ ./deps/v8/src/logging/log.cc 2022-11-23 18:26:15.492329520 +0530
@@ -357,7 +357,7 @@
static uint64_t reference_count_;
};
-const char PerfBasicLogger::kFilenameFormatString[] = "/tmp/perf-%d.map";
+const char PerfBasicLogger::kFilenameFormatString[] = "@TERMUX_PREFIX@/tmp/perf-%d.map";
-const char LinuxPerfBasicLogger::kFilenameFormatString[] = "/tmp/perf-%d.map";
+const char LinuxPerfBasicLogger::kFilenameFormatString[] = "@TERMUX_PREFIX@/perf-%d.map";
// Extra space for the PID in the filename
const int PerfBasicLogger::kFilenameBufferPadding = 16;
const int LinuxPerfBasicLogger::kFilenameBufferPadding = 16;

View File

@@ -1,6 +1,5 @@
diff '--color=auto' -uNr node-v18.0.0.orig/deps/v8/src/trap-handler/trap-handler.h node-v18.0.0/deps/v8/src/trap-handler/trap-handler.h
--- node-v18.0.0.orig/deps/v8/src/trap-handler/trap-handler.h 2022-04-21 15:15:33.491869789 +0530
+++ node-v18.0.0/deps/v8/src/trap-handler/trap-handler.h 2022-04-21 15:45:22.317175126 +0530
--- ./deps/v8/src/trap-handler/trap-handler.h.orig 2022-11-23 18:22:22.422329609 +0530
+++ ./deps/v8/src/trap-handler/trap-handler.h 2022-11-23 18:28:14.112329475 +0530
@@ -17,23 +17,7 @@
namespace internal {
namespace trap_handler {
@@ -15,7 +14,7 @@ diff '--color=auto' -uNr node-v18.0.0.orig/deps/v8/src/trap-handler/trap-handler
-#define V8_TRAP_HANDLER_SUPPORTED true
-// Arm64 simulator on x64 on Linux, Mac, or Windows.
-#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && \
- (V8_OS_LINUX || V8_OS_DARWIN)
- (V8_OS_LINUX || V8_OS_DARWIN || V8_OS_WIN)
-#define V8_TRAP_HANDLER_VIA_SIMULATOR
-#define V8_TRAP_HANDLER_SUPPORTED true
-// Everything else is unsupported.

View File

@@ -1,20 +0,0 @@
--- ./lib/internal/test_runner/test.js.orig 2022-10-05 20:33:27.680099607 +0530
+++ ./lib/internal/test_runner/test.js 2022-10-05 20:35:19.150099564 +0530
@@ -44,7 +44,7 @@
} = require('internal/validators');
const { setTimeout } = require('timers/promises');
const { TIMEOUT_MAX } = require('internal/timers');
-const { cpus } = require('os');
+const { numcpus } = require('os');
const { bigint: hrtime } = process.hrtime;
const kCallbackAndPromisePresent = 'callbackAndPromisePresent';
const kCancelledByParent = 'cancelledByParent';
@@ -193,7 +193,7 @@
case 'boolean':
if (concurrency) {
// TODO(cjihrig): Use uv_available_parallelism() once it lands.
- this.concurrency = parent === null ? MathMax(cpus().length - 1, 1) : Infinity;
+ this.concurrency = parent === null ? MathMax(numcpus() - 1, 1) : Infinity;
} else {
this.concurrency = 1;
}

View File

@@ -1,25 +1,6 @@
--- ./lib/os.js.orig 2022-05-21 13:09:26.332384353 +0530
+++ ./lib/os.js 2022-05-21 13:10:15.732384334 +0530
@@ -45,6 +45,7 @@
const { validateInt32 } = require('internal/validators');
const {
+ getNumCPUs,
getCPUs,
getFreeMem,
getHomeDirectory: _getHomeDirectory,
@@ -114,6 +115,10 @@
return [avgValues[0], avgValues[1], avgValues[2]];
}
+function numcpus() {
+ return getNumCPUs();
+}
+
/**
* Returns an array of objects containing information about each
* logical CPU core.
@@ -183,7 +188,7 @@
--- ./lib/os.js.orig 2023-01-06 02:53:28.000000000 +0530
+++ ./lib/os.js 2023-01-07 16:38:56.051166243 +0530
@@ -193,7 +193,7 @@
path = safeGetenv('TMPDIR') ||
safeGetenv('TMP') ||
safeGetenv('TEMP') ||
@@ -28,11 +9,3 @@
if (path.length > 1 && StringPrototypeEndsWith(path, '/'))
path = StringPrototypeSlice(path, 0, -1);
}
@@ -351,6 +356,7 @@
module.exports = {
arch,
+ numcpus,
cpus,
endianness,
freemem: getFreeMem,

View File

@@ -1,6 +1,6 @@
--- ./node.gyp.orig 2022-10-05 20:33:27.730099607 +0530
+++ ./node.gyp 2022-10-05 20:39:22.010099472 +0530
@@ -157,7 +157,8 @@
--- ./node.gyp.orig 2023-01-06 02:53:28.000000000 +0530
+++ ./node.gyp 2023-01-07 16:41:26.138856429 +0530
@@ -154,7 +154,8 @@
],
'sources': [
@@ -10,7 +10,7 @@
],
'dependencies': [
@@ -458,6 +459,7 @@
@@ -448,6 +449,7 @@
'include_dirs': [
'src',
@@ -18,10 +18,10 @@
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
],
'dependencies': [
@@ -1113,309 +1115,6 @@
} ],
]
}, # specialize_node_d
@@ -892,299 +894,6 @@
},
],
}, # node_lib_target_name
- { # fuzz_url
- 'target_name': 'fuzz_url',
- 'type': 'executable',
@@ -60,9 +60,6 @@
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
- 'node_dtrace_header',
- 'node_dtrace_ustack',
- 'node_dtrace_provider',
- ],
- 'includes': [
- 'node.gypi'
@@ -106,9 +103,6 @@
- 'deps/googletest/googletest.gyp:gtest_main',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
- 'node_dtrace_header',
- 'node_dtrace_ustack',
- 'node_dtrace_provider',
- ],
-
- 'includes': [
@@ -140,7 +134,6 @@
- 'test/cctest/test_base_object_ptr.cc',
- 'test/cctest/test_node_postmortem_metadata.cc',
- 'test/cctest/test_environment.cc',
- 'test/cctest/test_js_native_api_v8.cc',
- 'test/cctest/test_linked_binding.cc',
- 'test/cctest/test_node_api.cc',
- 'test/cctest/test_per_process.cc',
@@ -206,9 +199,6 @@
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
- 'node_dtrace_header',
- 'node_dtrace_ustack',
- 'node_dtrace_provider',
- ],
-
- 'includes': [

View File

@@ -1,44 +0,0 @@
--- ./src/node_os.cc.orig 2022-10-05 20:33:26.560099607 +0530
+++ ./src/node_os.cc 2022-10-05 20:41:12.950099429 +0530
@@ -31,6 +31,8 @@
# include <climits> // PATH_MAX on Solaris.
#endif // __POSIX__
+#include <sys/sysinfo.h>
+
#include <array>
#include <cerrno>
#include <cstring>
@@ -97,6 +99,16 @@
arraysize(osInformation)));
}
+static void GetNumCPUs(const FunctionCallbackInfo<Value>& args) {
+ Environment* env = Environment::GetCurrent(args);
+ Isolate* isolate = env->isolate();
+ int n = get_nprocs();
+ if (n < 1) {
+ n = 1;
+ }
+ args.GetReturnValue().Set(Number::New(isolate, n));
+}
+
static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Isolate* isolate = env->isolate();
@@ -391,6 +403,7 @@
SetMethod(context, target, "getUptime", GetUptime);
SetMethod(context, target, "getTotalMem", GetTotalMemory);
SetMethod(context, target, "getFreeMem", GetFreeMemory);
+ SetMethod(context, target, "getNumCPUs", GetNumCPUs);
SetMethod(context, target, "getCPUs", GetCPUInfo);
SetMethod(context, target, "getInterfaceAddresses", GetInterfaceAddresses);
SetMethod(context, target, "getHomeDirectory", GetHomeDirectory);
@@ -411,6 +424,7 @@
registry->Register(GetUptime);
registry->Register(GetTotalMemory);
registry->Register(GetFreeMemory);
+ registry->Register(GetNumCPUs);
registry->Register(GetCPUInfo);
registry->Register(GetInterfaceAddresses);
registry->Register(GetHomeDirectory);