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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Oct 29 08:34:54 2010 UTC (4 years, 1 month ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump. Remove old.
(Portage version: 2.1.8.3/cvs/Linux i686)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-2.4.3.ebuild,v 1.3 2010/10/08 11:25:27 hwoarang Exp $
4
5 EAPI="2"
6
7 inherit eutils flag-o-matic multilib subversion
8
9 ESVN_REPO_URI="http://v8.googlecode.com/svn/tags/${PV}"
10
11 DESCRIPTION="Google's open source JavaScript engine"
12 HOMEPAGE="http://code.google.com/p/v8"
13 LICENSE="BSD"
14
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="readline"
18
19 RDEPEND="readline? ( >=sys-libs/readline-6.1 )"
20 DEPEND="${RDEPEND}
21 >=dev-util/scons-1.3.0"
22
23 v8_scons_opts() {
24 echo "$(echo ${MAKEOPTS} | sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/')"
25 }
26
27 src_prepare() {
28 # Stop -Werror from breaking the build.
29 epatch "${FILESDIR}"/${PN}-no-werror-r0.patch
30
31 # Respect the user's CFLAGS, including the optimization level.
32 epatch "${FILESDIR}"/${PN}-no-O3-r0.patch
33
34 # Locally fix http://code.google.com/p/v8/issues/detail?id=773.
35 epatch "${FILESDIR}"/${PN}-upstream-bug-773-r0.patch
36
37 # Remove a test that is known to fail:
38 # http://groups.google.com/group/v8-users/browse_thread/thread/b8a3f42b5aa18d06
39 rm test/mjsunit/debug-script.js || die
40 }
41
42 src_configure() {
43 # GCC issues multiple warnings about strict-aliasing issues in v8 code.
44 append-flags -fno-strict-aliasing
45 }
46
47 src_compile() {
48 # TODO: use SONAME, but in a way more consistent
49 # with the rest of a Linux system. Currently the name
50 # looks like libv8-2.2.24.so, but should be more like
51 # libv8.so.2.2.24.
52
53 local myconf=""
54
55 # Use target arch detection logic from bug #296917.
56 local myarch="$ABI"
57 [[ $myarch = "" ]] && myarch="$ARCH"
58
59 if [[ $myarch = amd64 ]] ; then
60 myconf+=" arch=x64"
61 elif [[ $myarch = x86 ]] ; then
62 myconf+=" arch=ia32"
63 else
64 die "Failed to determine target arch, got '$myarch'."
65 fi
66
67 if use readline; then
68 myconf="${myconf} console=readline"
69 else
70 myconf="${myconf} console=dumb"
71 fi
72
73 scons library=shared $(v8_scons_opts) ${myconf} . || die
74 }
75
76 src_install() {
77 insinto /usr
78 doins -r include || die
79
80 dobin d8 || die
81
82 dolib libv8.so || die
83
84 insinto /usr/share/${PN}/tools
85 doins tools/*.js || die
86
87 dodoc AUTHORS ChangeLog || die
88 }
89
90 src_test() {
91 tools/test.py --no-build -p dots --shell d8 || die
92 }

  ViewVC Help
Powered by ViewVC 1.1.20