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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jul 31 00:03:37 2013 UTC (13 months, 3 weeks ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Stable channel bump.

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

1 # Copyright 1999-2013 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.17.6.14.ebuild,v 1.3 2013/05/24 18:26:45 ago Exp $
4
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-*) myconf+=" -Dv8_target_arch=ia32" ;;
37 x86_64-*)
38 if [[ $ABI = x86 ]] ; then
39 myconf+=" -Dv8_target_arch=ia32"
40 else
41 myconf+=" -Dv8_target_arch=x64"
42 fi ;;
43 arm*-*)
44 myconf+=" -Dv8_target_arch=arm -Darm_fpu="
45 if [[ ${CHOST} == *-hardfloat-* ]] ; then
46 myconf+=" -Dv8_use_arm_eabi_hardfloat=true"
47 else
48 myconf+=" -Dv8_use_arm_eabi_hardfloat=false"
49 fi
50 if [[ ${CHOST} == armv7*-* ]] ; then
51 myconf+=" -Darmv7=1"
52 else
53 myconf+=" -Darmv7=0"
54 fi
55 myconf+=" $(gyp_use neon arm_neon)" ;;
56 *) die "Unrecognized CHOST: ${CHOST}"
57 esac
58
59 myconf+=" $(gyp_use readline console readline dumb)"
60
61 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
62 # Depending on GCC version the warnings are different and we don't
63 # want the build to fail because of that.
64 myconf+=" -Dwerror="
65
66 # gyp does this only for linux, but we always want to use "out" dir, or
67 # all else below fails due to not finding "out" dir
68 myconf+=" --generator-output=out"
69 # gyp defaults to whatever makes the most sense on the platform at hand,
70 # but we want to build using Makefiles, so force that
71 myconf+=" -f make"
72
73 EGYP_CHROMIUM_COMMAND=build/gyp_v8 egyp_chromium ${myconf} || die
74 }
75
76 src_compile() {
77 local makeargs=(
78 -C out
79 builddir="${S}/out/Release"
80 V=1
81 BUILDTYPE=Release
82 )
83
84 # Build mksnapshot so we can pax-mark it.
85 emake "${makeargs[@]}" mksnapshot
86 pax-mark m out/Release/mksnapshot
87
88 # Build everything else.
89 emake "${makeargs[@]}"
90 pax-mark m out/Release/{cctest,d8}
91 }
92
93 src_test() {
94 LD_LIBRARY_PATH=out/Release/lib.target tools/run-tests.py \
95 -j$(makeopts_jobs) \
96 --no-presubmit \
97 --outdir=out \
98 --buildbot \
99 --arch=native \
100 --mode=Release \
101 --progress=dots || die
102 }
103
104 src_install() {
105 insinto /usr
106 doins -r include
107
108 if [[ ${CHOST} == *-darwin* ]] ; then
109 # buildsystem is too horrific to get this built correctly
110 mkdir -p out/Release/lib.target || die
111 mv out/Release/libv8.so.${soname_version} \
112 out/Release/lib.target/libv8$(get_libname ${soname_version}) || die
113 install_name_tool \
114 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
115 out/Release/lib.target/libv8$(get_libname ${soname_version}) \
116 || die
117 install_name_tool \
118 -change \
119 /usr/local/lib/libv8.so.${soname_version} \
120 "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
121 out/Release/d8 || die
122 fi
123
124 dobin out/Release/d8
125 pax-mark m "${ED}usr/bin/d8"
126
127 dolib out/Release/lib.target/libv8$(get_libname ${soname_version})
128 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname)
129
130 dodoc AUTHORS ChangeLog || die
131 }
132
133 # TODO: remove functions below after they are removed from chromium.eclass'
134 # EXPORT_FUNCTIONS .
135
136 pkg_preinst() {
137 return
138 }
139
140 pkg_postinst() {
141 return
142 }
143
144 pkg_postrm() {
145 return
146 }

  ViewVC Help
Powered by ViewVC 1.1.20