void-packages/srcpkgs/v8/template

75 lines
2 KiB
Text
Raw Normal View History

2011-12-19 15:19:28 +00:00
# Template file for 'v8'
pkgname=v8
2014-03-08 01:56:35 +00:00
_sonamever="3.23"
version=${_sonamever}.17.13
2014-03-08 01:56:35 +00:00
revision=1
2014-02-16 10:25:33 +00:00
hostmakedepends="which python"
makedepends="readline-devel>=6.3"
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"
2014-03-08 01:56:35 +00:00
checksum=4b826735d182e9615fd9259e3f5d008c4f53d98c9f3531a6af75f00bd07be0b1
2011-12-19 15:19:28 +00:00
2012-11-05 22:02:21 +00:00
do_build() {
case "${XBPS_TARGET_MACHINE}" in
i686|x86_64) target="native";;
arm*)
sed -e "s/m32flag':.*/m32flag':'',/" -i build/toolchain.gypi
target="arm.release hardfp=on snapshot=off"
;;
*) 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() {
if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in
arm*)
vinstall out/arm.release/d8 755 usr/bin
vinstall out/arm.release/lib.target/libv8.so.${_sonamever} 755 usr/lib
;;
esac
else
# native build
vinstall out/native/d8 755 usr/bin
vinstall out/native/lib.target/libv8.so.${_sonamever} 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
fi
vmkdir usr/include
vcopy 'include/v8*.h' usr/include
ln -sfr ${DESTDIR}/usr/lib/libv8.so.${_sonamever} ${DESTDIR}/usr/lib/libv8.so
2011-12-19 15:19:28 +00:00
}
v8-devel_package() {
depends="libv8-${version}_${revision}"
2013-08-21 10:14:51 +00:00
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/libv8.so
}
}
libv8_package() {
2013-08-21 10:14:51 +00:00
short_desc+=" - runtime library"
pkg_install() {
vmove usr/lib/libv8.so.${_sonamever}
}
}