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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Mar 16 16:18:48 2011 UTC (3 years, 6 months ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump for dev channel release. Remove old.

(Portage version: 2.1.9.25/cvs/Linux i686)

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.0.12.29.ebuild,v 1.1 2011/03/03 11:15:59 phajdan.jr Exp $
4
5 EAPI="2"
6
7 inherit eutils flag-o-matic multilib 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
18 RDEPEND="readline? ( >=sys-libs/readline-6.1 )"
19 DEPEND="${RDEPEND}"
20
21 # To make tests work, we compile with sample=shell.
22 # For more info see http://groups.google.com/group/v8-users/browse_thread/thread/61ca70420e4476bc
23 EXTRA_ESCONS="library=shared soname=on sample=shell importenv=\"LINKFLAGS\""
24
25 pkg_setup() {
26 tc-export AR CC CXX RANLIB
27
28 # Make the build respect LDFLAGS.
29 export LINKFLAGS="${LDFLAGS}"
30 }
31
32 src_prepare() {
33 # Stop -Werror from breaking the build.
34 epatch "${FILESDIR}"/${PN}-no-werror-r0.patch
35
36 # Respect the user's CFLAGS, including the optimization level.
37 epatch "${FILESDIR}"/${PN}-no-O3-r0.patch
38
39 # Remove a test that is known to fail:
40 # http://groups.google.com/group/v8-users/browse_thread/thread/b8a3f42b5aa18d06
41 rm test/mjsunit/debug-script.js || die
42
43 # Remove a test that behaves differently depending on FEATURES="userpriv",
44 # see bug #348558.
45 rm test/mjsunit/d8-os.js || die
46 }
47
48 src_configure() {
49 # GCC issues multiple warnings about strict-aliasing issues in v8 code.
50 append-flags -fno-strict-aliasing
51 }
52
53 src_compile() {
54 local myconf=""
55
56 # Use target arch detection logic from bug #296917.
57 local myarch="$ABI"
58 [[ $myarch = "" ]] && myarch="$ARCH"
59
60 if [[ $myarch = amd64 ]] ; then
61 myconf+=" arch=x64"
62 elif [[ $myarch = x86 ]] ; then
63 myconf+=" arch=ia32"
64 elif [[ $myarch = arm ]] ; then
65 myconf+=" arch=arm"
66 else
67 die "Failed to determine target arch, got '$myarch'."
68 fi
69
70 escons $(use_scons readline console readline dumb) ${myconf} . || die
71 }
72
73 src_install() {
74 insinto /usr
75 doins -r include || die
76
77 dobin d8 || die
78
79 dolib libv8-${PV}.so || die
80 dosym libv8-${PV}.so /usr/$(get_libdir)/libv8.so || die
81
82 dodoc AUTHORS ChangeLog || die
83 }
84
85 src_test() {
86 # Make sure we use the libv8.so from our build directory,
87 # and not the /usr/lib one (it may be missing if we are
88 # installing for the first time or upgrading), see bug #352374.
89 LD_LIBRARY_PATH="${S}" tools/test.py --no-build -p dots || die
90 }

  ViewVC Help
Powered by ViewVC 1.1.20