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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.49 - (show annotations) (download)
Wed Dec 18 08:13:37 2013 UTC (15 months, 1 week ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.48: +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-9999.ebuild,v 1.48 2013/08/18 03:12:49 steev Exp $
4
5 EAPI="5"
6 PYTHON_COMPAT=( python2_{6,7} )
7
8 inherit chromium eutils multilib multiprocessing pax-utils python-any-r1 \
9 subversion toolchain-funcs
10
11 DESCRIPTION="Google's open source JavaScript engine"
12 HOMEPAGE="http://code.google.com/p/v8"
13 ESVN_REPO_URI="http://v8.googlecode.com/svn/trunk"
14 LICENSE="BSD"
15
16 SLOT="0"
17 KEYWORDS=""
18 IUSE="icu readline neon"
19
20 RDEPEND="icu? ( dev-libs/icu:= )
21 readline? ( sys-libs/readline:0 )"
22 DEPEND="${PYTHON_DEPS}
23 ${RDEPEND}"
24
25 src_unpack() {
26 subversion_src_unpack
27 cd "${S}"
28 make dependencies || die
29 }
30
31 src_prepare() {
32 # Make sure no bundled libraries are used.
33 find third_party -type f \! -iname '*.gyp*' -delete || die
34 }
35
36 src_configure() {
37 tc-export AR CC CXX RANLIB
38 export LINK=${CXX}
39
40 local myconf=""
41
42 subversion_wc_info
43 soname_version="${PV}.${ESVN_WC_REVISION}"
44
45 # Always build v8 as a shared library with proper SONAME.
46 myconf+=" -Dcomponent=shared_library -Dsoname_version=${soname_version}"
47
48 # Use target arch detection logic from bug #354601.
49 case ${CHOST} in
50 i?86-*)
51 myarch="ia32"
52 myconf+=" -Dv8_target_arch=ia32" ;;
53 x86_64-*)
54 if [[ $ABI = x86 ]] ; then
55 myarch="ia32"
56 myconf+=" -Dv8_target_arch=ia32"
57 else
58 myarch="x64"
59 myconf+=" -Dv8_target_arch=x64"
60 fi ;;
61 arm*-*)
62 myarch="arm"
63 myconf+=" -Dv8_target_arch=arm -Darm_fpu=default"
64 if [[ ${CHOST} == *-hardfloat-* ]] ; then
65 myconf+=" -Dv8_use_arm_eabi_hardfloat=true"
66 else
67 myconf+=" -Dv8_use_arm_eabi_hardfloat=false"
68 fi
69 if [[ ${CHOST} == armv7*-* ]] ; then
70 myconf+=" -Darmv7=1"
71 else
72 myconf+=" -Darmv7=0"
73 fi
74 myconf+=" $(gyp_use neon arm_neon)" ;;
75 mips*)
76 if [[ ${CHOST} == mips*el* ]] ; then
77 myarch="mipsel"
78 myconf+=" -Dv8_target_arch=mipsel"
79 else
80 die "big-endian MIPS is not yet supported"
81 fi
82 if [[ ${CHOST} == *softfloat* ]] ; then
83 myconf+=" -Dv8_use_mips_abi_hardfloat=false"
84 else
85 myconf+=" -Dv8_use_mips_abi_hardfloat=true"
86 fi
87 if [[ ${CHOST} == *loongson* ]] ; then
88 myconf+=" -Dmips_arch_variant=loongson"
89 elif [[ ${CHOST} == mips*64* ]] ; then
90 die "generic MIPS 64bit is not yet supported"
91 elif [[ ${CHOST} == mips*r2* ]] ; then
92 myconf+=" -Dmips_arch_variant=mips32r2"
93 else
94 myconf+=" -Dmips_arch_variant=mips32"
95 fi
96 ;;
97 *) die "Unrecognized CHOST: ${CHOST}"
98 esac
99
100 myconf+="
101 $(gyp_use icu v8_enable_i18n_support)
102 $(gyp_use readline console readline dumb)"
103
104 myconf+="
105 -Duse_system_icu=1"
106
107 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
108 # Depending on GCC version the warnings are different and we don't
109 # want the build to fail because of that.
110 myconf+=" -Dwerror="
111
112 EGYP_CHROMIUM_COMMAND=build/gyp_v8 egyp_chromium ${myconf} || die
113 }
114
115 src_compile() {
116 local makeargs=(
117 -C out
118 builddir="${S}/out/Release"
119 V=1
120 BUILDTYPE=Release
121 )
122
123 # Build mksnapshot so we can pax-mark it.
124 emake "${makeargs[@]}" mksnapshot.${myarch}
125 pax-mark m out/Release/mksnapshot.${myarch}
126
127 # Build everything else.
128 emake "${makeargs[@]}"
129 pax-mark m out/Release/{cctest,d8,preparser}
130 }
131
132 src_test() {
133 LD_LIBRARY_PATH=out/Release/lib.target tools/run-tests.py \
134 -j$(makeopts_jobs) \
135 --no-presubmit \
136 --outdir=out \
137 --buildbot \
138 --arch=native \
139 --mode=Release \
140 --progress=dots || die
141 }
142
143 src_install() {
144 insinto /usr
145 doins -r include
146
147 if [[ ${CHOST} == *-darwin* ]] ; then
148 # buildsystem is too horrific to get this built correctly
149 mkdir -p out/Release/lib.target || die
150 mv out/Release/libv8.so.${soname_version} \
151 out/Release/lib.target/libv8$(get_libname ${soname_version}) || die
152 install_name_tool \
153 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
154 out/Release/lib.target/libv8$(get_libname ${soname_version}) \
155 || die
156 install_name_tool \
157 -change \
158 /usr/local/lib/libv8.so.${soname_version} \
159 "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
160 out/Release/d8 || die
161 fi
162
163 dobin out/Release/d8
164 pax-mark m "${ED}usr/bin/d8"
165
166 dolib out/Release/lib.target/libv8$(get_libname ${soname_version})
167 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname)
168
169 dodoc AUTHORS ChangeLog
170 }
171
172 # TODO: remove functions below after they are removed from chromium.eclass'
173 # EXPORT_FUNCTIONS .
174
175 pkg_preinst() {
176 return
177 }
178
179 pkg_postinst() {
180 return
181 }
182
183 pkg_postrm() {
184 return
185 }

  ViewVC Help
Powered by ViewVC 1.1.20