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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Aug 11 02:45:33 2013 UTC (5 years, 3 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove old.

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

1 floppym 1.1 # Copyright 1999-2013 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.18.5.8.ebuild,v 1.1 2013/06/07 01:06:25 floppym Exp $
4 floppym 1.1
5     EAPI="5"
6     PYTHON_COMPAT=( python2_{6,7} )
7    
8     inherit chromium eutils multilib multiprocessing pax-utils python-any-r1 \
9     toolchain-funcs versionator
10    
11     DESCRIPTION="Google's open source JavaScript engine"
12     HOMEPAGE="http://code.google.com/p/v8"
13     SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
14     LICENSE="BSD"
15    
16     soname_version="${PV}"
17     SLOT="0/${soname_version}"
18     KEYWORDS="~amd64 ~arm ~x86 ~x86-fbsd ~x64-macos ~x86-macos"
19     IUSE="neon readline"
20    
21     RDEPEND="readline? ( sys-libs/readline:0 )"
22     DEPEND="${PYTHON_DEPS}
23     ${RDEPEND}"
24    
25     src_configure() {
26     tc-export AR CC CXX RANLIB
27     export LINK=${CXX}
28    
29     local myconf=""
30    
31     # Always build v8 as a shared library with proper SONAME.
32     myconf+=" -Dcomponent=shared_library -Dsoname_version=${soname_version}"
33    
34     # Use target arch detection logic from bug #354601.
35     case ${CHOST} in
36     i?86-*)
37     myarch="ia32"
38     myconf+=" -Dv8_target_arch=ia32" ;;
39     x86_64-*)
40     if [[ $ABI = x86 ]] ; then
41     myarch="ia32"
42     myconf+=" -Dv8_target_arch=ia32"
43     else
44     myarch="x64"
45     myconf+=" -Dv8_target_arch=x64"
46     fi ;;
47     arm*-*)
48     myarch="arm"
49     myconf+=" -Dv8_target_arch=arm -Darm_fpu="
50     if [[ ${CHOST} == *-hardfloat-* ]] ; then
51     myconf+=" -Dv8_use_arm_eabi_hardfloat=true"
52     else
53     myconf+=" -Dv8_use_arm_eabi_hardfloat=false"
54     fi
55     if [[ ${CHOST} == armv7*-* ]] ; then
56     myconf+=" -Darmv7=1"
57     else
58     myconf+=" -Darmv7=0"
59     fi
60     myconf+=" $(gyp_use neon arm_neon)" ;;
61     *) die "Unrecognized CHOST: ${CHOST}"
62     esac
63    
64     myconf+=" $(gyp_use readline console readline dumb)"
65    
66     # Make sure that -Werror doesn't get added to CFLAGS by the build system.
67     # Depending on GCC version the warnings are different and we don't
68     # want the build to fail because of that.
69     myconf+=" -Dwerror="
70    
71     # gyp does this only for linux, but we always want to use "out" dir, or
72     # all else below fails due to not finding "out" dir
73     myconf+=" --generator-output=out"
74     # gyp defaults to whatever makes the most sense on the platform at hand,
75     # but we want to build using Makefiles, so force that
76     myconf+=" -f make"
77    
78     EGYP_CHROMIUM_COMMAND=build/gyp_v8 egyp_chromium ${myconf} || die
79     }
80    
81     src_compile() {
82     local makeargs=(
83     -C out
84     builddir="${S}/out/Release"
85     V=1
86     BUILDTYPE=Release
87     )
88    
89     # Build mksnapshot so we can pax-mark it.
90     emake "${makeargs[@]}" mksnapshot.${myarch}
91     pax-mark m out/Release/mksnapshot.${myarch}
92    
93     # Build everything else.
94     emake "${makeargs[@]}"
95     pax-mark m out/Release/{cctest,d8,preparser}
96     }
97    
98     src_test() {
99     LD_LIBRARY_PATH=out/Release/lib.target tools/run-tests.py \
100     -j$(makeopts_jobs) \
101     --no-presubmit \
102     --outdir=out \
103     --buildbot \
104     --arch=native \
105     --mode=Release \
106     --progress=dots || die
107     }
108    
109     src_install() {
110     insinto /usr
111     doins -r include
112    
113     if [[ ${CHOST} == *-darwin* ]] ; then
114     # buildsystem is too horrific to get this built correctly
115     mkdir -p out/Release/lib.target || die
116     mv out/Release/libv8.so.${soname_version} \
117     out/Release/lib.target/libv8$(get_libname ${soname_version}) || die
118     install_name_tool \
119     -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
120     out/Release/lib.target/libv8$(get_libname ${soname_version}) \
121     || die
122     install_name_tool \
123     -change \
124     /usr/local/lib/libv8.so.${soname_version} \
125     "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
126     out/Release/d8 || die
127     fi
128    
129     dobin out/Release/d8
130     pax-mark m "${ED}usr/bin/d8"
131    
132     dolib out/Release/lib.target/libv8$(get_libname ${soname_version})
133     dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname)
134    
135     dodoc AUTHORS ChangeLog
136     }
137    
138     # TODO: remove functions below after they are removed from chromium.eclass'
139     # EXPORT_FUNCTIONS .
140    
141     pkg_preinst() {
142     return
143     }
144    
145     pkg_postinst() {
146     return
147     }
148    
149     pkg_postrm() {
150     return
151     }

  ViewVC Help
Powered by ViewVC 1.1.20