libpng: Update from 1.6.32 to 1.6.34
[termux-packages] / packages / nodejs / build.sh
CommitLineData
f4af89ed 1TERMUX_PKG_HOMEPAGE=https://nodejs.org/
59f0d218 2TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
a737a408 3TERMUX_PKG_VERSION=6.11.3
52741052 4TERMUX_PKG_REVISION=1
a737a408 5TERMUX_PKG_SHA256=c60562a7bc316f137297b7aa23ae354e3ac6779fe8ddf46fe43a75b6b92443e8
1189304e 6TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz
a27c409f
FF
7# Note that we do not use a shared libuv to avoid an issue with the Android
8# linker, which does not use symbols of linked shared libraries when resolving
9# symbols on dlopen(). See https://github.com/termux/termux-packages/issues/462.
10TERMUX_PKG_DEPENDS="openssl, c-ares"
59f0d218
FF
11TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace"
12TERMUX_PKG_BUILD_IN_SRC=yes
9179399d 13TERMUX_PKG_CONFLICTS="nodejs-current"
59f0d218
FF
14
15termux_step_configure () {
7e49911a
FF
16 # See https://github.com/nodejs/build/issues/266 about enabling snapshots
17 # when cross compiling. We use {CC,CXX}_host for compilation of code to
18 # be run on the build maching (snapshots when cross compiling are
19 # generated using a CPU emulator provided by v8) and {CC,CXX} for the
20 # cross compile. We unset flags such as CFLAGS as they would affect
21 # both the host and cross compiled build.
22 # Remaining issue to be solved before enabling snapshots by removing
23 # the --without-snapshot flag is that pkg-config picks up cross compilation
24 # flags which breaks the host build.
25 #export CC_host="gcc -pthread"
26 #export CXX_host="g++ -pthread"
27 #export CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS"
28 #export CXX="$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS"
29 #export CFLAGS="-Os"
30 #export CXXFLAGS="-Os"
31 #unset CPPFLAGS LDFLAGS
1224589f 32
59f0d218 33 if [ $TERMUX_ARCH = "arm" ]; then
1224589f 34 DEST_CPU="arm"
59f0d218 35 elif [ $TERMUX_ARCH = "i686" ]; then
1224589f 36 DEST_CPU="ia32"
d59a97b3 37 elif [ $TERMUX_ARCH = "aarch64" ]; then
1224589f 38 DEST_CPU="arm64"
d59a97b3 39 elif [ $TERMUX_ARCH = "x86_64" ]; then
1224589f 40 DEST_CPU="x64"
59f0d218 41 else
6a3364bf 42 termux_error_exit "Unsupported arch '$TERMUX_ARCH'"
59f0d218 43 fi
9ba78439 44
7e49911a 45 # See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv.
1224589f
FF
46 ./configure \
47 --prefix=$TERMUX_PREFIX \
48 --dest-cpu=$DEST_CPU \
49 --dest-os=android \
7e49911a
FF
50 --shared-cares \
51 --shared-openssl \
52 --shared-zlib \
658f8ce9 53 --without-inspector \
7e49911a
FF
54 --without-intl \
55 --without-snapshot
d53dc644 56}