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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Dec 8 02:58:39 2011 UTC (3 years ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump for beta channel release. Merge ebuild changes from 3.7-series.

(Portage version: 2.2.0_alpha79/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.6.6.6.ebuild,v 1.3 2011/11/23 19:27:23 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_prepare() {
35 # Stop -Werror from breaking the build.
36 sed -i -e "s/-Werror//" build/standalone.gypi || die
37 }
38
39 src_compile() {
40 tc-export AR CC CXX RANLIB
41 export LINK="${CXX}"
42
43 # Use target arch detection logic from bug #354601.
44 case ${CHOST} in
45 i?86-*) myarch=ia32 ;;
46 x86_64-*)
47 if [[ $ABI = x86 ]] ; then
48 myarch=ia32
49 else
50 myarch=x64
51 fi ;;
52 arm*-*) myarch=arm ;;
53 *) die "Unrecognized CHOST: ${CHOST}"
54 esac
55 mytarget=${myarch}.release
56
57 if [[ ${PV} == "9999" ]]; then
58 subversion_wc_info
59 soname_version="${PV}-${ESVN_WC_REVISION}"
60 else
61 soname_version="${PV}"
62 fi
63
64 local snapshot=on
65 host-is-pax && snapshot=off
66
67 # TODO: Add console=readline option once implemented upstream
68 # http://code.google.com/p/v8/issues/detail?id=1781
69
70 emake V=1 \
71 library=shared \
72 werror=no \
73 soname_version=${soname_version} \
74 snapshot=${snapshot} \
75 ${mytarget} || die
76
77 pax-mark m out/${mytarget}/{cctest,d8,shell} || die
78 }
79
80 src_test() {
81 tools/test-wrapper-gypbuild.py \
82 --arch-and-mode=${mytarget} \
83 --no-presubmit \
84 --progress=dots || die
85 }
86
87 src_install() {
88 insinto /usr
89 doins -r include || die
90
91 dobin out/${mytarget}/d8 || die
92
93 if [[ ${CHOST} == *-darwin* ]] ; then
94 install_name_tool \
95 -id "${EPREFIX}"/usr/$(get_libdir)/libv8-${soname_version}$(get_libname) \
96 out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname) || die
97 fi
98
99 dolib out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname) || die
100 dosym libv8-${soname_version}$(get_libname) /usr/$(get_libdir)/libv8$(get_libname) || die
101
102 dodoc AUTHORS ChangeLog || die
103 }
104
105 pkg_preinst() {
106 preserved_libs=()
107 local baselib candidate
108
109 eshopts_push -s nullglob
110
111 for candidate in "${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 for candidate in "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
118 baselib=${candidate##*/}
119 if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
120 preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
121 fi
122 done
123
124 eshopts_pop
125
126 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
127 preserve_old_lib "${preserved_libs[@]}"
128 fi
129 }
130
131 pkg_postinst() {
132 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
133 preserve_old_lib_notify "${preserved_libs[@]}"
134 fi
135 }

  ViewVC Help
Powered by ViewVC 1.1.20