summaryrefslogtreecommitdiffstats
path: root/testing/v8/APKBUILD
blob: f444439dbb083f0a5c4b1e71272af9d8c4c35df4 (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=v8
pkgver=3.9.9
pkgrel=0
pkgdesc="V8 JavaScript/ECMAScript Engine"
url="http://www.chromium.org/"
arch="x86 x86_64 arm"
license="BSD"
depends=""
depends_dev=""
makedepends="scons wget"
install=""
subpackages="$pkgname-dev"
source="http://gsdview.appspot.com/chromium-browser-official/v8-$pkgver.tar.bz2"

_builddir="$srcdir"/v8-$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"

	v8_arch=${CARCH}
	test ${CARCH} = x86 && v8_arch=ia32
	test ${CARCH} = x86_64 && v8_arch=x64

	msg "building for ${v8_arch}"

	export LINKFLAGS="${LDFLAGS}"

	scons -j$JOBS \
		library=shared \
		inspector=on \
		objectprint=on \
		console=readline \
		soname=on \
		arch=${v8_arch} \
		|| return 1
}

package() {
	cd "$_builddir"

	mkdir -p "$pkgdir"/usr/include
	cp include/* "$pkgdir"/usr/include

	mkdir -p "$pkgdir"/usr/lib
	install -c -m755 libv8-${pkgver}.so "$pkgdir"/usr/lib/libv8-${pkgver}.so
	ln -sf libv8-${pkgver}.so "$pkgdir"/usr/lib/libv8.so
}

md5sums="927f84585d99e83208dd58882e79764c  v8-3.9.9.tar.bz2"