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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Mar 8 21:11:16 2012 UTC (2 years, 6 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump for beta channel release.

(Portage version: 2.2.0_alpha90/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.6.ebuild,v 1.1 2012/02/16 02:12:18 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 ~arm ~x86 ~x64-macos ~x86-macos"
18 IUSE=""
19
20 pkg_pretend() {
21 local gccver=$(gcc-fullversion)
22 if [[ ${gccver} = 4.5.2 ]]; then
23 eerror "The currently selected version of gcc is known to segfault when building this"
24 eerror "version of V8. Please use at least gcc-4.5.3."
25 die "gcc-${gccver} detected."
26 fi
27 }
28
29 pkg_setup() {
30 python_set_active_version 2
31 python_pkg_setup
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 dobin out/${mytarget}/d8 || die
91
92 if [[ ${CHOST} == *-darwin* ]] ; then
93 install_name_tool \
94 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname).${soname_version} \
95 out/${mytarget}/lib.target/libv8$(get_libname).${soname_version} || die
96 fi
97
98 dolib out/${mytarget}/lib.target/libv8$(get_libname).${soname_version} || die
99 dosym libv8$(get_libname).${soname_version} /usr/$(get_libdir)/libv8$(get_libname) || die
100
101 dodoc AUTHORS ChangeLog || die
102 }
103
104 pkg_preinst() {
105 preserved_libs=()
106 local baselib candidate
107
108 eshopts_push -s nullglob
109
110 for candidate in "${EROOT}usr/$(get_libdir)"/libv8-*$(get_libname) \
111 "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
112 baselib=${candidate##*/}
113 if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
114 preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
115 fi
116 done
117
118 eshopts_pop
119
120 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
121 preserve_old_lib "${preserved_libs[@]}"
122 fi
123 }
124
125 pkg_postinst() {
126 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
127 preserve_old_lib_notify "${preserved_libs[@]}"
128 fi
129 }

  ViewVC Help
Powered by ViewVC 1.1.20