PKGBUILDs/community/v8/PKGBUILD

47 lines
1.3 KiB
Bash
Raw Normal View History

# $Id: PKGBUILD 62986 2012-01-30 06:42:07Z tdziedzic $
# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: tocer <tocer.deng@gmail.com>
pkgname=v8
2012-04-11 03:02:47 +00:00
pkgver=3.9.9
pkgrel=1
plugrel=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=('subversion' 'scons')
build() {
_source="http://v8.googlecode.com/svn/tags/${pkgver}"
svn checkout "$_source" "${srcdir}/v8-${pkgver}"
cd "${srcdir}/${pkgname}-${pkgver}"
if [ "$CARCH" == "arm" ]; then
msg 'pre-compiling v8 for v5'
# we need to override the arch (last one will be used) because
# v8 thinks armv5te can use unaligned.. the kirkwood can't!
CCFLAGS="$CCFLAGS -march=armv5t" ;
export CCFLAGS ;
CARCH_V8="armeabi=soft"
fi
if [ "$CARCH" == "armv7h" ]; then
CARCH_V8="armeabi=hard vfpv3=on"
fi
scons mode=release library=shared arch=arm snapshot=off $CARCH_V8
scons d8 arch=arm $CARCH_V8
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"
install -d ${pkgdir}/usr/share/licenses/v8
2012-04-11 03:02:47 +00:00
install -m644 LICENSE* ${pkgdir}/usr/share/licenses/v8
}