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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Jan 5 19:08:16 2009 UTC (5 years, 9 months ago) by griffon26
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Added valgrind-3.4.0, which has a fix for CVE-2008-4865 (bug #245317).
Removed some of the old versions.
(Portage version: 2.1.6/cvs/Linux 2.6.26.2 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.0.ebuild,v 1.3 2008/07/27 17:55:23 tester 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 # Regenerate autotools files
44 eautoreconf
45 }
46
47 src_compile() {
48 local myconf
49
50 # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
51 # while compiling insn_sse.c in none/tests/x86
52 # -fpie valgrind seemingly hangs when built with pie on
53 # amd64 (bug #102157)
54 # -fstack-protector more undefined references to __guard and __stack_smash_handler
55 # because valgrind doesn't link to glibc (bug #114347)
56 # -ggdb3 segmentation fault on startup
57 filter-flags -fomit-frame-pointer
58 filter-flags -fpie
59 filter-flags -fstack-protector
60 replace-flags -ggdb3 -ggdb2
61
62 # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
63 if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
64 ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
65 replace-flags -O3 -O2
66 fi
67
68 # Optionally build in X suppression files
69 use X && myconf="--with-x" || myconf="--with-x=no"
70
71 if use amd64 || use ppc64; then
72 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
73 fi
74
75 econf ${myconf} --without-mpicc || die "Configure failed!"
76 emake || die "Make failed!"
77 }
78
79 src_install() {
80 make DESTDIR="${D}" install || die "Install failed!"
81 dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
82 }
83
84 pkg_postinst() {
85 if use ppc || use ppc64 ; then
86 ewarn "Valgrind will not work on ppc or ppc64 if glibc does not have"
87 ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065)"
88 ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
89 ewarn "remerge glibc."
90 fi
91 }

  ViewVC Help
Powered by ViewVC 1.1.20