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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sat Apr 28 16:50:42 2012 UTC (2 years, 4 months ago) by blueness
Branch: MAIN
Changes since 1.9: +3 -4 lines
Remove blocking dep for dev-util/callgrind which is long gone

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.5.0.ebuild,v 1.9 2010/08/19 17:58:17 ssuominen 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 ~amd64-linux ~x86-linux"
14 IUSE="mpi"
15
16 DEPEND="mpi? ( virtual/mpi )"
17 RDEPEND="${DEPEND}"
18
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.all.am to disable SSP"
29 sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' Makefile.all.am
30
31 # Correct hard coded doc location
32 sed -i -e "s:doc/valgrind:doc/${P}:" docs/Makefile.am
33
34 # Fix up some suppressions that were not general enough for glibc versions
35 # with more than just a major and minor number.
36 epatch "${FILESDIR}/valgrind-3.4.1-glibc-2.10.1.patch"
37
38 # Respect LDFLAGS also for libmpiwrap.so (bug #279194)
39 epatch "${FILESDIR}/valgrind-3.5.0-respect-LDFLAGS.patch"
40
41 # Yet more local labels, this time for ppc32 & ppc64
42 epatch "${FILESDIR}/valgrind-3.5.0-local-labels.patch"
43
44 # Don't just reject glibc-2.11
45 epatch "${FILESDIR}/valgrind-3.5.0-glibc-2.11.patch"
46
47 # Don't build in empty assembly files for other platforms or we'll get a QA
48 # warning about executable stacks.
49 epatch "${FILESDIR}/valgrind-3.5.0-non-exec-stack.patch"
50
51 # Minimal fixes required for glibc-2.12
52 epatch "${FILESDIR}/valgrind-3.5.0-glibc-2.12.patch"
53 epatch "${FILESDIR}/valgrind-3.5.0-stat_h.patch"
54
55 # Regenerate autotools files
56 eautoreconf
57 }
58
59 src_compile() {
60 local myconf
61
62 # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
63 # while compiling insn_sse.c in none/tests/x86
64 # -fpie valgrind seemingly hangs when built with pie on
65 # amd64 (bug #102157)
66 # -fstack-protector more undefined references to __guard and __stack_smash_handler
67 # because valgrind doesn't link to glibc (bug #114347)
68 # -ggdb3 segmentation fault on startup
69 filter-flags -fomit-frame-pointer
70 filter-flags -fpie
71 filter-flags -fstack-protector
72 replace-flags -ggdb3 -ggdb2
73
74 # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
75 if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
76 ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
77 replace-flags -O3 -O2
78 fi
79
80 if use amd64 || use ppc64; then
81 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
82 fi
83
84 # Don't use mpicc unless the user asked for it (bug #258832)
85 if ! use mpi; then
86 myconf="${myconf} --without-mpicc"
87 fi
88
89 econf ${myconf} || die "Configure failed!"
90 emake || die "Make failed!"
91 }
92
93 src_install() {
94 emake DESTDIR="${D}" install || die "Install failed!"
95 dodoc AUTHORS FAQ.txt NEWS README*
96 }
97
98 pkg_postinst() {
99 if use ppc || use ppc64 || use amd64 ; then
100 ewarn "Valgrind will not work on ppc, ppc64 or amd64 if glibc does not have"
101 ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065"
102 ewarn "and http://bugs.gentoo.org/show_bug.cgi?id=274771)."
103 ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
104 ewarn "remerge glibc."
105 fi
106 }

  ViewVC Help
Powered by ViewVC 1.1.20