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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Jan 11 12:24:13 2013 UTC (21 months, 2 weeks ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)

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.13.7.5.ebuild,v 1.4 2012/12/20 17:07:15 phajdan.jr 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 ~x86-fbsd ~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 epatch "${FILESDIR}"/${PN}-3.10.8.10-freebsd9.patch
27 epatch "${FILESDIR}"/${PN}-vfp2-r0.patch
28 }
29
30 src_compile() {
31 tc-export AR CC CXX RANLIB
32 export LINK=${CXX}
33
34 local hardfp=off
35
36 # Use target arch detection logic from bug #354601.
37 case ${CHOST} in
38 i?86-*) myarch=ia32 ;;
39 x86_64-*)
40 if [[ $ABI = x86 ]] ; then
41 myarch=ia32
42 else
43 myarch=x64
44 fi ;;
45 arm*-hardfloat-*)
46 hardfp=on
47 myarch=arm ;;
48 arm*-*) myarch=arm ;;
49 *) die "Unrecognized CHOST: ${CHOST}"
50 esac
51 mytarget=${myarch}.release
52
53 soname_version="$(get_version_component_range 1-3)"
54
55 local snapshot=on
56 host-is-pax && snapshot=off
57
58 # TODO: Add console=readline option once implemented upstream
59 # http://code.google.com/p/v8/issues/detail?id=1781
60
61 emake V=1 \
62 library=shared \
63 werror=no \
64 soname_version=${soname_version} \
65 snapshot=${snapshot} \
66 hardfp=${hardfp} \
67 ${mytarget} || die
68
69 pax-mark m out/${mytarget}/{cctest,d8,shell} || die
70 }
71
72 src_test() {
73 local arg testjobs
74 for arg in ${MAKEOPTS}; do
75 case ${arg} in
76 -j*) testjobs=${arg#-j} ;;
77 --jobs=*) testjobs=${arg#--jobs=} ;;
78 esac
79 done
80
81 tools/test-wrapper-gypbuild.py \
82 -j${testjobs:-1} \
83 --arch-and-mode=${mytarget} \
84 --no-presubmit \
85 --progress=dots || die
86 }
87
88 src_install() {
89 insinto /usr
90 doins -r include || die
91
92 if [[ ${CHOST} == *-darwin* ]] ; then
93 # buildsystem is too horrific to get this built correctly
94 mkdir -p out/${mytarget}/lib.target
95 mv out/${mytarget}/libv8.so.${soname_version} \
96 out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
97 install_name_tool \
98 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
99 out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) \
100 || die
101 install_name_tool \
102 -change \
103 "${S}"/out/${mytarget}/libv8.so.${soname_version} \
104 "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
105 out/${mytarget}/d8 || die
106 fi
107
108 dobin out/${mytarget}/d8 || die
109
110 dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
111 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die
112
113 dodoc AUTHORS ChangeLog || die
114 }
115
116 pkg_preinst() {
117 preserved_libs=()
118 local baselib candidate
119
120 eshopts_push -s nullglob
121
122 for candidate in "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
123 baselib=${candidate##*/}
124 if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
125 preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
126 fi
127 done
128
129 eshopts_pop
130
131 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
132 preserve_old_lib "${preserved_libs[@]}"
133 fi
134 }
135
136 pkg_postinst() {
137 if [[ ${#preserved_libs[@]} -gt 0 ]]; then
138 preserve_old_lib_notify "${preserved_libs[@]}"
139 fi
140 }

  ViewVC Help
Powered by ViewVC 1.1.20