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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jun 20 09:41:35 2012 UTC (2 years, 3 months ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Dev channel bump. Remove old.

(Portage version: 2.1.10.49/cvs/Linux i686)

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

  ViewVC Help
Powered by ViewVC 1.1.20