2013-07-20 16:57:06 +00:00
|
|
|
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
|
|
|
|
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
|
2012-02-06 01:32:05 +00:00
|
|
|
# Contributor: tocer <tocer.deng@gmail.com>
|
2012-09-13 01:54:45 +00:00
|
|
|
# Contributor: WarheadsSE <max@warheads.net>
|
2012-02-06 01:32:05 +00:00
|
|
|
|
|
|
|
pkgname=v8
|
2013-07-20 16:57:06 +00:00
|
|
|
pkgver=3.19.18.4
|
2013-05-16 18:46:12 +00:00
|
|
|
pkgrel=1
|
2013-02-16 20:11:14 +00:00
|
|
|
pkgdesc='Fast and modern javascript engine'
|
2012-02-06 01:32:05 +00:00
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url='http://code.google.com/p/v8'
|
|
|
|
license=('BSD')
|
|
|
|
depends=('gcc-libs')
|
2012-08-06 09:52:09 +00:00
|
|
|
makedepends=('subversion' 'python2')
|
2013-05-17 01:45:04 +00:00
|
|
|
source=(http://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.bz2)
|
2013-07-20 16:57:06 +00:00
|
|
|
sha256sums=('10d7a51ed2769b1c2a6311a30ed1967d0a1da3f522c90b9c00f25fbe0b1aba02')
|
2012-02-06 01:32:05 +00:00
|
|
|
|
2013-05-16 18:46:12 +00:00
|
|
|
prepare() {
|
|
|
|
cd $pkgname-$pkgver
|
2013-01-24 23:05:46 +00:00
|
|
|
# _source="http://v8.googlecode.com/svn/tags/${pkgver}"
|
|
|
|
# svn checkout "$_source" "${srcdir}/v8-${pkgver}"
|
2012-02-06 01:32:05 +00:00
|
|
|
|
|
|
|
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!
|
2012-08-07 02:14:51 +00:00
|
|
|
# There is still a bug in the V8::internals::string
|
2012-08-06 09:52:09 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS -march=armv5t -mno-unaligned-access" ;
|
2012-08-07 02:14:51 +00:00
|
|
|
GYPFLAGS="-Darmeabi=soft -Dv8_can_use_vfp_instructions=false -Dv8_can_use_unaligned_accesses=false -Darmv7=0"
|
|
|
|
VFP3=off
|
2012-09-13 01:54:45 +00:00
|
|
|
VFP2=off
|
2012-02-06 01:32:05 +00:00
|
|
|
fi
|
2012-07-29 19:14:17 +00:00
|
|
|
if [ "$CARCH" == "armv6h" ]; then
|
2012-09-13 01:54:45 +00:00
|
|
|
GYPFLAGS="-Darmeabi=hard -Dv8_use_arm_eabi_hardfloat=true -Dv8_can_use_vfp_instructions=false -Dv8_can_use_vfp2_instructions=true -Darm7=0 -Darm_vfp=vfp"
|
2012-08-07 02:14:51 +00:00
|
|
|
VFP3=off
|
2012-09-13 01:54:45 +00:00
|
|
|
VFP2=on
|
2012-07-29 19:14:17 +00:00
|
|
|
fi
|
2012-02-06 01:32:05 +00:00
|
|
|
if [ "$CARCH" == "armv7h" ]; then
|
2012-09-13 01:54:45 +00:00
|
|
|
GYPFLAGS="-Darmeabi=hard -Dv8_use_arm_eabi_hardfloat=true -Dv8_can_use_vfp_instructions=true -Dv8_can_use_vfp2_instructions=true -Darm7=1"
|
2012-08-07 02:14:51 +00:00
|
|
|
VFP3=on
|
2012-09-13 01:54:45 +00:00
|
|
|
VFP2=on
|
2012-02-06 01:32:05 +00:00
|
|
|
fi
|
2012-08-07 02:14:51 +00:00
|
|
|
export GYPFLAGS
|
|
|
|
export CXXFLAGS ;
|
2012-02-06 01:32:05 +00:00
|
|
|
|
2012-08-06 09:52:09 +00:00
|
|
|
# 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 ;
|
2013-05-16 18:46:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $pkgname-$pkgver
|
2012-08-06 09:52:09 +00:00
|
|
|
# gets gyp
|
|
|
|
make dependencies
|
2012-08-07 02:14:51 +00:00
|
|
|
# make arm.release & arm.debug = just arm
|
2013-05-16 18:46:12 +00:00
|
|
|
make arm.release library=shared snapshot=off vfp3=$VFP3 vfp=$VFP2 werror=no
|
2012-08-06 09:52:09 +00:00
|
|
|
# eo build
|
2013-02-16 20:11:14 +00:00
|
|
|
|
|
|
|
cd $srcdir && cp -r $pkgname-$pkgver d8-static-$pkgver
|
|
|
|
cd d8-static-$pkgver
|
2013-05-16 18:46:12 +00:00
|
|
|
make arm.release library=static snapshot=off vfp3=$VFP3 vfp=$VFP2 werror=no
|
2012-08-06 09:52:09 +00:00
|
|
|
}
|
2012-08-07 02:14:51 +00:00
|
|
|
|
2012-08-06 09:52:09 +00:00
|
|
|
# seperated to possibly split v8-debug in the future.
|
|
|
|
package (){
|
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
|
2012-02-06 01:32:05 +00:00
|
|
|
find include -type f \
|
|
|
|
-exec install -Dm644 {} ${pkgdir}/usr/{} \;
|
|
|
|
rm -rf ${pkgdir}/usr/include/.svn
|
2012-08-06 09:52:09 +00:00
|
|
|
|
|
|
|
# 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
|
2013-02-24 21:56:17 +00:00
|
|
|
install -Dm755 $srcdir/d8-static-$pkgver/out/arm.release/d8 $pkgdir/usr/bin/d8
|
2012-08-06 09:52:09 +00:00
|
|
|
install -Dm755 out/arm.release/lib.target/libv8.so "${pkgdir}/usr/lib/libv8.so"
|
2012-02-06 01:32:05 +00:00
|
|
|
|
|
|
|
install -d ${pkgdir}/usr/share/licenses/v8
|
2012-04-11 03:02:47 +00:00
|
|
|
install -m644 LICENSE* ${pkgdir}/usr/share/licenses/v8
|
2012-02-06 01:32:05 +00:00
|
|
|
}
|