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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Thu Aug 2 22:50:41 2012 UTC (2 years ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump for dev channel release.

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

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

  ViewVC Help
Powered by ViewVC 1.1.20