/[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.8 - (hide annotations) (download)
Fri Apr 19 12:00:27 2013 UTC (15 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Remove older 3.4 branch

(Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

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

  ViewVC Help
Powered by ViewVC 1.1.20