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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Nov 2 23:59:17 2013 UTC (13 months, 3 weeks ago) by blueness
Branch: MAIN
Version bump

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2013 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.8.1-r1.ebuild,v 1.1 2013/06/18 20:56:20 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 ~x64-macos ~x86-macos"
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 # Don't force multiarch stuff on OSX, bug #306467
25 sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
26
27 # Respect CFLAGS, LDFLAGS
28 epatch "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
29
30 # Changing Makefile.all.am to disable SSP
31 epatch "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
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.9.0-non-exec-stack.patch
39
40 # Regenerate autotools files
41 eautoreconf
42 }
43
44 src_configure() {
45 local myconf
46
47 # Respect ar, bug #468114
48 tc-export AR
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 # -m64 -mx32 for multilib-portage, bug #398825
57 # -ggdb3 segmentation fault on startup
58 filter-flags -fomit-frame-pointer
59 filter-flags -fpie
60 filter-flags -fstack-protector
61 filter-flags -m64 -mx32
62 replace-flags -ggdb3 -ggdb2
63
64 if use amd64 || use ppc64; then
65 ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
66 fi
67
68 # Force bitness on darwin, bug #306467
69 use x86-macos && myconf="${myconf} --enable-only32bit"
70 use x64-macos && myconf="${myconf} --enable-only64bit"
71
72 # Don't use mpicc unless the user asked for it (bug #258832)
73 if ! use mpi; then
74 myconf="${myconf} --without-mpicc"
75 fi
76
77 econf ${myconf}
78 }
79
80 src_install() {
81 emake DESTDIR="${D}" install
82 dodoc AUTHORS FAQ.txt NEWS README*
83
84 pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
85
86 if [[ ${CHOST} == *-darwin* ]] ; then
87 # fix install_names on shared libraries, can't turn them into bundles,
88 # as dyld won't load them any more then, bug #306467
89 local l
90 for l in "${ED}"/usr/lib/valgrind/*.so ; do
91 install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
92 done
93 fi
94 }
95
96 pkg_postinst() {
97 elog "Valgrind will not work if glibc does not have debug symbols."
98 elog "To fix this you can add splitdebug to FEATURES in make.conf"
99 elog "and remerge glibc. See:"
100 elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
101 elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
102 elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
103 }

  ViewVC Help
Powered by ViewVC 1.1.20