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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu May 10 02:24:32 2012 UTC (2 years, 4 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump for beta channel release. Remove old.

(Portage version: 2.2.0_alpha102/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.8.9.18.ebuild,v 1.1 2012/04/13 01:18:46 floppym 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 ~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 # don't force 32-bits mode on Darwin
27 sed -i -e '/-arch i386/d' build/gyp/pylib/gyp/generator/make.py || die
28 # force using Makefiles, instead of Xcode project file on Darwin
29 sed -i -e '/darwin/s/xcode/make/' build/gyp/pylib/gyp/__init__.py || die
30 # don't refuse to build shared_libs because we build somewhere else
31 sed -i \
32 -e '/params\.get.*mac.*darwin.*linux/s/mac/darwin/' \
33 -e "/if GetFlavor(params) == 'mac':/s/mac/darwin/" \
34 -e "/^ if flavor == 'mac':/s/mac/darwin/" \
35 build/gyp/pylib/gyp/generator/make.py || die
36 # make sure our v8.dylib doesn't end up being empty and give it a proper
37 # install_name (soname)
38 sed -i \
39 -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))"'#' \
40 build/gyp/pylib/gyp/generator/make.py || die
41 }
42
43 src_compile() {
44 tc-export AR CC CXX RANLIB
45 export LINK="${CXX}"
46
47 # Use target arch detection logic from bug #354601.
48 case ${CHOST} in
49 i?86-*) myarch=ia32 ;;
50 x86_64-*)
51 if [[ $ABI = x86 ]] ; then
52 myarch=ia32
53 else
54 myarch=x64
55 fi ;;
56 arm*-*) myarch=arm ;;
57 *) die "Unrecognized CHOST: ${CHOST}"
58 esac
59 mytarget=${myarch}.release
60
61 soname_version="$(get_version_component_range 1-3)"
62
63 local snapshot=on
64 host-is-pax && snapshot=off
65
66 # TODO: Add console=readline option once implemented upstream
67 # http://code.google.com/p/v8/issues/detail?id=1781
68
69 emake V=1 \
70 library=shared \
71 werror=no \
72 soname_version=${soname_version} \
73 snapshot=${snapshot} \
74 ${mytarget} || die
75
76 pax-mark m out/${mytarget}/{cctest,d8,shell} || die
77 }
78
79 src_test() {
80 local arg testjobs
81 for arg in ${MAKEOPTS}; do
82 case ${arg} in
83 -j*) testjobs=${arg#-j} ;;
84 --jobs=*) testjobs=${arg#--jobs=} ;;
85 esac
86 done
87
88 tools/test-wrapper-gypbuild.py \
89 -j${testjobs:-1} \
90 --arch-and-mode=${mytarget} \
91 --no-presubmit \
92 --progress=dots || die
93 }
94
95 src_install() {
96 insinto /usr
97 doins -r include || die
98
99 dobin out/${mytarget}/d8 || die
100
101 if [[ ${CHOST} == *-darwin* ]] ; then
102 # buildsystem is too horrific to get this built correctly
103 mv out/${mytarget}/lib.target/libv8.so.${soname_version} \
104 out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
105 fi
106
107 dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
108 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die
109
110 dodoc AUTHORS ChangeLog || die
111 }
112
113 pkg_preinst() {
114 preserved_libs=()
115 local baselib candidate
116
117 eshopts_push -s nullglob
118
119 for candidate in "${EROOT}usr/$(get_libdir)"/libv8-*$(get_libname) \
120 "${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