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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sat May 26 16:44:01 2012 UTC (2 years, 2 months ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
x86 stable wrt security bug #417321. Remove old.

(Portage version: 2.1.10.49/cvs/Linux i686)

1 floppym 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 phajdan.jr 1.4 # $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.9.24.21.ebuild,v 1.3 2012/05/19 13:47:51 ago Exp $
4 floppym 1.1
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 ago 1.3 KEYWORDS="amd64 x86 ~x64-macos ~x86-macos"
18 floppym 1.1 IUSE=""
19    
20     pkg_setup() {
21     python_set_active_version 2
22     python_pkg_setup
23     }
24    
25     src_prepare() {
26     # don't force 32-bits mode on Darwin
27     # http://code.google.com/p/v8/issues/detail?id=2085
28     sed -i -e '/-arch i386/d' build/gyp/pylib/gyp/generator/make.py || die
29     # don't refuse to build shared_libs because we build somewhere else
30     # make sure our v8.dylib doesn't end up being empty and give it a proper
31     # install_name (soname)
32     # http://code.google.com/p/v8/issues/detail?id=2086
33     sed -i \
34     -e '/params\.get.*mac.*darwin.*linux/s/mac/darwin/' \
35     -e "/if GetFlavor(params) == 'mac':/s/mac/darwin/" \
36     -e "/^ if flavor == 'mac':/s/mac/darwin/" \
37     -e '/^LINK_COMMANDS_MAC =/,/^SHARED_HEADER =/s#-shared#-dynamiclib -all_load -install_name '"${EPREFIX}/usr/$(get_libdir)/libv8$(get_libname $(get_version_component_range 1-3))"'#' \
38     build/gyp/pylib/gyp/generator/make.py || die
39     }
40    
41     src_compile() {
42     tc-export AR CC CXX RANLIB
43     export LINK="${CXX}"
44    
45     # Use target arch detection logic from bug #354601.
46     case ${CHOST} in
47     i?86-*) myarch=ia32 ;;
48     x86_64-*)
49     if [[ $ABI = x86 ]] ; then
50     myarch=ia32
51     else
52     myarch=x64
53     fi ;;
54     arm*-*) myarch=arm ;;
55     *) die "Unrecognized CHOST: ${CHOST}"
56     esac
57     mytarget=${myarch}.release
58    
59     soname_version="$(get_version_component_range 1-3)"
60    
61     local snapshot=on
62     host-is-pax && snapshot=off
63    
64     # TODO: Add console=readline option once implemented upstream
65     # http://code.google.com/p/v8/issues/detail?id=1781
66    
67     # force using Makefiles, instead of Xcode project file on Darwin
68     emake V=1 GYP_GENERATORS=make \
69     library=shared \
70     werror=no \
71     soname_version=${soname_version} \
72     snapshot=${snapshot} \
73     ${mytarget} || die
74    
75     pax-mark m out/${mytarget}/{cctest,d8,shell} || die
76     }
77    
78     src_test() {
79     local arg testjobs
80     for arg in ${MAKEOPTS}; do
81     case ${arg} in
82     -j*) testjobs=${arg#-j} ;;
83     --jobs=*) testjobs=${arg#--jobs=} ;;
84     esac
85     done
86    
87     tools/test-wrapper-gypbuild.py \
88     -j${testjobs:-1} \
89     --arch-and-mode=${mytarget} \
90     --no-presubmit \
91     --progress=dots || die
92     }
93    
94     src_install() {
95     insinto /usr
96     doins -r include || die
97    
98     dobin out/${mytarget}/d8 || die
99    
100     if [[ ${CHOST} == *-darwin* ]] ; then
101     # buildsystem is too horrific to get this built correctly
102     mv out/${mytarget}/lib.target/libv8.so.${soname_version} \
103     out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
104     fi
105    
106     dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
107     dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die
108    
109     dodoc AUTHORS ChangeLog || die
110     }
111    
112     pkg_preinst() {
113     preserved_libs=()
114     local baselib candidate
115    
116     eshopts_push -s nullglob
117    
118     for candidate in "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
119     baselib=${candidate##*/}
120     if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
121     preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
122     fi
123     done
124    
125     eshopts_pop
126    
127     if [[ ${#preserved_libs[@]} -gt 0 ]]; then
128     preserve_old_lib "${preserved_libs[@]}"
129     fi
130     }
131    
132     pkg_postinst() {
133     if [[ ${#preserved_libs[@]} -gt 0 ]]; then
134     preserve_old_lib_notify "${preserved_libs[@]}"
135     fi
136     }

  ViewVC Help
Powered by ViewVC 1.1.20