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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Aug 24 20:53:21 2011 UTC (3 years, 3 months ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump for stable channel release. Remove old.

(Portage version: 2.1.10.3/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.2.10.21.ebuild,v 1.3 2011/06/30 12:06:19 tomka 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 # Backport a compile fix.
37 epatch "${FILESDIR}"/${PN}-upstream-bug-1326-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 # To make tests work, we compile with sample=shell and visibility=default.
55 # For more info see http://groups.google.com/group/v8-users/browse_thread/thread/61ca70420e4476bc
56 # and http://groups.google.com/group/v8-users/browse_thread/thread/165f89728ed6f97d
57 local myconf="library=shared soname=on sample=shell visibility=default importenv=LINKFLAGS,PATH"
58
59 # Use target arch detection logic from bug #354601.
60 case ${CHOST} in
61 i?86-*) myarch=x86 ;;
62 x86_64-*)
63 if [[ $ABI = "" ]] ; then
64 myarch=amd64
65 else
66 myarch="$ABI"
67 fi ;;
68 arm*-*) myarch=arm ;;
69 *) die "Unrecognized CHOST: ${CHOST}"
70 esac
71
72 if [[ $myarch = amd64 ]] ; then
73 myconf+=" arch=x64"
74 elif [[ $myarch = x86 ]] ; then
75 myconf+=" arch=ia32"
76 elif [[ $myarch = arm ]] ; then
77 myconf+=" arch=arm"
78 else
79 die "Failed to determine target arch, got '$myarch'."
80 fi
81
82 escons $(use_scons readline console readline dumb) ${myconf} . || die
83 pax-mark -m obj/test/release/cctest shell d8
84 }
85
86 src_install() {
87 insinto /usr
88 doins -r include || die
89
90 dobin d8 || die
91
92 dolib libv8-${PV}.so || die
93 dosym libv8-${PV}.so /usr/$(get_libdir)/libv8.so || die
94
95 dodoc AUTHORS ChangeLog || die
96 }
97
98 src_test() {
99 # Make sure we use the libv8.so from our build directory,
100 # and not the /usr/lib one (it may be missing if we are
101 # installing for the first time or upgrading), see bug #352374.
102 LD_LIBRARY_PATH="${S}" tools/test.py --no-build -p dots || die
103 }

  ViewVC Help
Powered by ViewVC 1.1.20