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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Apr 28 16:37:57 2012 UTC (3 years ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove older versions which don't build against current tree

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2008 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.3.1-r1.ebuild,v 1.1 2008/12/13 10:57:06 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 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 # Fix incorrect --libs output in valgrind.pc (bug #147904)
34 epatch "${FILESDIR}/${PN}-3.2.3-pkg-config.patch"
35
36 # Remove defaulting to ppc32-linux on ppc64 without multilib
37 # "valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
38 # No such file or directory"
39 if use ppc64 && ! has_multilib_profile; then
40 epatch "${FILESDIR}/valgrind-3.3.0-only64bit.patch"
41 fi
42
43 # Use local labels in inline asm to prevent 'symbol already defined' errors
44 # when optimisation is on (bug #234644).
45 epatch "${FILESDIR}/valgrind-3.3.1-local-labels.patch"
46
47 # Add suppression file for glibc 2.9 and don't bail out on configure
48 epatch "${FILESDIR}/valgrind-3.3.1-glibc-2.9.patch"
49
50 # Regenerate autotools files
51 eautoreconf
52 }
53
54 src_compile() {
55 local myconf
56
57 # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
58 # while compiling insn_sse.c in none/tests/x86
59 # -fpie valgrind seemingly hangs when built with pie on
60 # amd64 (bug #102157)
61 # -fstack-protector more undefined references to __guard and __stack_smash_handler
62 # because valgrind doesn't link to glibc (bug #114347)
63 # -ggdb3 segmentation fault on startup
64 filter-flags -fomit-frame-pointer
65 filter-flags -fpie
66 filter-flags -fstack-protector
67 replace-flags -ggdb3 -ggdb2
68
69 # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
70 if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
71 ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
72 replace-flags -O3 -O2
73 fi
74
75 # Optionally build in X suppression files
76 use X && myconf="--with-x" || myconf="--with-x=no"
77
78 if use amd64 || use ppc64; then
79 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
80 fi
81
82 econf ${myconf} --without-mpicc || die "Configure failed!"
83 emake || die "Make failed!"
84 }
85
86 src_install() {
87 make DESTDIR="${D}" install || die "Install failed!"
88 dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
89 }
90
91 pkg_postinst() {
92 if use ppc || use ppc64 ; then
93 ewarn "Valgrind will not work on ppc or ppc64 if glibc does not have"
94 ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065)"
95 ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
96 ewarn "remerge glibc."
97 fi
98 }

  ViewVC Help
Powered by ViewVC 1.1.20