1 TERMUX_PKG_HOMEPAGE=http://nodejs.org/
2 TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
3 TERMUX_PKG_VERSION=6.6.0
4 TERMUX_PKG_BUILD_REVISION=1
5 TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz
6 # Note that we do not use a shared libuv to avoid an issue with the Android
7 # linker, which does not use symbols of linked shared libraries when resolving
8 # symbols on dlopen(). See https://github.com/termux/termux-packages/issues/462.
9 TERMUX_PKG_DEPENDS="openssl, c-ares"
10 TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace"
11 TERMUX_PKG_BUILD_IN_SRC=yes
13 termux_step_configure () {
14 # https://github.com/nodejs/build/issues/266: "V8 can handle cross compiling of
15 # snapshots if the {CC,CXX}_host variables are defined, by compiling the
16 # mksnapshot executable with the host compiler". But this currently fails
17 # due to the host build picking up targets flags.
21 local _EXTRA_CONFIGURE_ARGS=""
22 if [ $TERMUX_ARCH = "arm" ]; then
24 _EXTRA_CONFIGURE_ARGS=" --with-arm-float-abi=hard --with-arm-fpu=neon"
25 elif [ $TERMUX_ARCH = "i686" ]; then
27 elif [ $TERMUX_ARCH = "aarch64" ]; then
29 elif [ $TERMUX_ARCH = "x86_64" ]; then
32 echo "Unsupported arch: $TERMUX_ARCH"
37 --prefix=$TERMUX_PREFIX \
38 --dest-cpu=$DEST_CPU \
40 --shared-openssl --shared-zlib --shared-cares \
44 $_EXTRA_CONFIGURE_ARGS