# Contributor: William Pitcock # Maintainer: Eivind Uggedal pkgname=nodejs pkgver=4.3.0 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="http://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz issue-4221.patch" _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="1134e19fba49fe1d1dc0fb4e11a4ccbd node-v4.3.0.tar.gz d5e343fc9d1da1718ec15280b290b4a1 issue-4221.patch" sha256sums="18504ac6d903cd061f60a29dafcda416a078112f3404d23a7901c41a8e9706b9 node-v4.3.0.tar.gz 4e241e38c96629a4d96b19c99bd9c82da86a766aa53a08f4b1bb3d90a7ec7eee issue-4221.patch" sha512sums="e4e60ed6d4556190028b04be2034c49f33fb5ac82baf4c7f005704788cfbc7b9bf1ea4b75c792a96115c24b93f04d0e9d095ffcbc88d2e2863dfaae225db4836 node-v4.3.0.tar.gz 36f91895bb339e0e386b4c2da9bca7eb5051083761ff66a61483fcc76b75e76b5e1a405e56ab4b39e53e3ee47d9cac5b7d949c42c1e7d919ee279fe8505dc58e issue-4221.patch"