updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / v8-current / PKGBUILD
blobdecf6de3b0721babde750dabf2f5c54f4198f17c
1 pkgname=v8-current
2 pkgver=latest
3 pkgrel=1
4 pkgdesc='A fast and modern javascript engine'
5 arch=('i686' 'x86_64' 'arm')
6 url='http://code.google.com/p/v8'
7 license=('BSD')
8 makedepends=('subversion' 'scons')
9 conflicts=('v8')
10 provides=('v8')
11 source=('werror.patch')
12 md5sums=('fd95683b3b9f389a11391d83e1b5cfb8')
14 _svntrunk=http://v8.googlecode.com/svn/branches/bleeding_edge/
15 _svnmod=v8
17 build() {
18   cd "$srcdir"
19   if [[ -d "$_svnmod/.svn" ]]; then
20     (cd "$_svnmod" && svn up -r "$pkgver")
21   else
22     svn co "$_svntrunk" "$_svnmod"
23   fi
24   rm -rf "$srcdir/$_svnmod-build"
25   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
26   cd "$srcdir/$_svnmod-build"
28   # https://github.com/joyent/node/issues/1377
29   patch -Np1 -i $srcdir/werror.patch
30   
31   [ "$CARCH" = 'i686' ]   && SCONS_ARCH=ia32
32   [ "$CARCH" = 'x86_64' ] && SCONS_ARCH=x64
34   scons mode=release library=shared arch=$SCONS_ARCH
35   scons d8 arch=$SCONS_ARCH
37 package(){
38   cd "$srcdir/$_svnmod-build"
39   find include -type f -exec install -Dm644 {} $pkgdir/usr/{} \;
40   rm -rf $pkgdir/usr/include/.svn
41   install -Dm755 d8 "$pkgdir/usr/bin/d8"
42   install -Dm755 libv8.so "$pkgdir/usr/lib/libv8.so"