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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Apr 27 11:21:22 2011 UTC (3 years, 7 months ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bump for beta channel release. Remove old.

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

  ViewVC Help
Powered by ViewVC 1.1.20