62 lines
1.7 KiB
Plaintext
62 lines
1.7 KiB
Plaintext
# Template file for 'v8'
|
|
pkgname=v8
|
|
_sonamever=3.24
|
|
version=${_sonamever}.35.22
|
|
revision=1
|
|
hostmakedepends="which python"
|
|
makedepends="readline-devel>=6.3"
|
|
short_desc="V8 JavaScript Engine"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
homepage="http://code.google.com/p/v8/"
|
|
license="BSD"
|
|
distfiles="http://commondatastorage.googleapis.com/chromium-browser-official/v8-${version}.tar.bz2"
|
|
checksum=235d6738dc5c1518a219eedb5529265e3ff511698a7bd6a7069aec7aa75f73f0
|
|
|
|
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
|
|
|
|
do_build() {
|
|
if [ $_target = arm ]; then
|
|
sed -e "s/m32flag':.*/m32flag':'',/" -i build/toolchain.gypi
|
|
fi
|
|
|
|
LINK=${CXX} make ${makejobs} ${_target} ${_opts} i18nsupport=off \
|
|
werror=no library=shared soname_version=${_sonamever} \
|
|
console=readline disassembler=on \
|
|
CXX.host=${CXX} CXX.link=${CXX} LINK.target=${CXX} \
|
|
BUILTYPE=Release
|
|
}
|
|
|
|
do_install() {
|
|
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
|
|
fi
|
|
|
|
vmkdir usr/include
|
|
vcopy 'include/v8*.h' usr/include
|
|
|
|
ln -sfr ${DESTDIR}/usr/lib/libv8.so.${_sonamever} ${DESTDIR}/usr/lib/libv8.so
|
|
}
|
|
|
|
v8-devel_package() {
|
|
depends="libv8-${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/libv8.so
|
|
}
|
|
}
|
|
|
|
libv8_package() {
|
|
short_desc+=" - runtime library"
|
|
pkg_install() {
|
|
vmove usr/lib/libv8.so.${_sonamever}
|
|
}
|
|
}
|