nodejs: Update from 6.2.2 to 6.3.0
[termux-packages] / packages / nodejs / build.sh
CommitLineData
59f0d218
FF
1TERMUX_PKG_HOMEPAGE=http://nodejs.org/
2TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
907bf81e 3TERMUX_PKG_VERSION=6.3.0
1189304e 4TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz
928e1510 5TERMUX_PKG_DEPENDS="openssl, libuv, libgnustl, c-ares"
59f0d218
FF
6TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace"
7TERMUX_PKG_BUILD_IN_SRC=yes
8
9termux_step_configure () {
1224589f
FF
10 # https://github.com/nodejs/build/issues/266: "V8 can handle cross compiling of
11 # snapshots if the {CC,CXX}_host variables are defined, by compiling the
12 # mksnapshot executable with the host compiler". But this currently fails
13 # due to the host build picking up targets flags.
14 export CC_host=gcc
15 export CXX_host=g++
16
928e1510 17 local _EXTRA_CONFIGURE_ARGS=""
59f0d218 18 if [ $TERMUX_ARCH = "arm" ]; then
1224589f 19 DEST_CPU="arm"
928e1510 20 _EXTRA_CONFIGURE_ARGS=" --with-arm-float-abi=hard --with-arm-fpu=neon"
59f0d218 21 elif [ $TERMUX_ARCH = "i686" ]; then
1224589f 22 DEST_CPU="ia32"
d59a97b3 23 elif [ $TERMUX_ARCH = "aarch64" ]; then
1224589f 24 DEST_CPU="arm64"
d59a97b3 25 elif [ $TERMUX_ARCH = "x86_64" ]; then
1224589f 26 DEST_CPU="x64"
59f0d218
FF
27 else
28 echo "Unsupported arch: $TERMUX_ARCH"
29 exit 1
30 fi
9ba78439 31
1224589f
FF
32 ./configure \
33 --prefix=$TERMUX_PREFIX \
34 --dest-cpu=$DEST_CPU \
35 --dest-os=android \
928e1510
FF
36 --shared-openssl --shared-zlib --shared-libuv --shared-cares \
37 --without-snapshot \
1df225d6 38 --without-intl \
928e1510 39 $_EXTRA_CONFIGURE_ARGS
d53dc644 40}