# Contributor: William Pitcock # Contributor: Jose-Luis Rivas # Maintainer: Eivind Uggedal pkgname=nodejs pkgver=4.3.1 pkgrel=0 pkgdesc='Evented I/O for V8 javascript' url='http://nodejs.org/' arch='all' license='MIT' # gold is needed for mksnapshot makedepends="$depends_dev python openssl-dev zlib-dev libuv-dev linux-headers paxmark binutils-gold" subpackages="$pkgname-dev $pkgname-doc" source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz" _builddir="$srcdir"/node-v$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" [ "$CARCH" = "armhf" ] && local _FPU="--with-arm-fpu=vfpv3-d16" ./configure --prefix=/usr \ --shared-zlib \ --shared-libuv \ $_FPU \ --shared-openssl \ || return 1 # we need run mksnapshot at build time so paxmark it early make -C out mksnapshot BUILDTYPE=Release \ && paxmark -m out/Release/mksnapshot \ && make || return 1 } package() { local d cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 # paxmark so JIT works paxmark -m "$pkgdir"/usr/bin/node || return 1 cp -pr "$pkgdir"/usr/lib/node_modules/npm/man "$pkgdir"/usr/share || return 1 for d in doc html man; do rm -r "$pkgdir"/usr/lib/node_modules/npm/$d || return 1 done } md5sums="d4eaaa7c139f13fc0168d9b5fbe13a0b node-v4.3.1.tar.gz" sha256sums="61e2d58e861b6c9dbf0ac7624b718198cbd59b88a9de31a39a05de95a32eee73 node-v4.3.1.tar.gz" sha512sums="156bee1237038a6d6029f96dba41e8673f8c2cce234b86a4197eb700b52e64bc8315f40fc9f321392ea21155216f944642dc7a35b2104a5c1836087f5ebb7b8e node-v4.3.1.tar.gz"