2011-12-19 15:19:28 +00:00
|
|
|
# Template file for 'v8'
|
|
|
|
pkgname=v8
|
2013-10-03 11:51:32 +00:00
|
|
|
_sonamever="3.20"
|
|
|
|
version=${_sonamever}.17.13
|
2013-08-21 10:14:51 +00:00
|
|
|
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-10-03 11:51:32 +00:00
|
|
|
checksum=472dcceb944685243b405ec131e3205ef5754110b0031c2cb135a44db6fa8755
|
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.
|
|
|
|
|
2013-10-03 08:46:09 +00:00
|
|
|
This package contains the v8 utilities and the d8 shell."
|
2011-12-19 15:19:28 +00:00
|
|
|
|
2013-10-03 11:51:32 +00:00
|
|
|
hostmakedepends="which python"
|
2013-04-17 08:47:05 +00:00
|
|
|
makedepends="readline-devel"
|
2011-12-19 15:19:28 +00:00
|
|
|
|
2012-11-05 22:02:21 +00:00
|
|
|
do_build() {
|
2013-10-03 11:51:32 +00:00
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
i686|x86_64) target="native";;
|
2013-04-17 08:47:05 +00:00
|
|
|
arm*)
|
2013-10-03 11:51:32 +00:00
|
|
|
sed -e "s/m32flag':.*/m32flag':'',/" -i build/toolchain.gypi
|
|
|
|
target="arm.release hardfp=on snapshot=off"
|
2013-04-17 08:47:05 +00:00
|
|
|
;;
|
2013-10-03 11:51:32 +00:00
|
|
|
*) msg_error "$pkgver: unknown target architecture!\n" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
LINK=${CXX} make ${makejobs} ${target} i18nsupport=off \
|
|
|
|
werror=no library=shared soname_version=${_sonamever} \
|
|
|
|
console=readline disassembler=on \
|
|
|
|
CXX.host=${CXX} CXX.link=${CXX} LINK.target=${CXX} \
|
|
|
|
BUILTYPE=Release
|
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
|
2013-10-03 11:51:32 +00:00
|
|
|
vinstall out/arm.release/lib.target/libv8.so.${_sonamever} 755 usr/lib
|
2013-04-17 08:47:05 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
# native build
|
|
|
|
vinstall out/native/d8 755 usr/bin
|
2013-10-03 11:51:32 +00:00
|
|
|
vinstall out/native/lib.target/libv8.so.${_sonamever} 755 usr/lib
|
2013-04-17 08:47:05 +00:00
|
|
|
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-10-03 11:51:32 +00:00
|
|
|
|
|
|
|
ln -sfr ${DESTDIR}/usr/lib/libv8.so.${_sonamever} ${DESTDIR}/usr/lib/libv8.so
|
2011-12-19 15:19:28 +00:00
|
|
|
}
|
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
|
2013-10-03 11:51:32 +00:00
|
|
|
vmove usr/lib/libv8.so
|
2013-04-14 14:51:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libv8_package() {
|
2013-08-21 10:14:51 +00:00
|
|
|
short_desc+=" - runtime library"
|
2013-04-14 14:51:01 +00:00
|
|
|
pkg_install() {
|
2013-10-03 11:51:32 +00:00
|
|
|
vmove usr/lib/libv8.so.${_sonamever}
|
2013-04-14 14:51:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
v8_package() {
|
|
|
|
pkg_install() {
|
2013-10-03 08:46:09 +00:00
|
|
|
vmove all
|
2013-04-14 14:51:01 +00:00
|
|
|
}
|
|
|
|
}
|