2011-12-19 16:19:28 +01:00
|
|
|
# Template file for 'v8'
|
|
|
|
pkgname=v8
|
2014-03-08 02:56:35 +01:00
|
|
|
_sonamever="3.23"
|
2013-10-03 13:51:32 +02:00
|
|
|
version=${_sonamever}.17.13
|
2014-03-08 02:56:35 +01:00
|
|
|
revision=1
|
2014-02-16 11:25:33 +01:00
|
|
|
hostmakedepends="which python"
|
2014-02-27 14:54:19 +01:00
|
|
|
makedepends="readline-devel>=6.3"
|
2011-12-19 16:19:28 +01:00
|
|
|
short_desc="V8 JavaScript Engine"
|
|
|
|
maintainer="davehome <davehome@redthumb.info.tm>"
|
|
|
|
homepage="http://code.google.com/p/v8/"
|
|
|
|
license="BSD"
|
2012-11-06 07:21:25 +01:00
|
|
|
distfiles="http://commondatastorage.googleapis.com/chromium-browser-official/v8-${version}.tar.bz2"
|
2014-03-08 02:56:35 +01:00
|
|
|
checksum=4b826735d182e9615fd9259e3f5d008c4f53d98c9f3531a6af75f00bd07be0b1
|
2014-03-09 18:44:53 +01:00
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
x86_64) _target="x64";;
|
|
|
|
i686) _target="ia32";;
|
|
|
|
arm*) _target="arm"; _opts="hardfp=on snapshot=off";;
|
|
|
|
*) msg_error "$pkgver: unknown target architecture!\n" ;;
|
|
|
|
esac
|
2011-12-19 16:19:28 +01:00
|
|
|
|
2012-11-05 23:02:21 +01:00
|
|
|
do_build() {
|
2014-03-09 18:44:53 +01:00
|
|
|
if [ $_target = arm ]; then
|
|
|
|
sed -e "s/m32flag':.*/m32flag':'',/" -i build/toolchain.gypi
|
|
|
|
fi
|
2013-10-03 13:51:32 +02:00
|
|
|
|
2014-03-09 18:44:53 +01:00
|
|
|
LINK=${CXX} make ${makejobs} ${_target} ${_opts} i18nsupport=off \
|
2013-10-03 13:51:32 +02:00
|
|
|
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 23:02:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2014-03-09 18:44:53 +01:00
|
|
|
vinstall out/${_target}.release/d8 755 usr/bin
|
|
|
|
vinstall out/${_target}.release/lib.target/libv8.so.${_sonamever} 755 usr/lib
|
|
|
|
if [ $_target != arm ]; then
|
|
|
|
vinstall out/${_target}.release/mksnapshot.${_target} 755 usr/bin mksnapshot
|
2013-04-17 10:47:05 +02:00
|
|
|
fi
|
|
|
|
|
2014-03-08 03:14:50 +01:00
|
|
|
vmkdir usr/include
|
|
|
|
vcopy 'include/v8*.h' usr/include
|
2013-10-03 13:51:32 +02:00
|
|
|
|
|
|
|
ln -sfr ${DESTDIR}/usr/lib/libv8.so.${_sonamever} ${DESTDIR}/usr/lib/libv8.so
|
2011-12-19 16:19:28 +01:00
|
|
|
}
|
2013-04-14 16:51:01 +02:00
|
|
|
|
|
|
|
v8-devel_package() {
|
|
|
|
depends="libv8-${version}_${revision}"
|
2013-08-21 12:14:51 +02:00
|
|
|
short_desc+=" - development files"
|
2013-04-14 16:51:01 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
2013-10-03 13:51:32 +02:00
|
|
|
vmove usr/lib/libv8.so
|
2013-04-14 16:51:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libv8_package() {
|
2013-08-21 12:14:51 +02:00
|
|
|
short_desc+=" - runtime library"
|
2013-04-14 16:51:01 +02:00
|
|
|
pkg_install() {
|
2013-10-03 13:51:32 +02:00
|
|
|
vmove usr/lib/libv8.so.${_sonamever}
|
2013-04-14 16:51:01 +02:00
|
|
|
}
|
|
|
|
}
|