Commit | Line | Data |
---|---|---|
59f0d218 FF |
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" | |
456b172e | 3 | TERMUX_PKG_VERSION=6.0.0 |
49f47ae0 | 4 | TERMUX_PKG_BUILD_REVISION=3 |
1189304e | 5 | TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz |
928e1510 | 6 | TERMUX_PKG_DEPENDS="openssl, libuv, libgnustl, c-ares" |
59f0d218 FF |
7 | TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace" |
8 | TERMUX_PKG_BUILD_IN_SRC=yes | |
9 | ||
10 | termux_step_configure () { | |
1224589f FF |
11 | # https://github.com/nodejs/build/issues/266: "V8 can handle cross compiling of |
12 | # snapshots if the {CC,CXX}_host variables are defined, by compiling the | |
13 | # mksnapshot executable with the host compiler". But this currently fails | |
14 | # due to the host build picking up targets flags. | |
15 | export CC_host=gcc | |
16 | export CXX_host=g++ | |
17 | ||
928e1510 | 18 | local _EXTRA_CONFIGURE_ARGS="" |
59f0d218 | 19 | if [ $TERMUX_ARCH = "arm" ]; then |
1224589f | 20 | DEST_CPU="arm" |
928e1510 | 21 | _EXTRA_CONFIGURE_ARGS=" --with-arm-float-abi=hard --with-arm-fpu=neon" |
59f0d218 | 22 | elif [ $TERMUX_ARCH = "i686" ]; then |
1224589f | 23 | DEST_CPU="ia32" |
d59a97b3 | 24 | elif [ $TERMUX_ARCH = "aarch64" ]; then |
1224589f | 25 | DEST_CPU="arm64" |
d59a97b3 | 26 | elif [ $TERMUX_ARCH = "x86_64" ]; then |
1224589f | 27 | DEST_CPU="x64" |
59f0d218 FF |
28 | else |
29 | echo "Unsupported arch: $TERMUX_ARCH" | |
30 | exit 1 | |
31 | fi | |
9ba78439 | 32 | |
1224589f FF |
33 | ./configure \ |
34 | --prefix=$TERMUX_PREFIX \ | |
35 | --dest-cpu=$DEST_CPU \ | |
36 | --dest-os=android \ | |
928e1510 FF |
37 | --shared-openssl --shared-zlib --shared-libuv --shared-cares \ |
38 | --without-snapshot \ | |
39 | $_EXTRA_CONFIGURE_ARGS | |
d53dc644 | 40 | } |