mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-08 06:47:09 +02:00
73 lines
2.1 KiB
Plaintext
73 lines
2.1 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jose-Luis Rivas <ghostbar@riseup.net>
|
|
pkgname=nodejs-current
|
|
# The current stable version, i.e. non-LTS.
|
|
pkgver=9.1.0
|
|
pkgrel=0
|
|
pkgdesc="JavaScript runtime built on V8 engine - current stable version"
|
|
url="http://nodejs.org/"
|
|
arch="all"
|
|
license="MIT"
|
|
depends="ca-certificates"
|
|
depends_dev="libuv"
|
|
# gold is needed for mksnapshot
|
|
makedepends="$depends_dev python2 openssl-dev zlib-dev libuv-dev linux-headers
|
|
paxmark binutils-gold http-parser-dev ca-certificates c-ares-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"
|
|
builddir="$srcdir/node-v$pkgver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Remove bundled dependencies that we're not using.
|
|
rm -rf deps/http_parser deps/openssl deps/uv deps/zlib
|
|
}
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
|
|
./configure --prefix=/usr \
|
|
--shared-zlib \
|
|
--shared-libuv \
|
|
--shared-openssl \
|
|
--shared-http-parser \
|
|
--shared-cares \
|
|
--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="ed2d28db927e077ebc0bd8ffa87539a6efba1632b81d7fb93fbf2911a28d69354ca592c42bd9be77f860d5693359ec0de1d7077adf2d21194e646fceefcbcdb2 node-v9.1.0.tar.gz
|
|
ba95f21b1e80717ef63941854e7ed412f64a91da068c0dbf0d6d9697333ee266c9f4cd7bf1a01111eeb28aa66adefd8a58cfb3e82debb84b43e35e9dc914dd36 dont-run-gyp-files-for-bundled-deps.patch"
|