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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Dec 18 08:13:37 2013 UTC (8 months, 4 weeks ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +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.19.18.19.ebuild,v 1.4 2013/08/21 21:39:44 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-*)
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=default"
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 mips*)
62 if [[ ${CHOST} == mips*el* ]] ; then
63 myarch="mipsel"
64 myconf+=" -Dv8_target_arch=mipsel"
65 else
66 die "big-endian MIPS is not yet supported"
67 fi
68 if [[ ${CHOST} == *softfloat* ]] ; then
69 myconf+=" -Dv8_use_mips_abi_hardfloat=false"
70 else
71 myconf+=" -Dv8_use_mips_abi_hardfloat=true"
72 fi
73 if [[ ${CHOST} == *loongson* ]] ; then
74 myconf+=" -Dmips_arch_variant=loongson"
75 elif [[ ${CHOST} == mips*64* ]] ; then
76 die "generic MIPS 64bit is not yet supported"
77 elif [[ ${CHOST} == mips*r2* ]] ; then
78 myconf+=" -Dmips_arch_variant=mips32r2"
79 else
80 myconf+=" -Dmips_arch_variant=mips32"
81 fi
82 ;;
83 *) die "Unrecognized CHOST: ${CHOST}"
84 esac
85
86 myconf+=" $(gyp_use readline console readline dumb)"
87
88 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
89 # Depending on GCC version the warnings are different and we don't
90 # want the build to fail because of that.
91 myconf+=" -Dwerror="
92
93 # gyp does this only for linux, but we always want to use "out" dir, or
94 # all else below fails due to not finding "out" dir
95 myconf+=" --generator-output=out"
96 # gyp defaults to whatever makes the most sense on the platform at hand,
97 # but we want to build using Makefiles, so force that
98 myconf+=" -f make"
99
100 EGYP_CHROMIUM_COMMAND=build/gyp_v8 egyp_chromium ${myconf} || die
101 }
102
103 src_compile() {
104 local makeargs=(
105 -C out
106 builddir="${S}/out/Release"
107 V=1
108 BUILDTYPE=Release
109 )
110
111 # Build mksnapshot so we can pax-mark it.
112 emake "${makeargs[@]}" mksnapshot.${myarch}
113 pax-mark m out/Release/mksnapshot.${myarch}
114
115 # Build everything else.
116 emake "${makeargs[@]}"
117 pax-mark m out/Release/{cctest,d8,preparser}
118 }
119
120 src_test() {
121 LD_LIBRARY_PATH=out/Release/lib.target tools/run-tests.py \
122 -j$(makeopts_jobs) \
123 --no-presubmit \
124 --outdir=out \
125 --buildbot \
126 --arch=native \
127 --mode=Release \
128 --progress=dots || die
129 }
130
131 src_install() {
132 insinto /usr
133 doins -r include
134
135 if [[ ${CHOST} == *-darwin* ]] ; then
136 # buildsystem is too horrific to get this built correctly
137 mkdir -p out/Release/lib.target || die
138 mv out/Release/libv8.so.${soname_version} \
139 out/Release/lib.target/libv8$(get_libname ${soname_version}) || die
140 install_name_tool \
141 -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
142 out/Release/lib.target/libv8$(get_libname ${soname_version}) \
143 || die
144 install_name_tool \
145 -change \
146 /usr/local/lib/libv8.so.${soname_version} \
147 "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \
148 out/Release/d8 || die
149 fi
150
151 dobin out/Release/d8
152 pax-mark m "${ED}usr/bin/d8"
153
154 dolib out/Release/lib.target/libv8$(get_libname ${soname_version})
155 dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname)
156
157 dodoc AUTHORS ChangeLog
158 }
159
160 # TODO: remove functions below after they are removed from chromium.eclass'
161 # EXPORT_FUNCTIONS .
162
163 pkg_preinst() {
164 return
165 }
166
167 pkg_postinst() {
168 return
169 }
170
171 pkg_postrm() {
172 return
173 }

  ViewVC Help
Powered by ViewVC 1.1.20