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

Contents of /dev-util/valgrind/valgrind-3.2.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Oct 20 17:44:40 2007 UTC (6 years, 10 months ago) by griffon26
Branch: MAIN
Copied valgrind-3.2.3 to 3.2.3-r1 to force upgrade to a version with a fix for bug #189396.
(Portage version: 2.1.3.12)

1 griffon26 1.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.3.ebuild,v 1.9 2007/08/26 09:32:34 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 incorrect --libs output in valgrind.pc (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}/valgrind-3.2.1-only64bit.patch"
44     fi
45    
46     epatch "${FILESDIR}/${P}-glibc-2.6.patch"
47    
48     # Prevent "unhandled instruction bytes: 0x66 0x66 0x66 0x66" (bug #189396)
49     epatch "${FILESDIR}/${P}-unhandled-instr-amd64.patch"
50    
51     # Regenerate autotools files
52     eautoreconf
53     }
54    
55     src_compile() {
56     local myconf
57    
58     # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
59     # while compiling insn_sse.c in none/tests/x86
60     # -fpie valgrind seemingly hangs when built with pie on
61     # amd64 (bug #102157)
62     # -fstack-protector more undefined references to __guard and __stack_smash_handler
63     # because valgrind doesn't link to glibc (bug #114347)
64     # -ggdb3 segmentation fault on startup
65     filter-flags -fomit-frame-pointer
66     filter-flags -fpie
67     filter-flags -fstack-protector
68     replace-flags -ggdb3 -ggdb2
69    
70     # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
71     if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
72     ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
73     replace-flags -O3 -O2
74     fi
75    
76     # Optionally build in X suppression files
77     use X && myconf="--with-x" || myconf="--with-x=no"
78    
79     if use amd64 || use ppc64; then
80     ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
81     fi
82    
83     econf ${myconf} || die "Configure failed!"
84     emake || die "Make failed!"
85     }
86    
87     src_install() {
88     make DESTDIR="${D}" install || die "Install failed!"
89     dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
90     }

  ViewVC Help
Powered by ViewVC 1.1.20