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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Wed Jul 25 12:34:11 2012 UTC (2 years ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Clean out older unstable versions

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 blueness 1.3 # Copyright 1999-2012 Gentoo Foundation
2 griffon26 1.1 # Distributed under the terms of the GNU General Public License v2
3 blueness 1.4 # $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.4.1-r1.ebuild,v 1.3 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     KEYWORDS="-* ~amd64 ~ppc ~ppc64 ~x86"
14     IUSE="mpi"
15    
16     DEPEND="mpi? ( virtual/mpi )"
17 blueness 1.3 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 griffon26 1.2 # More local labels (bug #260802, upstream revision 9539)
46     epatch "${FILESDIR}/valgrind-3.4.1-local-labels.patch"
47    
48 griffon26 1.1 # valgrind spits out many false positives on amd64 because of glibc-2.10's
49     # optimized strlen if there is no debug info for glibc (bug #274771). This
50     # patch adds a run-time error if debug info cannot be found.
51     epatch "${FILESDIR}/valgrind-3.4.1-x86_64-ldso-strlen.patch"
52    
53     # Fix up some suppressions that were not general enough for glibc versions
54     # with more than just a major and minor number.
55     epatch "${FILESDIR}/valgrind-3.4.1-glibc-2.10.1.patch"
56    
57 griffon26 1.2 # Respect LDFLAGS also for libmpiwrap.so (bug #279194)
58     epatch "${FILESDIR}/valgrind-3.4.1-respect-LDFLAGS.patch"
59    
60 griffon26 1.1 # Regenerate autotools files
61     eautoreconf
62     }
63    
64     src_compile() {
65     local myconf
66    
67     # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
68     # while compiling insn_sse.c in none/tests/x86
69     # -fpie valgrind seemingly hangs when built with pie on
70     # amd64 (bug #102157)
71     # -fstack-protector more undefined references to __guard and __stack_smash_handler
72     # because valgrind doesn't link to glibc (bug #114347)
73     # -ggdb3 segmentation fault on startup
74     filter-flags -fomit-frame-pointer
75     filter-flags -fpie
76     filter-flags -fstack-protector
77     replace-flags -ggdb3 -ggdb2
78    
79     # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
80     if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
81     ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
82     replace-flags -O3 -O2
83     fi
84    
85     if use amd64 || use ppc64; then
86     ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
87     fi
88    
89     # Don't use mpicc unless the user asked for it (bug #258832)
90     if ! use mpi; then
91     myconf="${myconf} --without-mpicc"
92     fi
93    
94     econf ${myconf} || die "Configure failed!"
95     emake || die "Make failed!"
96     }
97    
98     src_install() {
99     make DESTDIR="${D}" install || die "Install failed!"
100     dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
101     }
102    
103     pkg_postinst() {
104     if use ppc || use ppc64 || use amd64 ; then
105     ewarn "Valgrind will not work on ppc, ppc64 or amd64 if glibc does not have"
106     ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065"
107     ewarn "and http://bugs.gentoo.org/show_bug.cgi?id=274771)."
108     ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
109     ewarn "remerge glibc."
110     fi
111     }

  ViewVC Help
Powered by ViewVC 1.1.20