/[gentoo-x86]/dev-util/valgrind/valgrind-3.2.1.ebuild
Gentoo

Contents of /dev-util/valgrind/valgrind-3.2.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Feb 11 12:30:16 2007 UTC (7 years, 10 months ago) by armin76
Branch: MAIN
Changes since 1.2: +3 -3 lines
x86 stable wrt bug 166121
(Portage version: 2.1.2-r9)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.2.1.ebuild,v 1.2 2006/10/24 16:07:36 griffon26 Exp $
4
5 inherit autotools eutils flag-o-matic toolchain-funcs
6
7 DESCRIPTION="An open-source memory debugger for GNU/Linux"
8 HOMEPAGE="http://www.valgrind.org"
9 SRC_URI="http://www.valgrind.org/downloads/${P}.tar.bz2"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="-* ~amd64 ~ppc ~ppc64 x86"
14 IUSE="X"
15
16 # bug #49147 (bogus stacktrace in gdb with --db-attach=yes) does not seem to be applicable anymore
17 #RESTRICT="strip"
18
19 RDEPEND="!dev-util/callgrind"
20
21 src_unpack() {
22 unpack ${A}
23 cd "${S}"
24
25 # make sure our CFLAGS are respected
26 einfo "Changing configure.in to respect CFLAGS"
27 sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in
28
29 # undefined references to __guard and __stack_smash_handler in VEX (bug #114347)
30 einfo "Changing Makefile.flags.am to disable SSP"
31 sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' Makefile.flags.am
32
33 # Correct hard coded doc location
34 sed -i -e "s:doc/valgrind:doc/${P}:" docs/Makefile.am
35
36 # Fix undefined reference to @VG_PLATFORM@ (bug #147904)
37 epatch "${FILESDIR}/${P}-pkg-config.patch"
38
39 # Don't reject glibc-2.5
40 epatch "${FILESDIR}/${P}-glibc-2.5.patch"
41
42 # Remove defaulting to ppc32-linux on ppc64 without multilib
43 # "valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
44 # No such file or directory"
45 if use ppc64 && ! has_multilib_profile; then
46 epatch "${FILESDIR}/${P}-only64bit.patch"
47 fi
48
49 # Regenerate autotools files
50 eautoreconf
51 }
52
53 src_compile() {
54 local myconf
55
56 # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
57 # while compiling insn_sse.c in none/tests/x86
58 # -fpie valgrind seemingly hangs when built with pie on
59 # amd64 (bug #102157)
60 # -fstack-protector more undefined references to __guard and __stack_smash_handler
61 # because valgrind doesn't link to glibc (bug #114347)
62 # -ggdb3 segmentation fault on startup
63 filter-flags -fomit-frame-pointer
64 filter-flags -fpie
65 filter-flags -fstack-protector
66 replace-flags -ggdb3 -ggdb2
67
68 # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
69 if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
70 ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
71 replace-flags -O3 -O2
72 fi
73
74 # Optionally build in X suppression files
75 use X && myconf="--with-x" || myconf="--with-x=no"
76
77 if use amd64 || use ppc64; then
78 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
79 fi
80
81 econf ${myconf} || die "Configure failed!"
82 emake || die "Make failed!"
83 }
84
85 src_install() {
86 make DESTDIR="${D}" install || die "Install failed!"
87 dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
88 }

  ViewVC Help
Powered by ViewVC 1.1.20