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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Oct 31 20:12:14 2012 UTC (2 years, 1 month ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Beta channel bump.

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

  ViewVC Help
Powered by ViewVC 1.1.20