summaryrefslogtreecommitdiff
path: root/community/v8/PKGBUILD
blob: b89b9c469e708076d458887a6741f083d7430fe9 (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
# $Id: PKGBUILD 56586 2011-10-09 03:29:08Z tdziedzic $
# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: tocer <tocer.deng@gmail.com>

pkgname=v8
pkgver=3.6.5.1
pkgrel=1
pkgdesc='A fast and modern javascript engine'
arch=('i686' 'x86_64')
url='http://code.google.com/p/v8'
license=('BSD')
makedepends=('subversion' 'scons')

build() {
  _source="http://v8.googlecode.com/svn/tags/$pkgver"
  svn checkout "$_source" "$srcdir/$pkgname-$pkgver"

  cd "${srcdir}/${pkgname}-${pkgver}"

  [ "$CARCH" = 'i686' ]   && SCONS_ARCH=ia32
  [ "$CARCH" = 'x86_64' ] && SCONS_ARCH=x64

  scons mode=release library=shared arch=$SCONS_ARCH
  scons d8 arch=$SCONS_ARCH

  find include -type f \
    -exec install -Dm644 {} $pkgdir/usr/{} \;
  rm -rf $pkgdir/usr/include/.svn

  install -Dm755 d8 "$pkgdir/usr/bin/d8"
  install -Dm755 libv8.so "$pkgdir/usr/lib/libv8.so"
}