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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Dec 20 01:14:53 2012 UTC (23 months, 4 weeks ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Beta channel bump.

(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)

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.14.5.1.ebuild,v 1.2 2012/11/16 19:25:59 grobian 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_compile() {
26 tc-export AR CC CXX RANLIB
27 export LINK=${CXX}
28
29 local hardfp=off
30
31 # Use target arch detection logic from bug #354601.
32 case ${CHOST} in
33 i?86-*) myarch=ia32 ;;
34 x86_64-*)
35 if [[ $ABI = x86 ]] ; then
36 myarch=ia32
37 else
38 myarch=x64
39 fi ;;
40 arm*-hardfloat-*)
41 hardfp=on
42 myarch=arm ;;
43 arm*-*) myarch=arm ;;
44 *) die "Unrecognized CHOST: ${CHOST}"
45 esac
46 mytarget=${myarch}.release
47
48 soname_version="$(get_version_component_range 1-3)"
49
50 local snapshot=on
51 host-is-pax && snapshot=off
52
53 # TODO: Add console=readline option once implemented upstream
54 # http://code.google.com/p/v8/issues/detail?id=1781
55
56 emake V=1 \
57 library=shared \
58 werror=no \
59 soname_version=${soname_version} \
60 snapshot=${snapshot} \
61 hardfp=${hardfp} \
62 ${mytarget} || die
63
64 pax-mark m out/${mytarget}/{cctest,d8,shell} || die
65 }
66
67 src_test() {
68 local arg testjobs
69 for arg in ${MAKEOPTS}; do
70 case ${arg} in
71 -j*) testjobs=${arg#-j} ;;
72 --jobs=*) testjobs=${arg#--jobs=} ;;
73 esac
74 done
75
76 tools/test-wrapper-gypbuild.py \
77 -j${testjobs:-1} \
78 --arch-and-mode=${mytarget} \
79 --no-presubmit \
80 --progress=dots || die
81 }
82
83 src_install() {
84 insinto /usr
85 doins -r include || die
86
87 if [[ ${CHOST} == *-darwin* ]] ; then
88 # buildsystem is too horrific to get this built correctly
89 mkdir -p out/${mytarget}/lib.target
90 mv out/${mytarget}/libv8.so.${soname_version} \
91 out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
92 install_name_tool \
93 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
94 out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) \
95 || die
96 install_name_tool \
97 -change \
98 /usr/local/lib/libv8.so.${soname_version} \
99 "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
100 out/${mytarget}/d8 || die
101 fi
102
103 dobin out/${mytarget}/d8 || die
104
105 dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
106 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die
107
108 dodoc AUTHORS ChangeLog || die
109 }
110
111 pkg_preinst() {
112 preserved_libs=()
113 local baselib candidate
114
115 eshopts_push -s nullglob
116
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