/[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.1 - (hide annotations) (download)
Sun Sep 17 16:49:18 2006 UTC (7 years, 7 months ago) by griffon26
Branch: MAIN
Added valgrind-3.2.1, fixed bug #147904 and added ~ppc64.
(Portage version: 2.1.2_pre1)

1 griffon26 1.1 # Copyright 1999-2006 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.0.ebuild,v 1.5 2006/08/25 21:13:04 blubb 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     # Remove defaulting to ppc32-linux on ppc64 without multilib
40     # "valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
41     # No such file or directory"
42     if use ppc64 && ! has_multilib_profile; then
43     epatch "${FILESDIR}/${P}-only64bit.patch"
44     fi
45    
46     # Regenerate autotools files
47     eautoreconf
48     }
49    
50     src_compile() {
51     local myconf
52    
53     # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
54     # while compiling insn_sse.c in none/tests/x86
55     # -fpie valgrind seemingly hangs when built with pie on
56     # amd64 (bug #102157)
57     # -fstack-protector more undefined references to __guard and __stack_smash_handler
58     # because valgrind doesn't link to glibc (bug #114347)
59     # -ggdb3 segmentation fault on startup
60     filter-flags -fomit-frame-pointer
61     filter-flags -fpie
62     filter-flags -fstack-protector
63     replace-flags -ggdb3 -ggdb2
64    
65     # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
66     if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
67     ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
68     replace-flags -O3 -O2
69     fi
70    
71     # Optionally build in X suppression files
72     use X && myconf="--with-x" || myconf="--with-x=no"
73    
74     if use amd64 || use ppc64; then
75     ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
76     fi
77    
78     econf ${myconf} || die "Configure failed!"
79     emake || die "Make failed!"
80     }
81    
82     src_install() {
83     make DESTDIR="${D}" install || die "Install failed!"
84     dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
85     }

  ViewVC Help
Powered by ViewVC 1.1.20