nodejs: fix build with Python 3.12

This commit is contained in:
Andrew J. Hesford 2023-10-11 08:34:46 -04:00
parent e0085e8b2d
commit d5a68be7f3
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,19 @@
--- ./configure.orig 2023-10-11 07:49:24.971659089 -0400
+++ ./configure 2023-10-11 07:49:51.615780727 -0400
@@ -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 @@
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:

View file

@ -3,7 +3,7 @@ pkgname=nodejs
version=18.16.0
revision=3
# Need these for host v8 for torque, see https://github.com/nodejs/node/pull/21079
hostmakedepends="which pkg-config python3 zlib-devel
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)