mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 08:51:25 +02:00
97 lines
2.7 KiB
Plaintext
97 lines
2.7 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jose-Luis Rivas <ghostbar@riseup.net>
|
|
#
|
|
# secfixes:
|
|
# 11.3.0-r0:
|
|
# - CVE-2018-12121
|
|
# - CVE-2018-12122
|
|
# - CVE-2018-12123
|
|
# - CVE-2018-0735
|
|
# - CVE-2018-0734
|
|
# 9.10.0-r0:
|
|
# - CVE-2018-7158
|
|
# - CVE-2018-7159
|
|
# - CVE-2018-7160
|
|
# 9.2.1-r0:
|
|
# - CVE-2017-15896
|
|
# - CVE-2017-15897
|
|
#
|
|
pkgname=nodejs-current
|
|
# The current stable version, i.e. non-LTS.
|
|
pkgver=11.9.0
|
|
pkgrel=0
|
|
pkgdesc="JavaScript runtime built on V8 engine - current stable version"
|
|
url="https://nodejs.org/"
|
|
arch="all !mips64 !mips64el"
|
|
license="MIT"
|
|
depends="ca-certificates"
|
|
depends_dev="libuv"
|
|
makedepends="linux-headers python2 paxmark
|
|
zlib-dev libuv-dev openssl-dev c-ares-dev nghttp2-dev"
|
|
subpackages="$pkgname-dev $pkgname-doc"
|
|
provides="nodejs"
|
|
replaces="nodejs nodejs-lts" # nodejs-lts for backward compatibility
|
|
source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
|
|
dont-run-gyp-files-for-bundled-deps.patch
|
|
link-with-libatomic-on-mips32.patch
|
|
"
|
|
builddir="$srcdir/node-v$pkgver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Remove bundled dependencies that we're not using.
|
|
rm -rf deps/cares deps/openssl deps/uv deps/zlib
|
|
}
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
|
|
case "$CARCH" in
|
|
mips*) _carchflags="--with-mips-arch-variant=r1 --with-mips-float-abi=soft";;
|
|
esac
|
|
|
|
./configure --prefix=/usr \
|
|
$_carchflags \
|
|
--shared-zlib \
|
|
--shared-libuv \
|
|
--shared-openssl \
|
|
--experimental-http-parser \
|
|
--shared-cares \
|
|
--shared-nghttp2 \
|
|
--openssl-use-def-ca-store
|
|
|
|
# we need run mksnapshot at build time so paxmark it early.
|
|
make -C out mksnapshot BUILDTYPE=Release
|
|
paxmark -m out/Release/mksnapshot
|
|
make
|
|
|
|
# paxmark so JIT works
|
|
paxmark -m out/Release/node
|
|
}
|
|
|
|
# TODO Run provided test suite.
|
|
check() {
|
|
cd "$builddir"/out/Release
|
|
|
|
./node -e 'console.log("Hello, world!")'
|
|
./node -e "require('assert').equal(process.versions.node, '$pkgver')"
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# It's strange, but it really needs to be paxmarked again...
|
|
paxmark -m "$pkgdir"/usr/bin/node
|
|
|
|
# Remove npm, it's provided by main/nodejs package.
|
|
rm -r "$pkgdir"/usr/lib/node_modules
|
|
rm "$pkgdir"/usr/bin/npm "$pkgdir"/usr/bin/npx
|
|
}
|
|
|
|
sha512sums="3f64a984e4aec7f2a283dc1610175e780ee108a0fc96b13d03f3c1fda4a69c2b867c32d3dba04c5149c44d9669ebc889c0279eb942e99e23a4136b33e4dc1ce7 node-v11.9.0.tar.gz
|
|
3697009ae7bf90e7a83da33eac915de9cb32680cafc8003e727540f98942312699e0ee2ebf3014dea15b1f4bcf93f983eec521ad86d75073664c64f5fdeea84d dont-run-gyp-files-for-bundled-deps.patch
|
|
adba24239eb8ccb1d27664e9a8b2af0992e2b7b59d03d67bd18598bf0a266f1b572e312980face891f93fad0330488e2af1ab8f524c1798746adb64bed994831 link-with-libatomic-on-mips32.patch"
|