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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Feb 9 20:44:40 2012 UTC (2 years, 10 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump for beta channel release. Set SONAME using first 3 version components. Remove old.

(Portage version: 2.2.0_alpha85/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.6.6.19.ebuild,v 1.1 2012/01/24 01:03:59 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 soname_version="${PV}"
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 local arg testjobs
77 for arg in ${MAKEOPTS}; do
78 case ${arg} in
79 -j*) testjobs=${arg#-j} ;;
80 --jobs=*) testjobs=${arg#--jobs=} ;;
81 esac
82 done
83
84 tools/test-wrapper-gypbuild.py \
85 -j${testjobs:-1} \
86 --arch-and-mode=${mytarget} \
87 --no-presubmit \
88 --progress=dots || die
89 }
90
91 src_install() {
92 insinto /usr
93 doins -r include || die
94
95 dobin out/${mytarget}/d8 || die
96
97 if [[ ${CHOST} == *-darwin* ]] ; then
98 install_name_tool \
99 -id "${EPREFIX}"/usr/$(get_libdir)/libv8-${soname_version}$(get_libname) \
100 out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname) || die
101 fi
102
103 dolib out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname) || die
104 dosym libv8-${soname_version}$(get_libname) /usr/$(get_libdir)/libv8$(get_libname) || die
105
106 dodoc AUTHORS ChangeLog || die
107 }
108
109 pkg_preinst() {
110 preserved_libs=()
111 local baselib candidate
112
113 eshopts_push -s nullglob
114
115 for candidate in "${EROOT}usr/$(get_libdir)"/libv8-*$(get_libname) \
116 "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
117 baselib=${candidate##*/}
118 if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
119 preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
120 fi
121 done
122
123 eshopts_pop
124
125 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
126 preserve_old_lib "${preserved_libs[@]}"
127 fi
128 }
129
130 pkg_postinst() {
131 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
132 preserve_old_lib_notify "${preserved_libs[@]}"
133 fi
134 }

  ViewVC Help
Powered by ViewVC 1.1.20