Commit | Line | Data |
---|---|---|
f4af89ed | 1 | TERMUX_PKG_HOMEPAGE=https://nodejs.org/ |
59f0d218 | 2 | TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications" |
6134213e | 3 | TERMUX_PKG_VERSION=6.10.2 |
1189304e | 4 | TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz |
6134213e | 5 | TERMUX_PKG_SHA256=9b897dd6604d50ae5fff25fd14b1c4035462d0598735799e0cfb4f17cb6e0d19 |
a27c409f FF |
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" | |
59f0d218 FF |
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 | |
12 | ||
13 | termux_step_configure () { | |
7e49911a FF |
14 | # See https://github.com/nodejs/build/issues/266 about enabling snapshots |
15 | # when cross compiling. We use {CC,CXX}_host for compilation of code to | |
16 | # be run on the build maching (snapshots when cross compiling are | |
17 | # generated using a CPU emulator provided by v8) and {CC,CXX} for the | |
18 | # cross compile. We unset flags such as CFLAGS as they would affect | |
19 | # both the host and cross compiled build. | |
20 | # Remaining issue to be solved before enabling snapshots by removing | |
21 | # the --without-snapshot flag is that pkg-config picks up cross compilation | |
22 | # flags which breaks the host build. | |
23 | #export CC_host="gcc -pthread" | |
24 | #export CXX_host="g++ -pthread" | |
25 | #export CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS" | |
26 | #export CXX="$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS" | |
27 | #export CFLAGS="-Os" | |
28 | #export CXXFLAGS="-Os" | |
29 | #unset CPPFLAGS LDFLAGS | |
1224589f | 30 | |
59f0d218 | 31 | if [ $TERMUX_ARCH = "arm" ]; then |
1224589f | 32 | DEST_CPU="arm" |
59f0d218 | 33 | elif [ $TERMUX_ARCH = "i686" ]; then |
1224589f | 34 | DEST_CPU="ia32" |
d59a97b3 | 35 | elif [ $TERMUX_ARCH = "aarch64" ]; then |
1224589f | 36 | DEST_CPU="arm64" |
d59a97b3 | 37 | elif [ $TERMUX_ARCH = "x86_64" ]; then |
1224589f | 38 | DEST_CPU="x64" |
59f0d218 | 39 | else |
6a3364bf | 40 | termux_error_exit "Unsupported arch '$TERMUX_ARCH'" |
59f0d218 | 41 | fi |
9ba78439 | 42 | |
7e49911a | 43 | # See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv. |
1224589f FF |
44 | ./configure \ |
45 | --prefix=$TERMUX_PREFIX \ | |
46 | --dest-cpu=$DEST_CPU \ | |
47 | --dest-os=android \ | |
7e49911a FF |
48 | --shared-cares \ |
49 | --shared-openssl \ | |
50 | --shared-zlib \ | |
658f8ce9 | 51 | --without-inspector \ |
7e49911a FF |
52 | --without-intl \ |
53 | --without-snapshot | |
d53dc644 | 54 | } |