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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Apr 28 16:37:57 2012 UTC (2 years, 7 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +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.ebuild,v 1.6 2008/08/24 11:41:59 corsair 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 # Regenerate autotools files
48 eautoreconf
49 }
50
51 src_compile() {
52 local myconf
53
54 # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
55 # while compiling insn_sse.c in none/tests/x86
56 # -fpie valgrind seemingly hangs when built with pie on
57 # amd64 (bug #102157)
58 # -fstack-protector more undefined references to __guard and __stack_smash_handler
59 # because valgrind doesn't link to glibc (bug #114347)
60 # -ggdb3 segmentation fault on startup
61 filter-flags -fomit-frame-pointer
62 filter-flags -fpie
63 filter-flags -fstack-protector
64 replace-flags -ggdb3 -ggdb2
65
66 # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
67 if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
68 ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
69 replace-flags -O3 -O2
70 fi
71
72 # Optionally build in X suppression files
73 use X && myconf="--with-x" || myconf="--with-x=no"
74
75 if use amd64 || use ppc64; then
76 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
77 fi
78
79 econf ${myconf} --without-mpicc || die "Configure failed!"
80 emake || die "Make failed!"
81 }
82
83 src_install() {
84 make DESTDIR="${D}" install || die "Install failed!"
85 dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
86 }
87
88 pkg_postinst() {
89 if use ppc || use ppc64 ; then
90 ewarn "Valgrind will not work on ppc or ppc64 if glibc does not have"
91 ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065)"
92 ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
93 ewarn "remerge glibc."
94 fi
95 }

  ViewVC Help
Powered by ViewVC 1.1.20