chiark / gitweb /
nodejs: Update from 8.9.0 to 8.9.1
[termux-packages] / packages / nodejs-current / build.sh
1 TERMUX_PKG_HOMEPAGE=https://nodejs.org/
2 TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
3 TERMUX_PKG_VERSION=9.0.0
4 TERMUX_PKG_REVISION=1
5 TERMUX_PKG_SHA256=5b52bd6a90a611a42e11a908022ccfc1c2e77dcc70bfe38054a18dc57a3d5fa5
6 TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
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.
10 TERMUX_PKG_DEPENDS="openssl, c-ares"
11 TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace"
12 TERMUX_PKG_BUILD_IN_SRC=yes
13 TERMUX_PKG_CONFLICTS="nodejs"
14
15 termux_step_configure () {
16         if [ $TERMUX_ARCH = "arm" ]; then
17                 DEST_CPU="arm"
18         elif [ $TERMUX_ARCH = "i686" ]; then
19                 DEST_CPU="ia32"
20         elif [ $TERMUX_ARCH = "aarch64" ]; then
21                 DEST_CPU="arm64"
22         elif [ $TERMUX_ARCH = "x86_64" ]; then
23                 DEST_CPU="x64"
24         else
25                 termux_error_exit "Unsupported arch '$TERMUX_ARCH'"
26         fi
27
28         export GYP_DEFINES="host_os=linux"
29
30         # See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv.
31         ./configure \
32                 --prefix=$TERMUX_PREFIX \
33                 --dest-cpu=$DEST_CPU \
34                 --dest-os=android \
35                 --shared-cares \
36                 --shared-openssl \
37                 --shared-zlib \
38                 --without-inspector \
39                 --without-intl \
40                 --without-snapshot \
41                 --cross-compiling
42 }