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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Feb 11 18:04:42 2011 UTC (3 years, 10 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.9.ebuild,v 1.1 2011/01/27 10:43:45 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 # Fix a compile error (bug #349794), to be upstreamed.
40 epatch "${FILESDIR}"/${PN}-gentoo-bug-349794-r0.patch
41
42 # Remove a test that is known to fail:
43 # http://groups.google.com/group/v8-users/browse_thread/thread/b8a3f42b5aa18d06
44 rm test/mjsunit/debug-script.js || die
45
46 # Remove a test that behaves differently depending on FEATURES="userpriv",
47 # see bug #348558.
48 rm test/mjsunit/d8-os.js || die
49 }
50
51 src_configure() {
52 # GCC issues multiple warnings about strict-aliasing issues in v8 code.
53 append-flags -fno-strict-aliasing
54 }
55
56 src_compile() {
57 local myconf=""
58
59 # Use target arch detection logic from bug #296917.
60 local myarch="$ABI"
61 [[ $myarch = "" ]] && myarch="$ARCH"
62
63 if [[ $myarch = amd64 ]] ; then
64 myconf+=" arch=x64"
65 elif [[ $myarch = x86 ]] ; then
66 myconf+=" arch=ia32"
67 elif [[ $myarch = arm ]] ; then
68 myconf+=" arch=arm"
69 else
70 die "Failed to determine target arch, got '$myarch'."
71 fi
72
73 escons $(use_scons readline console readline dumb) ${myconf} . || die
74 }
75
76 src_install() {
77 insinto /usr
78 doins -r include || die
79
80 dobin d8 || die
81
82 dolib libv8-${PV}.so || die
83 dosym libv8-${PV}.so /usr/$(get_libdir)/libv8.so || die
84
85 dodoc AUTHORS ChangeLog || die
86 }
87
88 src_test() {
89 # Make sure we use the libv8.so from our build directory,
90 # and not the /usr/lib one (it may be missing if we are
91 # installing for the first time or upgrading), see bug #352374.
92 LD_LIBRARY_PATH="${S}" tools/test.py --no-build -p dots || die
93 }

  ViewVC Help
Powered by ViewVC 1.1.20