v8: cleaned up the template.
This commit is contained in:
parent
446112e95e
commit
323ff29c1a
1 changed files with 14 additions and 28 deletions
|
@ -11,18 +11,19 @@ homepage="http://code.google.com/p/v8/"
|
|||
license="BSD"
|
||||
distfiles="http://commondatastorage.googleapis.com/chromium-browser-official/v8-${version}.tar.bz2"
|
||||
checksum=4b826735d182e9615fd9259e3f5d008c4f53d98c9f3531a6af75f00bd07be0b1
|
||||
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() {
|
||||
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
|
||||
if [ $_target = arm ]; then
|
||||
sed -e "s/m32flag':.*/m32flag':'',/" -i build/toolchain.gypi
|
||||
fi
|
||||
|
||||
LINK=${CXX} make ${makejobs} ${target} i18nsupport=off \
|
||||
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} \
|
||||
|
@ -30,25 +31,10 @@ do_build() {
|
|||
}
|
||||
|
||||
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.
|
||||
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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue