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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Oct 20 15:44:52 2011 UTC (3 years, 1 month ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove old versions

(Portage version: 2.2.0_alpha69/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.3.10.30.ebuild,v 1.3 2011/09/04 10:09:17 maekke Exp $
4
5 EAPI="2"
6
7 inherit eutils flag-o-matic multilib pax-utils scons-utils toolchain-funcs
8
9 DESCRIPTION="Google's open source JavaScript engine"
10 HOMEPAGE="http://code.google.com/p/v8"
11 SRC_URI="mirror://gentoo/${P}.tar.gz"
12 LICENSE="BSD"
13
14 SLOT="0"
15 KEYWORDS="amd64 ~arm x86"
16 IUSE="readline"
17 RESTRICT="test"
18
19 RDEPEND="readline? ( >=sys-libs/readline-6.1 )"
20 DEPEND="${RDEPEND}"
21
22 pkg_setup() {
23 tc-export AR CC CXX RANLIB
24
25 # Make the build respect LDFLAGS.
26 export LINKFLAGS="${LDFLAGS}"
27 }
28
29 src_prepare() {
30 # Stop -Werror from breaking the build.
31 epatch "${FILESDIR}"/${PN}-no-werror-r0.patch
32
33 # Respect the user's CFLAGS, including the optimization level.
34 epatch "${FILESDIR}"/${PN}-no-O3-r0.patch
35
36 # Remove a test that is known to fail:
37 # http://groups.google.com/group/v8-users/browse_thread/thread/b8a3f42b5aa18d06
38 rm test/mjsunit/debug-script.js || die
39
40 # Remove a test that behaves differently depending on FEATURES="userpriv",
41 # see bug #348558.
42 rm test/mjsunit/d8-os.js || die
43 }
44
45 src_configure() {
46 # GCC issues multiple warnings about strict-aliasing issues in v8 code.
47 append-flags -fno-strict-aliasing
48 }
49
50 src_compile() {
51 # To make tests work, we compile with sample=shell and visibility=default.
52 # For more info see http://groups.google.com/group/v8-users/browse_thread/thread/61ca70420e4476bc
53 # and http://groups.google.com/group/v8-users/browse_thread/thread/165f89728ed6f97d
54 local myconf="library=shared soname=on sample=shell visibility=default importenv=LINKFLAGS,PATH"
55
56 # Use target arch detection logic from bug #354601.
57 case ${CHOST} in
58 i?86-*) myarch=x86 ;;
59 x86_64-*)
60 if [[ $ABI = "" ]] ; then
61 myarch=amd64
62 else
63 myarch="$ABI"
64 fi ;;
65 arm*-*) myarch=arm ;;
66 *) die "Unrecognized CHOST: ${CHOST}"
67 esac
68
69 if [[ $myarch = amd64 ]] ; then
70 myconf+=" arch=x64"
71 elif [[ $myarch = x86 ]] ; then
72 myconf+=" arch=ia32"
73 elif [[ $myarch = arm ]] ; then
74 myconf+=" arch=arm"
75 else
76 die "Failed to determine target arch, got '$myarch'."
77 fi
78
79 escons $(use_scons readline console readline dumb) ${myconf} . || die
80 pax-mark -m obj/test/release/cctest shell d8
81 }
82
83 src_install() {
84 insinto /usr
85 doins -r include || die
86
87 dobin d8 || die
88
89 dolib libv8-${PV}.so || die
90 dosym libv8-${PV}.so /usr/$(get_libdir)/libv8.so || die
91
92 dodoc AUTHORS ChangeLog || die
93 }
94
95 src_test() {
96 # Make sure we use the libv8.so from our build directory,
97 # and not the /usr/lib one (it may be missing if we are
98 # installing for the first time or upgrading), see bug #352374.
99 LD_LIBRARY_PATH="${S}" tools/test.py --no-build -p dots || die
100 }

  ViewVC Help
Powered by ViewVC 1.1.20