APKBUILD 2.57 KB
Newer Older
Ariadne Conill's avatar
Ariadne Conill committed
1 2 3
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=v8
4
pkgver=3.26.31.15
5
pkgrel=3
Ariadne Conill's avatar
Ariadne Conill committed
6 7 8 9
pkgdesc="V8 JavaScript/ECMAScript Engine"
url="http://www.chromium.org/"
arch="x86 x86_64 arm"
license="BSD"
10 11
depends="readline icu"
depends_dev="icu-dev readline-dev"
Timo Teräs's avatar
Timo Teräs committed
12
makedepends="${depends_dev} python paxmark"
Ariadne Conill's avatar
Ariadne Conill committed
13 14
install=""
subpackages="$pkgname-dev"
15
# look for updates: http://gsdview.appspot.com/chromium-browser-official/?marker=v8-3.30.22.tar.bz2.hashe%40
16 17
source="http://gsdview.appspot.com/chromium-browser-official/v8-$pkgver.tar.bz2
	v8.pc"
Ariadne Conill's avatar
Ariadne Conill committed
18 19

_builddir="$srcdir"/v8-$pkgver
20

21 22
[ "$CARCH" = 'x86' ] && ARCH=ia32
[ "$CARCH" = 'x86_64' ] && ARCH=x64
23

Ariadne Conill's avatar
Ariadne Conill committed
24 25 26 27 28 29 30 31
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
32 33 34 35 36 37 38 39
	find build/ test/ tools/ src/ -type f -exec \
		sed -e 's_^#!/usr/bin/env python$_&2_' \
		    -e 's_^#!/usr/bin/python$_&2_' \
		    -e "s_'python'_'python2'_" -i {} \;
	
	sed 's/\bpython\b/python2/' -i Makefile build/gyp/gyp

	sed "s/@VERSION@/$pkgver/g" -i "$srcdir/v8.pc"
Ariadne Conill's avatar
Ariadne Conill committed
40 41 42 43
}

build() {
	cd "$_builddir"
44 45
	local paxflags="-m"
	[ "$CARCH" = "x86" ] && paxflags="-msp"
Ariadne Conill's avatar
Ariadne Conill committed
46

47 48 49
	msg "Start building..."
	build/gyp_v8 -Dv8_enable_i18n_support=1 -Duse_system_icu=1 -Dconsole=readline -Dcomponent=shared_library -Dv8_target_arch=$ARCH -Dwerror= --generator-output=out -f make
	make -C out builddir=$(pwd)/out/Release BUILDTYPE=Release mksnapshot.$ARCH
Timo Teräs's avatar
Timo Teräs committed
50
	paxmark "$paxflags" out/Release/mksnapshot.$ARCH
51
	make -C out builddir=$(pwd)/out/Release BUILDTYPE=Release
Ariadne Conill's avatar
Ariadne Conill committed
52 53 54 55 56

}

package() {
	cd "$_builddir"
57 58 59 60 61 62 63 64 65
	
	install -Dm755 out/Release/d8 "$pkgdir"/usr/bin/d8
	install -Dm755 out/Release/lib.target/libv8.so "$pkgdir"/usr/lib/libv8.so

	install -d "$pkgdir"/usr/include
	install -Dm644 include/*.h "$pkgdir"/usr/include

	install -d "$pkgdir"/usr/lib/pkgconfig
	install -m644 "$srcdir/v8.pc" "$pkgdir"/usr/lib/pkgconfig
Ariadne Conill's avatar
Ariadne Conill committed
66

67 68
	install -d "$pkgdir"/usr/share/licenses/v8
	install -m644 LICENSE* "$pkgdir"/usr/share/licenses/v8
Ariadne Conill's avatar
Ariadne Conill committed
69 70 71

}

Natanael Copa's avatar
Natanael Copa committed
72
md5sums="e206a825dffb468bb5b15ed32786c306  v8-3.26.31.15.tar.bz2
73
082724bc560e90d846c0aa441847020c  v8.pc"
Natanael Copa's avatar
Natanael Copa committed
74
sha256sums="1455d3d9d25771d9fc6fdecd33d07133946d3350b4280abb3f5df293a199f718  v8-3.26.31.15.tar.bz2
75
2b054309df9af9fb2e3e14527e88360b44745649b4866e592fb357ac90935f5d  v8.pc"
Natanael Copa's avatar
Natanael Copa committed
76
sha512sums="7d980192e34ac668b2847e435bf5939791614c7bb01782a5ec2f217ea30f06b728d21c80fc6e09a5568ead117a93ec450e3fa2a261ee68cdbe25a3d4f0ad0134  v8-3.26.31.15.tar.bz2
77
67848ce85a6e4b674cf8775a21e687884530748a0296a2259373636729c9a230a27b7ebfbf5fafff3c1e9c102956246ec4eb744853e564fc8337b42a125aeea8  v8.pc"