/[gentoo-x86]/dev-lang/v8/v8-3.10.8.20.ebuild
Gentoo

Contents of /dev-lang/v8/v8-3.10.8.20.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Aug 3 15:04:15 2012 UTC (2 years, 3 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.10.8.20.ebuild,v 1.3 2012/07/17 16:20:53 jdhore Exp $
4
5 EAPI="4"
6
7 PYTHON_DEPEND="2:2.6"
8
9 inherit eutils multilib pax-utils python toolchain-funcs versionator
10
11 DESCRIPTION="Google's open source JavaScript engine"
12 HOMEPAGE="http://code.google.com/p/v8"
13 SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
14 LICENSE="BSD"
15
16 SLOT="0"
17 KEYWORDS="amd64 x86 ~x86-fbsd ~x64-macos ~x86-macos"
18 IUSE=""
19
20 pkg_setup() {
21 python_set_active_version 2
22 python_pkg_setup
23 }
24
25 src_prepare() {
26 # strip unsupported -arch (in Prefix) for OSX, e.g. bug #417401
27 epatch "${FILESDIR}"/${PN}-3.10.8.10-darwin-arch.patch
28 # make sure we don't target an anchient version of OSX
29 # issue http://code.google.com/p/v8/issues/detail?id=2151
30 #sed -i -e "/MACOSX_DEPLOYMENT_TARGET/d" build/standalone.gypi || die
31 epatch "${FILESDIR}"/${PN}-3.10.8.10-freebsd9.patch
32 }
33
34 src_compile() {
35 tc-export AR CC CXX RANLIB
36 export LINK=${CXX}
37
38 # Use target arch detection logic from bug #354601.
39 case ${CHOST} in
40 i?86-*) myarch=ia32 ;;
41 x86_64-*)
42 if [[ $ABI = x86 ]] ; then
43 myarch=ia32
44 else
45 myarch=x64
46 fi ;;
47 arm*-*) myarch=arm ;;
48 *) die "Unrecognized CHOST: ${CHOST}"
49 esac
50 mytarget=${myarch}.release
51
52 soname_version="$(get_version_component_range 1-3)"
53
54 local snapshot=on
55 host-is-pax && snapshot=off
56
57 # TODO: Add console=readline option once implemented upstream
58 # http://code.google.com/p/v8/issues/detail?id=1781
59
60 emake V=1 \
61 library=shared \
62 werror=no \
63 soname_version=${soname_version} \
64 snapshot=${snapshot} \
65 ${mytarget} || die
66
67 pax-mark m out/${mytarget}/{cctest,d8,shell} || die
68 }
69
70 src_test() {
71 local arg testjobs
72 for arg in ${MAKEOPTS}; do
73 case ${arg} in
74 -j*) testjobs=${arg#-j} ;;
75 --jobs=*) testjobs=${arg#--jobs=} ;;
76 esac
77 done
78
79 tools/test-wrapper-gypbuild.py \
80 -j${testjobs:-1} \
81 --arch-and-mode=${mytarget} \
82 --no-presubmit \
83 --progress=dots || die
84 }
85
86 src_install() {
87 insinto /usr
88 doins -r include || die
89
90 if [[ ${CHOST} == *-darwin* ]] ; then
91 # buildsystem is too horrific to get this built correctly
92 mkdir -p out/${mytarget}/lib.target
93 mv out/${mytarget}/libv8.so.${soname_version} \
94 out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
95 install_name_tool \
96 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
97 out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) \
98 || die
99 install_name_tool \
100 -change \
101 "${S}"/out/${mytarget}/libv8.so.${soname_version} \
102 "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
103 out/${mytarget}/d8 || die
104 fi
105
106 dobin out/${mytarget}/d8 || die
107
108 dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
109 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die
110
111 dodoc AUTHORS ChangeLog || die
112 }
113
114 pkg_preinst() {
115 preserved_libs=()
116 local baselib candidate
117
118 eshopts_push -s nullglob
119
120 for candidate in "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
121 baselib=${candidate##*/}
122 if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
123 preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
124 fi
125 done
126
127 eshopts_pop
128
129 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
130 preserve_old_lib "${preserved_libs[@]}"
131 fi
132 }
133
134 pkg_postinst() {
135 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
136 preserve_old_lib_notify "${preserved_libs[@]}"
137 fi
138 }

  ViewVC Help
Powered by ViewVC 1.1.20