From 323ff29c1a13f8581d8836b8ebd98457702d0186 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sun, 9 Mar 2014 18:44:53 +0100 Subject: [PATCH] v8: cleaned up the template. --- srcpkgs/v8/template | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/srcpkgs/v8/template b/srcpkgs/v8/template index bd6fae5b91..9dd922c94a 100644 --- a/srcpkgs/v8/template +++ b/srcpkgs/v8/template @@ -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