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

Contents of /dev-util/valgrind/valgrind-3.7.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jul 25 16:33:18 2012 UTC (2 years, 4 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove older unstable versions

(Portage version: 2.1.10.65/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.7.0-r2.ebuild,v 1.2 2012/01/14 23:25:17 blueness Exp $
4
5 EAPI=4
6 inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils
7
8 DESCRIPTION="An open-source memory debugger for GNU/Linux"
9 HOMEPAGE="http://www.valgrind.org"
10 SRC_URI="http://www.valgrind.org/downloads/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="-* ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
15 IUSE="mpi"
16
17 DEPEND="mpi? ( virtual/mpi )"
18 RDEPEND="${DEPEND}"
19
20 src_prepare() {
21 # Correct hard coded doc location
22 sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
23
24 # Respect CFLAGS, LDFLAGS
25 epatch "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
26
27 # Changing Makefile.all.am to disable SSP
28 epatch "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
29
30 # Yet more local labels, this time for ppc32 & ppc64
31 epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch
32
33 # Don't build in empty assembly files for other platforms or we'll get a QA
34 # warning about executable stacks.
35 epatch "${FILESDIR}"/${PN}-3.7.0-non-exec-stack.patch
36
37 # Fix the regex to get gcc's version
38 epatch "${FILESDIR}"/${PN}-3.7.0-fix-gcc-regex.patch
39
40 # Fix stricter use of dir variables, bug #397429
41 epatch "${FILESDIR}"/${PN}-3.7.0-automake-1.11.2.patch
42
43 # Fix for glibc 2.15, bug #398921
44 epatch "${FILESDIR}"/${PN}-3.7.0-glibc-2.15.patch
45
46 # Regenerate autotools files
47 eautoreconf
48 }
49
50 src_configure() {
51 local myconf
52
53 # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
54 # while compiling insn_sse.c in none/tests/x86
55 # -fpie valgrind seemingly hangs when built with pie on
56 # amd64 (bug #102157)
57 # -fstack-protector more undefined references to __guard and __stack_smash_handler
58 # because valgrind doesn't link to glibc (bug #114347)
59 # -ggdb3 segmentation fault on startup
60 filter-flags -fomit-frame-pointer
61 filter-flags -fpie
62 filter-flags -fstack-protector
63 replace-flags -ggdb3 -ggdb2
64
65 if use amd64 || use ppc64; then
66 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
67 fi
68
69 # Don't use mpicc unless the user asked for it (bug #258832)
70 if ! use mpi; then
71 myconf="${myconf} --without-mpicc"
72 fi
73
74 econf ${myconf}
75 }
76
77 src_install() {
78 emake DESTDIR="${D}" install
79 dodoc AUTHORS FAQ.txt NEWS README*
80
81 pax-mark m "${D}"/usr/$(get_libdir)/valgrind/*-*-linux
82 }
83
84 pkg_postinst() {
85 ewarn "Valgrind will not work if glibc does not have debug symbols."
86 ewarn "To fix this you can add splitdebug to FEATURES in make.conf"
87 ewarn "and remerge glibc. See:"
88 ewarn "https://bugs.gentoo.org/show_bug.cgi?id=214065"
89 ewarn "https://bugs.gentoo.org/show_bug.cgi?id=274771"
90 ewarn "https://bugs.gentoo.org/show_bug.cgi?id=388703"
91 }

  ViewVC Help
Powered by ViewVC 1.1.20