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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Jan 5 17:00:47 2012 UTC (2 years, 8 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump for dev channel release. Remove old.

(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.7.6.ebuild,v 1.3 2011/11/23 22:23:20 floppym Exp $
4
5 EAPI="4"
6
7 PYTHON_DEPEND="2:2.6"
8
9 inherit eutils multilib pax-utils python toolchain-funcs
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 if [[ ${PV} == "9999" ]]; then
53 subversion_wc_info
54 soname_version="${PV}-${ESVN_WC_REVISION}"
55 else
56 soname_version="${PV}"
57 fi
58
59 local snapshot=on
60 host-is-pax && snapshot=off
61
62 # TODO: Add console=readline option once implemented upstream
63 # http://code.google.com/p/v8/issues/detail?id=1781
64
65 emake V=1 \
66 library=shared \
67 werror=no \
68 soname_version=${soname_version} \
69 snapshot=${snapshot} \
70 ${mytarget} || die
71
72 pax-mark m out/${mytarget}/{cctest,d8,shell} || die
73 }
74
75 src_test() {
76 tools/test-wrapper-gypbuild.py \
77 --arch-and-mode=${mytarget} \
78 --no-presubmit \
79 --progress=dots || die
80 }
81
82 src_install() {
83 insinto /usr
84 doins -r include || die
85
86 dobin out/${mytarget}/d8 || die
87
88 if [[ ${CHOST} == *-darwin* ]] ; then
89 install_name_tool \
90 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname).${soname_version} \
91 out/${mytarget}/lib.target/libv8$(get_libname).${soname_version} || die
92 fi
93
94 dolib out/${mytarget}/lib.target/libv8$(get_libname).${soname_version} || die
95 dosym libv8$(get_libname).${soname_version} /usr/$(get_libdir)/libv8$(get_libname) || die
96
97 dodoc AUTHORS ChangeLog || die
98 }
99
100 pkg_preinst() {
101 preserved_libs=()
102 local baselib candidate
103
104 eshopts_push -s nullglob
105
106 for candidate in "${EROOT}usr/$(get_libdir)"/libv8-*$(get_libname); do
107 baselib=${candidate##*/}
108 if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
109 preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
110 fi
111 done
112 for candidate in "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
113 baselib=${candidate##*/}
114 if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
115 preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
116 fi
117 done
118
119 eshopts_pop
120
121 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
122 preserve_old_lib "${preserved_libs[@]}"
123 fi
124 }
125
126 pkg_postinst() {
127 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
128 preserve_old_lib_notify "${preserved_libs[@]}"
129 fi
130 }

  ViewVC Help
Powered by ViewVC 1.1.20