| 1 |
griffon26 |
1.1 |
# Copyright 1999-2006 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
caleb |
1.5 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.1.1.ebuild,v 1.4 2006/06/14 17:07:34 griffon26 Exp $ |
| 4 |
griffon26 |
1.1 |
|
| 5 |
griffon26 |
1.4 |
inherit autotools eutils flag-o-matic toolchain-funcs |
| 6 |
griffon26 |
1.1 |
|
| 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 |
tsunam |
1.2 |
KEYWORDS="-* ~amd64 ~ppc x86" |
| 14 |
griffon26 |
1.1 |
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 |
|
|
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.flags.am to disable SSP" |
| 29 |
|
|
sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' Makefile.flags.am |
| 30 |
|
|
|
| 31 |
|
|
# Correct hard coded doc location |
| 32 |
|
|
sed -i -e "s:doc/valgrind/:doc/${P}/:" docs/Makefile.am |
| 33 |
|
|
|
| 34 |
griffon26 |
1.3 |
# Regenerate autotools files |
| 35 |
|
|
eautoreconf |
| 36 |
griffon26 |
1.1 |
|
| 37 |
|
|
# fix for amd64 no-multilib profile till valgrind 3.2.0 is out (bug #114407) |
| 38 |
|
|
use amd64 && (has_multilib_profile || epatch "${FILESDIR}/valgrind-3.1.0-amd64-nomultilib-fix.patch") |
| 39 |
|
|
} |
| 40 |
|
|
|
| 41 |
|
|
src_compile() { |
| 42 |
|
|
local myconf |
| 43 |
|
|
|
| 44 |
|
|
# -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression" |
| 45 |
|
|
# while compiling insn_sse.c in none/tests/x86 |
| 46 |
|
|
# -fpie valgrind seemingly hangs when built with pie on |
| 47 |
|
|
# amd64 (bug #102157) |
| 48 |
|
|
# -fstack-protector more undefined references to __guard and __stack_smash_handler |
| 49 |
|
|
# because valgrind doesn't link to glibc (bug #114347) |
| 50 |
|
|
# -ggdb3 segmentation fault on startup |
| 51 |
|
|
filter-flags -fomit-frame-pointer |
| 52 |
|
|
filter-flags -fpie |
| 53 |
|
|
filter-flags -fstack-protector |
| 54 |
|
|
replace-flags -ggdb3 -ggdb2 |
| 55 |
|
|
|
| 56 |
griffon26 |
1.4 |
# gcc 3.3.x fails to compile valgrind with -O3 (bug #129776) |
| 57 |
|
|
if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then |
| 58 |
|
|
ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead." |
| 59 |
|
|
replace-flags -O3 -O2 |
| 60 |
|
|
fi |
| 61 |
|
|
|
| 62 |
griffon26 |
1.1 |
# Optionally build in X suppression files |
| 63 |
|
|
use X && myconf="--with-x" || myconf="--with-x=no" |
| 64 |
|
|
|
| 65 |
|
|
econf ${myconf} || die "Configure failed!" |
| 66 |
|
|
emake || die "Make failed!" |
| 67 |
|
|
} |
| 68 |
|
|
|
| 69 |
|
|
src_install() { |
| 70 |
|
|
make DESTDIR="${D}" install || die "Install failed!" |
| 71 |
|
|
dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README* |
| 72 |
|
|
} |