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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Mon Aug 31 18:09:37 2009 UTC (5 years ago) by ranger
Branch: MAIN
Changes since 1.4: +2 -2 lines
Marking valgrind-3.4.1 ppc64 for bug 278534
(Portage version: 2.1.6.13/cvs/Linux ppc64)

1 griffon26 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ranger 1.5 # $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.4.1.ebuild,v 1.4 2009/07/22 20:23:50 josejx Exp $
4 griffon26 1.1
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 ranger 1.5 KEYWORDS="-* amd64 ppc ppc64 x86"
14 griffon26 1.1 IUSE=""
15    
16     RDEPEND="!dev-util/callgrind"
17    
18     src_unpack() {
19     unpack ${A}
20     cd "${S}"
21    
22     # make sure our CFLAGS are respected
23     einfo "Changing configure.in to respect CFLAGS"
24     sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in
25    
26     # undefined references to __guard and __stack_smash_handler in VEX (bug #114347)
27     einfo "Changing Makefile.flags.am to disable SSP"
28     sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' Makefile.flags.am
29    
30     # Correct hard coded doc location
31     sed -i -e "s:doc/valgrind:doc/${P}:" docs/Makefile.am
32    
33     # Remove defaulting to ppc32-linux on ppc64 without multilib
34     # "valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
35     # No such file or directory"
36     if use ppc64 && ! has_multilib_profile; then
37     epatch "${FILESDIR}/valgrind-3.3.0-only64bit.patch"
38     fi
39    
40     # Use local labels in inline asm to prevent 'symbol already defined' errors
41     # when optimisation is on (bug #234644).
42     epatch "${FILESDIR}/valgrind-3.3.1-local-labels.patch"
43    
44     # Regenerate autotools files
45     eautoreconf
46     }
47    
48     src_compile() {
49     local myconf
50    
51     # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
52     # while compiling insn_sse.c in none/tests/x86
53     # -fpie valgrind seemingly hangs when built with pie on
54     # amd64 (bug #102157)
55     # -fstack-protector more undefined references to __guard and __stack_smash_handler
56     # because valgrind doesn't link to glibc (bug #114347)
57     # -ggdb3 segmentation fault on startup
58     filter-flags -fomit-frame-pointer
59     filter-flags -fpie
60     filter-flags -fstack-protector
61     replace-flags -ggdb3 -ggdb2
62    
63     # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
64     if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
65     ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
66     replace-flags -O3 -O2
67     fi
68    
69     if use amd64 || use ppc64; then
70     ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
71     fi
72    
73     econf ${myconf} --without-mpicc || die "Configure failed!"
74     emake || die "Make failed!"
75     }
76    
77     src_install() {
78     make DESTDIR="${D}" install || die "Install failed!"
79     dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
80     }
81    
82     pkg_postinst() {
83     if use ppc || use ppc64 ; then
84     ewarn "Valgrind will not work on ppc or ppc64 if glibc does not have"
85     ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065)"
86     ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
87     ewarn "remerge glibc."
88     fi
89     }

  ViewVC Help
Powered by ViewVC 1.1.20