# $Id: PKGBUILD 62986 2012-01-30 06:42:07Z tdziedzic $ # Maintainer: Kaiting Chen # Contributor: tocer pkgname=v8 pkgver=3.11.10 pkgrel=2 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' 'python2') build() { _source="http://v8.googlecode.com/svn/tags/${pkgver}" svn checkout "$_source" "${srcdir}/v8-${pkgver}" cd "${srcdir}/${pkgname}-${pkgver}" if [ "$CARCH" == "arm" ]; then # we need to override the arch (last one will be used) because # v8 thinks armv5te can use unaligned.. the kirkwood can't! # We'll also beat it over the head. CXXFLAGS="$CXXFLAGS -march=armv5t -mno-unaligned-access" ; export CXXFLAGS ; GYP_FLAGS="-Darmeabi=soft " VFP=off fi if [ "$CARCH" == "armv6h" ]; then GYP_FLAGS="-Darmeabi=hard " VFP=off fi if [ "$CARCH" == "armv7h" ]; then GYP_FLAGS="-Darmeabi=hard " VFP=on fi # short-cutting python=python2 for GYP, as it will only be used here. export PYTHON=python2 if [ ! -f "${srcdir}/python" ]; then ln -s `which python2` ${srcdir}/python ; fi PATH="${srcdir}:$PATH"; export PATH ; # gets gyp make dependencies # make # arm.release & arm.debug = just arm GYP_FLAGS=$GYP_FLAGS make arm.release library=shared snapshot=off vfp3=$VFP # eo build } # seperated to possibly split v8-debug in the future. package (){ cd "${srcdir}/${pkgname}-${pkgver}" find include -type f \ -exec install -Dm644 {} ${pkgdir}/usr/{} \; rm -rf ${pkgdir}/usr/include/.svn # these barf, need updated. # src/v8-3.11.10/out/arm.release/d8 # src/v8-3.11.10/out/arm.release/lib.target/libv8.so install -Dm755 out/arm.release/d8 "${pkgdir}/usr/bin/d8" install -Dm755 out/arm.release/lib.target/libv8.so "${pkgdir}/usr/lib/libv8.so" install -d ${pkgdir}/usr/share/licenses/v8 install -m644 LICENSE* ${pkgdir}/usr/share/licenses/v8 }