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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Dec 18 08:13:37 2013 UTC (12 months ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Does not have stable API resulting in compile breakages in reverse dependencies. Combined with short release cycle (6 weeks) this makes it pretty much unusable as a shared library. See bug #417879, bug #420995, bug #471582, bug #477300, bug #484786, bug #490214.

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.21.12.1.ebuild,v 1.1 2013/09/20 02:43:22 phajdan.jr 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}-lite.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="icu neon readline"
20
21 RDEPEND="icu? ( dev-libs/icu:= )
22 readline? ( sys-libs/readline:0 )"
23 DEPEND="${PYTHON_DEPS}
24 ${RDEPEND}"
25
26 src_prepare() {
27 # Make sure no bundled libraries are used.
28 find third_party -type f \! -iname '*.gyp*' -delete || die
29 }
30
31 src_configure() {
32 tc-export AR CC CXX RANLIB
33 export LINK=${CXX}
34
35 local myconf=""
36
37 # Always build v8 as a shared library with proper SONAME.
38 myconf+=" -Dcomponent=shared_library -Dsoname_version=${soname_version}"
39
40 # Use target arch detection logic from bug #354601.
41 case ${CHOST} in
42 i?86-*)
43 myarch="ia32"
44 myconf+=" -Dv8_target_arch=ia32" ;;
45 x86_64-*)
46 if [[ $ABI = x86 ]] ; then
47 myarch="ia32"
48 myconf+=" -Dv8_target_arch=ia32"
49 else
50 myarch="x64"
51 myconf+=" -Dv8_target_arch=x64"
52 fi ;;
53 arm*-*)
54 myarch="arm"
55 myconf+=" -Dv8_target_arch=arm -Darm_fpu=default"
56 if [[ ${CHOST} == *-hardfloat-* ]] ; then
57 myconf+=" -Dv8_use_arm_eabi_hardfloat=true"
58 else
59 myconf+=" -Dv8_use_arm_eabi_hardfloat=false"
60 fi
61 if [[ ${CHOST} == armv7*-* ]] ; then
62 myconf+=" -Darmv7=1"
63 else
64 myconf+=" -Darmv7=0"
65 fi
66 myconf+=" $(gyp_use neon arm_neon)" ;;
67 mips*)
68 if [[ ${CHOST} == mips*el* ]] ; then
69 myarch="mipsel"
70 myconf+=" -Dv8_target_arch=mipsel"
71 else
72 die "big-endian MIPS is not yet supported"
73 fi
74 if [[ ${CHOST} == *softfloat* ]] ; then
75 myconf+=" -Dv8_use_mips_abi_hardfloat=false"
76 else
77 myconf+=" -Dv8_use_mips_abi_hardfloat=true"
78 fi
79 if [[ ${CHOST} == *loongson* ]] ; then
80 myconf+=" -Dmips_arch_variant=loongson"
81 elif [[ ${CHOST} == mips*64* ]] ; then
82 die "generic MIPS 64bit is not yet supported"
83 elif [[ ${CHOST} == mips*r2* ]] ; then
84 myconf+=" -Dmips_arch_variant=mips32r2"
85 else
86 myconf+=" -Dmips_arch_variant=mips32"
87 fi
88 ;;
89 *) die "Unrecognized CHOST: ${CHOST}"
90 esac
91
92 myconf+="
93 $(gyp_use icu v8_enable_i18n_support)
94 $(gyp_use readline console readline dumb)"
95
96 myconf+="
97 -Duse_system_icu=1"
98
99 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
100 # Depending on GCC version the warnings are different and we don't
101 # want the build to fail because of that.
102 myconf+=" -Dwerror="
103
104 # gyp does this only for linux, but we always want to use "out" dir, or
105 # all else below fails due to not finding "out" dir
106 myconf+=" --generator-output=out"
107 # gyp defaults to whatever makes the most sense on the platform at hand,
108 # but we want to build using Makefiles, so force that
109 myconf+=" -f make"
110
111 EGYP_CHROMIUM_COMMAND=build/gyp_v8 egyp_chromium ${myconf} || die
112 }
113
114 src_compile() {
115 local makeargs=(
116 -C out
117 builddir="${S}/out/Release"
118 V=1
119 BUILDTYPE=Release
120 )
121
122 # Build mksnapshot so we can pax-mark it.
123 emake "${makeargs[@]}" mksnapshot.${myarch}
124 pax-mark m out/Release/mksnapshot.${myarch}
125
126 # Build everything else.
127 emake "${makeargs[@]}"
128 pax-mark m out/Release/{cctest,d8,preparser}
129 }
130
131 src_test() {
132 LD_LIBRARY_PATH=out/Release/lib.target tools/run-tests.py \
133 -j$(makeopts_jobs) \
134 --no-presubmit \
135 --outdir=out \
136 --buildbot \
137 --arch=native \
138 --mode=Release \
139 --progress=dots || die
140 }
141
142 src_install() {
143 insinto /usr
144 doins -r include
145
146 if [[ ${CHOST} == *-darwin* ]] ; then
147 # buildsystem is too horrific to get this built correctly
148 mkdir -p out/Release/lib.target || die
149 mv out/Release/libv8.so.${soname_version} \
150 out/Release/lib.target/libv8$(get_libname ${soname_version}) || die
151 install_name_tool \
152 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
153 out/Release/lib.target/libv8$(get_libname ${soname_version}) \
154 || die
155 install_name_tool \
156 -change \
157 /usr/local/lib/libv8.so.${soname_version} \
158 "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
159 out/Release/d8 || die
160 fi
161
162 dobin out/Release/d8
163 pax-mark m "${ED}usr/bin/d8"
164
165 dolib out/Release/lib.target/libv8$(get_libname ${soname_version})
166 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname)
167
168 dodoc AUTHORS ChangeLog
169 }
170
171 # TODO: remove functions below after they are removed from chromium.eclass'
172 # EXPORT_FUNCTIONS .
173
174 pkg_preinst() {
175 return
176 }
177
178 pkg_postinst() {
179 return
180 }
181
182 pkg_postrm() {
183 return
184 }

  ViewVC Help
Powered by ViewVC 1.1.20