ports/opt (3.8): nodejs: added patch to build with python 3.12

commit ef9fe0ee7527a5753934f8d3857456d552242cd6 Author: Tim Biermann <tbier@posteo.de> Date: Sun Nov 5 14:05:56 2023 +0100 nodejs: added patch to build with python 3.12 diff --git a/nodejs/.signature b/nodejs/.signature index 919069f55..c92353ceb 100644 --- a/nodejs/.signature +++ b/nodejs/.signature @@ -1,6 +1,7 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/VY5daqlOKPkuwijZOxTBbMIyKCd9UHRfWoTOryEr1keZjPAawuM06t2NurRRtsE8GEK/MqWqrrPdIImaFGzYwU= -SHA256 (Pkgfile) = b4d61977304d71d438c69191dab79cd3ca194a2b98d90411e66d823fb0ddbee4 +RWSE3ohX2g5d/aRukQFIWFE95ncPIM7PfbN8Ur2LHTOjle0y+0yIKa7vxMh+HH8lwjXz/v8Nq+2xuoP0hOc2jNvKFPueW8nC0gY= +SHA256 (Pkgfile) = 52f9b78e45f8e83355253f5b2bbaf7d36e0a160415ba6344af137974fd6521d8 SHA256 (.footprint) = 3150c1e8bc4bec5c9d351873b44bba9bf9f6c91e9e29b8871ee27e3bf18b3a70 SHA256 (node-v21.1.0.tar.xz) = 91ac72e4444c5e5ab4b448030a61ffa95acd35d34a9d31d2d220ee2bed01b925 +SHA256 (50209.patch) = 0f992a6eba177594e472b379da6ddab234bbf2a1644c1f900b03bf5fd23ffbfc SHA256 (system-c-ares.patch) = 1ab0f849fe4fae2d295b6c60c12825d5f2c29f5b28b721916d1b550704b0f5f3 diff --git a/nodejs/50209.patch b/nodejs/50209.patch new file mode 100644 index 000000000..cd463fb8a --- /dev/null +++ b/nodejs/50209.patch @@ -0,0 +1,30 @@ +From 0d0c92d29398a74201c65d950f3c57b6f5f3fe77 Mon Sep 17 00:00:00 2001 +From: Shi Pujin <shipujin@loongson.cn> +Date: Thu, 26 Oct 2023 20:59:01 +0800 +Subject: [PATCH] build: support Python 3.12 + +--- + configure | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index fefb313c9cd13..711a3014b9a67 100755 +--- 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. + _=[ 'exec' '/bin/sh' '-c' ''' ++command -v python3.12 >/dev/null && exec python3.12 "$0" "$@" + 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 @@ except ImportError: + from distutils.spawn import find_executable as which + + print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info)) +-acceptable_pythons = ((3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6)) ++acceptable_pythons = ((3, 12), (3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6)) + if sys.version_info[:2] in acceptable_pythons: + import configure + else: diff --git a/nodejs/Pkgfile b/nodejs/Pkgfile index d4b0f3393..eae5bbb97 100644 --- a/nodejs/Pkgfile +++ b/nodejs/Pkgfile @@ -8,11 +8,14 @@ name=nodejs version=21.1.0 release=1 source=(https://nodejs.org/dist/v$version/node-v$version.tar.xz + 50209.patch system-c-ares.patch) build() { cd node-v$version + patch -Np1 -i $SRC/50209.patch + prt-get isinst brotli && PKGMK_NODEJS+=' --shared-brotli' prt-get isinst c-ares && PKGMK_NODEJS+=' --shared-cares' prt-get isinst c-ares && patch -Rp1 -i $SRC/system-c-ares.patch
participants (1)
-
crux@crux.nu