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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri May 25 02:08:22 2012 UTC (6 years, 5 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump for beta channel release.

(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)

1 phajdan.jr 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 floppym 1.2 # $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.10.8.5.ebuild,v 1.1 2012/05/16 17:41:47 phajdan.jr Exp $
4 phajdan.jr 1.1
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 ~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    
28     # Use target arch detection logic from bug #354601.
29     case ${CHOST} in
30     i?86-*) myarch=ia32 ;;
31     x86_64-*)
32     if [[ $ABI = x86 ]] ; then
33     myarch=ia32
34     else
35     myarch=x64
36     fi ;;
37     arm*-*) myarch=arm ;;
38     *) die "Unrecognized CHOST: ${CHOST}"
39     esac
40     mytarget=${myarch}.release
41    
42     soname_version="$(get_version_component_range 1-3)"
43    
44     local snapshot=on
45     host-is-pax && snapshot=off
46    
47     # TODO: Add console=readline option once implemented upstream
48     # http://code.google.com/p/v8/issues/detail?id=1781
49    
50     emake V=1 \
51     library=shared \
52     werror=no \
53     soname_version=${soname_version} \
54     snapshot=${snapshot} \
55     ${mytarget} || die
56    
57     pax-mark m out/${mytarget}/{cctest,d8,shell} || die
58     }
59    
60     src_test() {
61     local arg testjobs
62     for arg in ${MAKEOPTS}; do
63     case ${arg} in
64     -j*) testjobs=${arg#-j} ;;
65     --jobs=*) testjobs=${arg#--jobs=} ;;
66     esac
67     done
68    
69     tools/test-wrapper-gypbuild.py \
70     -j${testjobs:-1} \
71     --arch-and-mode=${mytarget} \
72     --no-presubmit \
73     --progress=dots || die
74     }
75    
76     src_install() {
77     insinto /usr
78     doins -r include || die
79    
80     dobin out/${mytarget}/d8 || die
81    
82     if [[ ${CHOST} == *-darwin* ]] ; then
83     # buildsystem is too horrific to get this built correctly
84     mv out/${mytarget}/lib.target/libv8.so.${soname_version} \
85     out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
86     fi
87    
88     dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die
89     dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die
90    
91     dodoc AUTHORS ChangeLog || die
92     }
93    
94     pkg_preinst() {
95     preserved_libs=()
96     local baselib candidate
97    
98     eshopts_push -s nullglob
99    
100     for candidate in "${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
101     baselib=${candidate##*/}
102     if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
103     preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
104     fi
105     done
106    
107     eshopts_pop
108    
109     if [[ ${#preserved_libs[@]} -gt 0 ]]; then
110     preserve_old_lib "${preserved_libs[@]}"
111     fi
112     }
113    
114     pkg_postinst() {
115     if [[ ${#preserved_libs[@]} -gt 0 ]]; then
116     preserve_old_lib_notify "${preserved_libs[@]}"
117     fi
118     }

  ViewVC Help
Powered by ViewVC 1.1.20