nodejs: fix cross to aarch64

Also mark x86_64* -> arm* as broken, we can only build
32bit -> 32bit (i686 -> arm*) , see
https://github.com/nodejs/node/blob/master/deps/v8/src/base/build_config.h#L149
This commit is contained in:
Rasmus Thomsen 2019-01-04 04:31:40 +01:00 committed by maxice8
parent 8c489981d0
commit fbab1e82ec

View file

@ -1,9 +1,13 @@
# Template file for 'nodejs'
pkgname=nodejs
version=10.15.0
revision=1
revision=2
wrksrc="node-v${version}"
hostmakedepends="pkg-config python $(vopt_if icu icu)"
# Need these for host v8 for torque, see https://github.com/nodejs/node/pull/21079
hostmakedepends="pkg-config python zlib-devel $(vopt_if icu icu-devel)
$(vopt_if ssl libressl-devel) $(vopt_if libuv libuv-devel)
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
$(vopt_if cares c-ares-devel)"
makedepends="zlib-devel python-devel $(vopt_if icu icu-devel)
$(vopt_if ssl libressl-devel) $(vopt_if libuv libuv-devel)
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
@ -14,7 +18,6 @@ license="MIT"
homepage="https://nodejs.org/"
distfiles="${homepage}/dist/v${version}/node-v${version}.tar.gz"
checksum=dbe467e3dabb6854fcb0cd96e04082268cb1e313ce97a4b7100b2ed152b0a0ab
nocross="https://build.voidlinux.org/builders/armv7l_builder/builds/13788/steps/shell_3/logs/stdio"
build_options="ssl libuv http_parser icu nghttp2 cares"
desc_option_ssl="Enable shared libressl"
@ -35,9 +38,9 @@ do_configure() {
export LD="$CXX"
if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in
arm*) _args="--dest-cpu=arm --without-snapshot" ;;
arm*) msg_error "Can only build Node for ARMv[5-7] from a 32-bit host.\n" ;;
aarch64*) _args="--dest-cpu=arm64 --without-snapshot" ;;
*) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}\n" ;;
*) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
esac
fi
./configure --prefix=/usr --shared-zlib \