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

Contents of /dev-util/valgrind/valgrind-3.6.1-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu Sep 13 12:23:02 2012 UTC (2 years, 1 month ago) by ago
Branch: MAIN
Changes since 1.3: +2 -2 lines
Stable for amd64, wrt bug #430822

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 blueness 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ago 1.4 # $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.6.1-r4.ebuild,v 1.3 2012/09/13 10:31:17 blueness Exp $
4 blueness 1.1
5     EAPI=2
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 ago 1.4 KEYWORDS="-* amd64 ~arm x86 ~amd64-linux ~x86-linux"
15 blueness 1.1 IUSE="mpi qt4"
16    
17     DEPEND="mpi? ( virtual/mpi )"
18     RDEPEND="${DEPEND}"
19    
20     src_prepare() {
21     # Respect CFLAGS, LDFLAGS
22     sed -i -e '/^CPPFLAGS =/d' -e '/^CFLAGS =/d' -e '/^LDFLAGS =/d' \
23     mpi/Makefile.am || die
24    
25     # Changing Makefile.all.am to disable SSP
26     sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' \
27     Makefile.all.am || die
28    
29     # Correct hard coded doc location
30     sed -i -e "s:doc/valgrind:doc/${PF}:" \
31     docs/Makefile.am || die
32    
33     # Yet more local labels, this time for ppc32 & ppc64
34     epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch
35    
36     # Don't build in empty assembly files for other platforms or we'll get a QA
37     # warning about executable stacks.
38     epatch "${FILESDIR}"/${PN}-3.6.0-non-exec-stack.patch
39    
40     # Fix up some suppressions that were not general enough for glibc versions
41     # with more than just a major and minor number.
42     epatch "${FILESDIR}"/${PN}-3.4.1-glibc-2.10.1.patch
43    
44     # Remove automagic dependency on qt4
45     epatch "${FILESDIR}"/${PN}-3.6.1-user-enable-qt4.patch
46    
47     # Allow valgrind to build against linux-3, bug #370857
48     epatch "${FILESDIR}"/${PN}-3.6.1-linux-3.patch
49    
50     # Allow valgrind to build against glibc-2.14, bug #378157
51     epatch "${FILESDIR}"/${PN}-3.6.1-glibc-2.14.patch
52    
53     # Allow valgrind to build against glibc-2.15, bug #390323 comment 31
54     epatch "${FILESDIR}"/${PN}-3.6.1-glibc-2.15.patch
55    
56     # Back port of fix for bug #403179, https://bugs.kde.org/show_bug.cgi?id=277045
57     epatch "${FILESDIR}"/${PN}-3.6.1-fix-unhandled-opcode.patch
58    
59     # Fix stricter use of dir variables, bugs #397429 and #403779
60     epatch "${FILESDIR}"/${PN}-3.6.1-automake-1.11.3.patch
61    
62     # Regenerate autotools files
63     eautoreconf
64     }
65    
66     src_configure() {
67     local myconf
68    
69     # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
70     # while compiling insn_sse.c in none/tests/x86
71     # -fpie valgrind seemingly hangs when built with pie on
72     # amd64 (bug #102157)
73     # -fstack-protector more undefined references to __guard and __stack_smash_handler
74     # because valgrind doesn't link to glibc (bug #114347)
75     # -ggdb3 segmentation fault on startup
76     filter-flags -fomit-frame-pointer
77     filter-flags -fpie
78     filter-flags -fstack-protector
79     replace-flags -ggdb3 -ggdb2
80    
81     if use amd64 || use ppc64; then
82     ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
83     fi
84    
85     # Don't use mpicc unless the user asked for it (bug #258832)
86     if ! use mpi; then
87     myconf="${myconf} --without-mpicc"
88     fi
89    
90     if ! use qt4; then
91     myconf="${myconf} --disable-qtcore"
92     fi
93    
94     econf ${myconf}
95     }
96    
97     src_install() {
98     emake DESTDIR="${D}" install || die
99     dodoc AUTHORS FAQ.txt NEWS README*
100    
101     pax-mark m "${D}"/usr/$(get_libdir)/valgrind/*-*-linux
102     }
103    
104     pkg_postinst() {
105     ewarn "Valgrind will not work if glibc does not have debug symbols."
106     ewarn "To fix this you can add splitdebug to FEATURES in make.conf"
107     ewarn "and remerge glibc. See:"
108     ewarn "https://bugs.gentoo.org/show_bug.cgi?id=214065"
109     ewarn "https://bugs.gentoo.org/show_bug.cgi?id=274771"
110     ewarn "https://bugs.gentoo.org/show_bug.cgi?id=388703"
111     }

  ViewVC Help
Powered by ViewVC 1.1.20