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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Fri Apr 19 12:00:27 2013 UTC (20 months, 1 week ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +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.5 # Copyright 1999-2012 Gentoo Foundation
2 griffon26 1.1 # Distributed under the terms of the GNU General Public License v2
3 blueness 1.6 # $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.4.0.ebuild,v 1.5 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 dertobi123 1.4 KEYWORDS="-* amd64 ppc ppc64 x86"
14 griffon26 1.1 IUSE="X"
15    
16 blueness 1.5 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     # Fix incorrect --libs output in valgrind.pc (bug #147904)
35     epatch "${FILESDIR}/${PN}-3.2.3-pkg-config.patch"
36    
37     # Remove defaulting to ppc32-linux on ppc64 without multilib
38     # "valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
39     # No such file or directory"
40     if use ppc64 && ! has_multilib_profile; then
41     epatch "${FILESDIR}/valgrind-3.3.0-only64bit.patch"
42     fi
43    
44     # Use local labels in inline asm to prevent 'symbol already defined' errors
45     # when optimisation is on (bug #234644).
46     epatch "${FILESDIR}/valgrind-3.3.1-local-labels.patch"
47    
48     # Regenerate autotools files
49     eautoreconf
50     }
51    
52     src_compile() {
53     local myconf
54    
55     # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
56     # while compiling insn_sse.c in none/tests/x86
57     # -fpie valgrind seemingly hangs when built with pie on
58     # amd64 (bug #102157)
59     # -fstack-protector more undefined references to __guard and __stack_smash_handler
60     # because valgrind doesn't link to glibc (bug #114347)
61     # -ggdb3 segmentation fault on startup
62     filter-flags -fomit-frame-pointer
63     filter-flags -fpie
64     filter-flags -fstack-protector
65     replace-flags -ggdb3 -ggdb2
66    
67     # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
68     if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
69     ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
70     replace-flags -O3 -O2
71     fi
72    
73     # Optionally build in X suppression files
74     use X && myconf="--with-x" || myconf="--with-x=no"
75    
76     if use amd64 || use ppc64; then
77     ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
78     fi
79    
80     econf ${myconf} --without-mpicc || die "Configure failed!"
81     emake || die "Make failed!"
82     }
83    
84     src_install() {
85     make DESTDIR="${D}" install || die "Install failed!"
86     dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
87     }
88    
89     pkg_postinst() {
90     if use ppc || use ppc64 ; then
91     ewarn "Valgrind will not work on ppc or ppc64 if glibc does not have"
92     ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065)"
93     ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
94     ewarn "remerge glibc."
95     fi
96     }

  ViewVC Help
Powered by ViewVC 1.1.20