summaryrefslogtreecommitdiff
path: root/community/v8/PKGBUILD
blob: 3c8fffb2cd247c96be02fb6441f3af7e86e9bd4b (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
# $Id: PKGBUILD 75499 2012-08-26 09:56:04Z jelle $
# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: tocer <tocer.deng@gmail.com>

pkgname=v8
pkgver=3.13.0
pkgrel=1
pkgdesc='A fast and modern javascript engine'
arch=('i686' 'x86_64')
url='http://code.google.com/p/v8'
license=('BSD')
depends=('gcc-libs')
makedepends=('scons')
source=("v8.tar.gz::https://github.com/v8/v8/tarball/$pkgver")
md5sums=('55878a54d5dc5674a5ade223d55965f6')

build() {

  cd $srcdir/$pkgname-$pkgname-*

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

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

}

package() {
  cd ${srcdir}/${pkgname}-$pkgname-*

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

  # Include headers
  install -d $pkgdir/usr/include
  install -Dm755 include/*.h $pkgdir/usr/include

  install -d ${pkgdir}/usr/share/licenses/v8
  install -m644 LICENSE* ${pkgdir}/usr/share/licenses/v8
}