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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Dec 1 17:23:39 2007 UTC (7 years ago) by corsair
Branch: MAIN
Changes since 1.3: +2 -2 lines
Stable on ppc64
(Portage version: 2.1.3.19)

1 # Copyright 1999-2007 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.2.3-r1.ebuild,v 1.3 2007/11/17 19:53: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 # bug #49147 (bogus stacktrace in gdb with --db-attach=yes) does not seem to be applicable anymore
17 #RESTRICT="strip"
18
19 RDEPEND="!dev-util/callgrind"
20
21 src_unpack() {
22 unpack ${A}
23 cd "${S}"
24
25 # make sure our CFLAGS are respected
26 einfo "Changing configure.in to respect CFLAGS"
27 sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in
28
29 # undefined references to __guard and __stack_smash_handler in VEX (bug #114347)
30 einfo "Changing Makefile.flags.am to disable SSP"
31 sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' Makefile.flags.am
32
33 # Correct hard coded doc location
34 sed -i -e "s:doc/valgrind:doc/${P}:" docs/Makefile.am
35
36 # Fix incorrect --libs output in valgrind.pc (bug #147904)
37 epatch "${FILESDIR}/${P}-pkg-config.patch"
38
39 # Remove defaulting to ppc32-linux on ppc64 without multilib
40 # "valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
41 # No such file or directory"
42 if use ppc64 && ! has_multilib_profile; then
43 epatch "${FILESDIR}/valgrind-3.2.1-only64bit.patch"
44 fi
45
46 epatch "${FILESDIR}/${P}-glibc-2.6.patch"
47 epatch "${FILESDIR}/${P}-glibc-2.7.patch"
48
49 # Prevent "unhandled instruction bytes: 0x66 0x66 0x66 0x66" (bug #189396)
50 epatch "${FILESDIR}/${P}-unhandled-instr-amd64.patch"
51
52 # Regenerate autotools files
53 eautoreconf
54 }
55
56 src_compile() {
57 local myconf
58
59 # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
60 # while compiling insn_sse.c in none/tests/x86
61 # -fpie valgrind seemingly hangs when built with pie on
62 # amd64 (bug #102157)
63 # -fstack-protector more undefined references to __guard and __stack_smash_handler
64 # because valgrind doesn't link to glibc (bug #114347)
65 # -ggdb3 segmentation fault on startup
66 filter-flags -fomit-frame-pointer
67 filter-flags -fpie
68 filter-flags -fstack-protector
69 replace-flags -ggdb3 -ggdb2
70
71 # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
72 if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
73 ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
74 replace-flags -O3 -O2
75 fi
76
77 # Optionally build in X suppression files
78 use X && myconf="--with-x" || myconf="--with-x=no"
79
80 if use amd64 || use ppc64; then
81 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
82 fi
83
84 econf ${myconf} || die "Configure failed!"
85 emake || die "Make failed!"
86 }
87
88 src_install() {
89 make DESTDIR="${D}" install || die "Install failed!"
90 dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
91 }

  ViewVC Help
Powered by ViewVC 1.1.20