blob: 3b143616ac565af4e1aa5e94712adf40012417ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Maintainer: Jose-Luis Rivas <ghostbar@riseup.net>
#
# secfixes:
# 6.7.0-r1:
# - CVE-2017-1000381
#
pkgname=nodejs
pkgver=6.7.0
pkgrel=1
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"
replaces="nodejs-lts"
source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
disable-v8-snapshots.patch
CVE-2017-1000381.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"
./configure --prefix=/usr \
--shared-zlib \
--shared-libuv \
--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="a42b7ab2bcf5f8d94a432163d90f3026 node-v6.7.0.tar.gz
23bd858b655aa1fc02cbc0fa0be10373 disable-v8-snapshots.patch
50254b0414ef2c8714bb6c33e2f6b465 CVE-2017-1000381.patch"
sha256sums="02b8ee1719a11b9ab22bef9279519efaaf31dd0d39cba4c3a1176ccda400b8d6 node-v6.7.0.tar.gz
349cc25ff1f4b9df3f20923abffe348eda927d796ea02cbc50904e684b13e790 disable-v8-snapshots.patch
13a6636d71c834b75e939755e37271542dfceeddd4fb0d74bfa01d949a201d76 CVE-2017-1000381.patch"
sha512sums="3cd095adc0866b780519006098b434e3b126f67a453e44863c773829de4ce29f573d13efa1c50af001009bdb433728309ef7109e144517ffc5dd5e3251b1f511 node-v6.7.0.tar.gz
45fa75c663edfa67aaebd49d85999af4cbe730b4dd931d9f799d7c26ad389569b1af340c4e54cefffe282cf9e20ba326212590cc4578a6b1fe9d9f148aeb6767 disable-v8-snapshots.patch
57738244c3b0484f24a0082cf3f1d582dead809a3962e89a692c288829c4a4e5dd60695dbe6a76081db1dbc92bf6f9dcfaff892b99f9985aff5d4231d9a13145 CVE-2017-1000381.patch"
|