2011-12-19 15:19:28 +00:00
|
|
|
# Template file for 'v8'
|
|
|
|
pkgname=v8
|
2013-08-21 10:14:51 +00:00
|
|
|
version=3.19.18.4
|
|
|
|
revision=1
|
2011-12-19 15:19:28 +00:00
|
|
|
short_desc="V8 JavaScript Engine"
|
|
|
|
maintainer="davehome <davehome@redthumb.info.tm>"
|
|
|
|
homepage="http://code.google.com/p/v8/"
|
|
|
|
license="BSD"
|
2012-11-06 06:21:25 +00:00
|
|
|
distfiles="http://commondatastorage.googleapis.com/chromium-browser-official/v8-${version}.tar.bz2"
|
2013-08-21 10:14:51 +00:00
|
|
|
checksum=10d7a51ed2769b1c2a6311a30ed1967d0a1da3f522c90b9c00f25fbe0b1aba02
|
2011-12-19 15:19:28 +00:00
|
|
|
long_desc="
|
|
|
|
V8 is Google's open source JavaScript engine. V8 is written in C++ and is
|
|
|
|
used in Google Chrome, the open source browser from Google.
|
|
|
|
|
|
|
|
V8 implements ECMAScript as specified in ECMA-262, 5th edition, and runs on
|
|
|
|
Windows (XP or newer), Mac OS X (10.5 or newer), and Linux systems that use
|
|
|
|
IA-32, x64, or ARM processors.
|
|
|
|
|
|
|
|
V8 can run standalone, or can be embedded into any C++ application.
|
|
|
|
|
|
|
|
This package contains v8 the utilities mksnapshot and the d8 shell."
|
|
|
|
|
2013-04-17 08:47:05 +00:00
|
|
|
hostmakedepends="which subversion python"
|
|
|
|
makedepends="readline-devel"
|
2011-12-19 15:19:28 +00:00
|
|
|
|
2012-11-05 22:02:21 +00:00
|
|
|
do_build() {
|
2013-08-21 10:14:51 +00:00
|
|
|
export LINK="$CXX" LD="$CXX"
|
|
|
|
|
2013-04-17 08:47:05 +00:00
|
|
|
# TODO: add support to crosscompile for other targets.
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
arm*)
|
|
|
|
# NOTE: hardfp can be problematic if not hf is supported on target cpu
|
|
|
|
sed -e "s/m32flag':.*/m32flag':'',/" -i build/common.gypi
|
|
|
|
LINK="${CXX}" make V=1 ${makejobs} arm.release \
|
|
|
|
hardfp=on library=shared console=readline \
|
|
|
|
disassembler=on snapshot=off \
|
|
|
|
CXX.host=${CXX} CXX.link=${CXX} LINK.target="${CXX}"
|
|
|
|
;;
|
|
|
|
*) msg_error "$pkgver: cannot cross compile for ${XBPS_TARGET_MACHINE}.\n"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
# native build
|
|
|
|
make ${makejobs} native library=shared console=readline \
|
|
|
|
disassembler=on liveobjectlist=on
|
|
|
|
fi
|
2012-11-05 22:02:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2013-04-17 08:47:05 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
arm*)
|
|
|
|
vinstall out/arm.release/d8 755 usr/bin
|
|
|
|
vinstall out/arm.release/lib.target/lib${pkgname}.so 755 usr/lib
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
# native build
|
|
|
|
vinstall out/native/d8 755 usr/bin
|
|
|
|
vinstall out/native/lib.target/lib${pkgname}.so 755 usr/lib
|
|
|
|
fi
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
|
|
# mksnapshot only built in native builds.
|
2013-08-21 10:14:51 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
|
|
|
vinstall out/native/mksnapshot.x64 755 usr/bin mksnapshot
|
|
|
|
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
|
|
|
|
vinstall out/native/mksnapshot.ia32 755 usr/bin mksnapshot
|
|
|
|
fi
|
2013-04-17 08:47:05 +00:00
|
|
|
fi
|
|
|
|
|
2011-12-19 15:19:28 +00:00
|
|
|
vinstall include/${pkgname}-debug.h 644 usr/include
|
|
|
|
vinstall include/${pkgname}-preparser.h 644 usr/include
|
|
|
|
vinstall include/${pkgname}-profiler.h 644 usr/include
|
|
|
|
vinstall include/${pkgname}-testing.h 644 usr/include
|
|
|
|
vinstall include/${pkgname}.h 644 usr/include
|
|
|
|
vinstall include/${pkgname}stdint.h 644 usr/include
|
|
|
|
}
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
v8-devel_package() {
|
|
|
|
depends="libv8-${version}_${revision}"
|
2013-08-21 10:14:51 +00:00
|
|
|
short_desc+=" - development files"
|
2013-04-14 14:51:01 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libv8_package() {
|
2013-08-21 10:14:51 +00:00
|
|
|
short_desc+=" - runtime library"
|
2013-04-14 14:51:01 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
v8_package() {
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr
|
|
|
|
}
|
|
|
|
}
|