From: rfl890 <rfl890@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] nodejs: update to 20.9.0
Date: Wed, 15 Nov 2023 20:47:20 +0100 [thread overview]
Message-ID: <20231115194720.jpNLzqg2lD0NH6e7Auqaxcdzl7GI4F9yEewNhTIxNmw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47249@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 481 bytes --]
There is an updated pull request by rfl890 against master on the void-packages repository
https://github.com/rfl890/void-packages nodejs
https://github.com/void-linux/void-packages/pull/47249
nodejs: update to 20.9.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/47249.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nodejs-47249.patch --]
[-- Type: text/x-diff, Size: 8415 bytes --]
From 2a44353645a9d1a52be58a41d6e90486338d7cd2 Mon Sep 17 00:00:00 2001
From: rfl890 <87506407+rfl890@users.noreply.github.com>
Date: Wed, 15 Nov 2023 10:12:45 -0500
Subject: [PATCH] nodejs: update to 20.9.0
---
srcpkgs/nodejs/patches/cross-aarch64.patch | 42 +++++++++----------
srcpkgs/nodejs/patches/ppc32.patch | 2 +-
srcpkgs/nodejs/patches/python312.patch | 6 +--
srcpkgs/nodejs/patches/shared-uv.patch | 4 +-
.../nodejs/patches/xxx-ppc-hwcap-musl.patch | 16 ++-----
srcpkgs/nodejs/template | 21 ++++++----
6 files changed, 42 insertions(+), 49 deletions(-)
diff --git a/srcpkgs/nodejs/patches/cross-aarch64.patch b/srcpkgs/nodejs/patches/cross-aarch64.patch
index fa05cb15813e8..fea72922e52e8 100644
--- a/srcpkgs/nodejs/patches/cross-aarch64.patch
+++ b/srcpkgs/nodejs/patches/cross-aarch64.patch
@@ -1,23 +1,18 @@
-From 6bdf9dc3ec7dbff00acef081f4e3dd3e061fd744 Mon Sep 17 00:00:00 2001
-From: Ben Noordhuis <info@bnoordhuis.nl>
-Date: Tue, 6 Dec 2022 11:27:49 +0100
-Subject: [PATCH] build: fix arm64 cross-compilation
+From e6345abf20aaa82460b7fa49ac5c4bc7d3a0d02a Mon Sep 17 00:00:00 2001
+From: RFL890 <rfl890mc@gmail.com>
+Date: Mon, 13 Nov 2023 09:19:23 -0500
+Subject: [PATCH] Fix cross compilation on arm64
-Commit 938212f added -msign-return-address=all to _all_ cflags but that
-is wrong when cross-compiling, it should only be added to the target's
-cflags.
-
-Fixes: https://github.com/nodejs/node/issues/42888
---
configure.py | 2 --
node.gyp | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.py b/configure.py
-index 40e0395e..9de3148f 100755
+index 62f041ce52..e55c5a6353 100755
--- a/configure.py
+++ b/configure.py
-@@ -1294,9 +1294,7 @@ def configure_node(o):
+@@ -1268,9 +1268,7 @@ def configure_node(o):
o['variables']['want_separate_host_toolset'] = int(cross_compiling)
@@ -28,16 +23,19 @@ index 40e0395e..9de3148f 100755
if options.node_snapshot_main is not None:
diff --git a/node.gyp b/node.gyp
-index cf52281b..5218d941 100644
+index 4e614df1a9..ed0ffcc582 100644
--- a/node.gyp
+++ b/node.gyp
-@@ -112,6 +112,9 @@
- },
-
- 'conditions': [
-+ ['target_arch=="arm64"', {
-+ 'cflags': ['-msign-return-address=all'], # Pointer authentication.
-+ }],
- ['OS in "aix os400"', {
- 'ldflags': [
- '-Wl,-bnoerrmsg',
+@@ -411,6 +411,9 @@
+ [ 'node_shared=="true"', {
+ 'node_target_type%': 'shared_library',
+ 'conditions': [
++ ['target_arch=="arm64"', {
++ 'cflags': ['-msign-return-address=all'], # Pointer authentication.
++ }],
+ ['OS in "aix os400"', {
+ # For AIX, always generate static library first,
+ # It needs an extra step to generate exp and
+--
+2.42.0
+
diff --git a/srcpkgs/nodejs/patches/ppc32.patch b/srcpkgs/nodejs/patches/ppc32.patch
index ddfceb2f2179c..068b5bd3ba58e 100644
--- a/srcpkgs/nodejs/patches/ppc32.patch
+++ b/srcpkgs/nodejs/patches/ppc32.patch
@@ -1,6 +1,6 @@
--- a/deps/v8/src/libsampler/sampler.cc
+++ b/deps/v8/src/libsampler/sampler.cc
-@@ -423,10 +423,17 @@
+@@ -441,10 +441,17 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
state->lr = reinterpret_cast<void*>(ucontext->uc_mcontext.regs->link);
#else
// Some C libraries, notably Musl, define the regs member as a void pointer
diff --git a/srcpkgs/nodejs/patches/python312.patch b/srcpkgs/nodejs/patches/python312.patch
index b5f1d22877f7e..9486ed94c8529 100644
--- a/srcpkgs/nodejs/patches/python312.patch
+++ b/srcpkgs/nodejs/patches/python312.patch
@@ -1,5 +1,5 @@
---- ./configure.orig 2023-10-11 07:49:24.971659089 -0400
-+++ ./configure 2023-10-11 07:49:51.615780727 -0400
+--- a/configure
++++ b/configure
@@ -4,6 +4,7 @@
# Note that the mix of single and double quotes is intentional,
# as is the fact that the ] goes on a new line.
@@ -8,7 +8,7 @@
command -v python3.11 >/dev/null && exec python3.11 "$0" "$@"
command -v python3.10 >/dev/null && exec python3.10 "$0" "$@"
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
-@@ -23,7 +24,7 @@
+@@ -23,7 +24,7 @@ except ImportError:
from distutils.spawn import find_executable as which
print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info))
diff --git a/srcpkgs/nodejs/patches/shared-uv.patch b/srcpkgs/nodejs/patches/shared-uv.patch
index 47a167b439582..5545ab82fdf3d 100644
--- a/srcpkgs/nodejs/patches/shared-uv.patch
+++ b/srcpkgs/nodejs/patches/shared-uv.patch
@@ -1,12 +1,12 @@
--- a/deps/uvwasi/uvwasi.gyp
+++ b/deps/uvwasi/uvwasi.gyp
-@@ -33,6 +33,9 @@
+@@ -38,6 +38,9 @@
'../uv/uv.gyp:libuv',
],
}],
+ [ 'node_shared_libuv=="true"', {
+ 'libraries': [ '-luv' ],
-+ }]
++ }],
],
}
]
diff --git a/srcpkgs/nodejs/patches/xxx-ppc-hwcap-musl.patch b/srcpkgs/nodejs/patches/xxx-ppc-hwcap-musl.patch
index 952892caed386..0ecfcea1f1921 100644
--- a/srcpkgs/nodejs/patches/xxx-ppc-hwcap-musl.patch
+++ b/srcpkgs/nodejs/patches/xxx-ppc-hwcap-musl.patch
@@ -1,24 +1,16 @@
-commit 558ab896cbdd90259950c631ba29a1c66bf4c2d3
-Author: q66 <daniel@octaforge.org>
-Date: Mon Feb 28 23:53:22 2022 +0100
-
- add some hwcap bits fallbacks
-
-diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc
-index a1b21d2..8e52802 100644
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
-@@ -768,6 +768,13 @@ CPU::CPU()
+@@ -788,7 +788,12 @@ CPU::CPU()
+ #endif // V8_OS_WIN
#elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64
-
+-
+#ifndef PPC_FEATURE2_HAS_ISEL
+#define PPC_FEATURE2_HAS_ISEL 0x08000000
+#endif
+#ifndef PPC_FEATURE2_ARCH_3_1
+#define PPC_FEATURE2_ARCH_3_1 0x00040000
+#endif
-+
#ifndef USE_SIMULATOR
#if V8_OS_LINUX
- // Read processor info from getauxval() (needs at least glibc 2.18 or musl).
+ // Read processor info from /proc/self/auxv.
diff --git a/srcpkgs/nodejs/template b/srcpkgs/nodejs/template
index 2576dbdbbbe89..8c392065e78e5 100644
--- a/srcpkgs/nodejs/template
+++ b/srcpkgs/nodejs/template
@@ -1,21 +1,19 @@
# Template file for 'nodejs'
pkgname=nodejs
-version=18.16.0
+version=20.9.0
revision=3
-# Need these for host v8 for torque, see https://github.com/nodejs/node/pull/21079
-hostmakedepends="which pkg-config python3-setuptools zlib-devel
- $(vopt_if icu icu-devel) $(vopt_if ssl openssl-devel) $(vopt_if libuv libuv-devel)
- $(vopt_if nghttp2 nghttp2-devel) $(vopt_if cares c-ares-devel)"
-makedepends="zlib-devel $(vopt_if icu icu-devel)
+hostmakedepends="which pkg-config python3 python3-distutils-extra"
+_make_depends="libatomic-devel zlib-devel brotli-devel $(vopt_if icu icu-devel)
$(vopt_if ssl openssl-devel) $(vopt_if libuv libuv-devel)
$(vopt_if nghttp2 nghttp2-devel) $(vopt_if cares c-ares-devel)"
+makedepends="$_make_depends"
checkdepends="procps-ng iana-etc"
short_desc="Evented I/O for V8 javascript"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT"
homepage="https://nodejs.org/"
distfiles="https://nodejs.org/dist/v${version}/node-v${version}.tar.gz"
-checksum=6a4f5c5d76e5c50cef673099e56f19bc3266ae363f56ca0ab77dd2f3c5088c6d
+checksum=a7e6547a951406e4e546a74160ed27b26f9abd4baf7c44dd5a0fa992852d0cfa
python_version=3
build_options="ssl libuv icu nghttp2 cares"
@@ -30,6 +28,11 @@ replaces="iojs>=0"
conflicts="nodejs-lts-10"
provides="nodejs-runtime-0_1"
+if [ "$CROSS_BUILD" ]; then
+ # Need these for host v8 for torque, see https://github.com/nodejs/node/pull/21079
+ hostmakedepends+=" $_make_depends"
+fi
+
# https://build.voidlinux.org/builders/i686_builder/builds/27325/steps/shell_3/logs/stdio
if [ "$XBPS_WORDSIZE" = 32 ]; then
LDFLAGS="-Wl,--no-keep-memory"
@@ -41,7 +44,7 @@ fi
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
- ppc*) broken="Node 18.x does not support 32-bit ppc" ;;
+ ppc*) broken="Node 20.x does not support 32-bit ppc" ;;
esac
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
@@ -71,7 +74,7 @@ do_configure() {
# to execute it within the build system fails
_args+=" --cross-compiling"
fi
- ./configure --prefix=/usr --shared-zlib \
+ ./configure --prefix=/usr --shared-zlib --shared-brotli --enable-lto \
$(vopt_if icu --with-intl=system-icu) \
$(vopt_if ssl --shared-openssl) \
$(vopt_if libuv --shared-libuv) \
next prev parent reply other threads:[~2023-11-15 19:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 15:14 [PR PATCH] " rfl890
2023-11-15 18:07 ` mhmdanas
2023-11-15 19:36 ` [PR PATCH] [Updated] " rfl890
2023-11-15 19:38 ` rfl890
2023-11-15 19:47 ` rfl890 [this message]
2023-11-15 20:01 ` mhmdanas
2023-11-15 20:37 ` rfl890
2023-11-15 22:42 ` mhmdanas
2023-11-17 18:52 ` [PR PATCH] [Closed]: " rfl890
2023-11-17 18:52 ` rfl890
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231115194720.jpNLzqg2lD0NH6e7Auqaxcdzl7GI4F9yEewNhTIxNmw@z \
--to=rfl890@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).