Lines 2-7
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
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 $ |
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 |
|
4 |
|
|
|
5 |
EAPI=2 |
5 |
inherit autotools eutils flag-o-matic toolchain-funcs |
6 |
inherit autotools eutils flag-o-matic toolchain-funcs |
6 |
|
7 |
|
7 |
DESCRIPTION="An open-source memory debugger for GNU/Linux" |
8 |
DESCRIPTION="An open-source memory debugger for GNU/Linux" |
Lines 10-63
Link Here
|
10 |
|
11 |
|
11 |
LICENSE="GPL-2" |
12 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
13 |
SLOT="0" |
13 |
KEYWORDS="-* amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux" |
14 |
KEYWORDS="-* ~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
14 |
IUSE="mpi" |
15 |
IUSE="mpi" |
15 |
|
16 |
|
16 |
DEPEND="mpi? ( virtual/mpi )" |
17 |
DEPEND="mpi? ( virtual/mpi )" |
17 |
RDEPEND="${DEPEND} |
18 |
RDEPEND="${DEPEND} |
18 |
!dev-util/callgrind" |
19 |
!dev-util/callgrind" |
19 |
|
20 |
|
20 |
src_unpack() { |
21 |
src_prepare() { |
21 |
unpack ${A} |
22 |
# Respect CFLAGS, LDFLAGS |
22 |
cd "${S}" |
23 |
sed -i \ |
23 |
|
24 |
-e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' \ |
24 |
# make sure our CFLAGS are respected |
25 |
configure.in || die |
25 |
einfo "Changing configure.in to respect CFLAGS" |
26 |
sed -i -e '/^CFLAGS =/d' -e '/^LDFLAGS =/d' mpi/Makefile.am || die |
26 |
sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in |
|
|
27 |
|
27 |
|
28 |
# undefined references to __guard and __stack_smash_handler in VEX (bug #114347) |
28 |
# undefined references to __guard and __stack_smash_handler in VEX (bug #114347) |
29 |
einfo "Changing Makefile.all.am to disable SSP" |
29 |
# Changing Makefile.all.am to disable SSP |
30 |
sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' Makefile.all.am |
30 |
sed -i \ |
|
|
31 |
-e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' \ |
32 |
Makefile.all.am || die |
31 |
|
33 |
|
32 |
# Correct hard coded doc location |
34 |
# Correct hard coded doc location |
33 |
sed -i -e "s:doc/valgrind:doc/${P}:" docs/Makefile.am |
35 |
sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die |
34 |
|
36 |
|
35 |
# Fix up some suppressions that were not general enough for glibc versions |
37 |
# Fix up some suppressions that were not general enough for glibc versions |
36 |
# with more than just a major and minor number. |
38 |
# with more than just a major and minor number. |
37 |
epatch "${FILESDIR}/valgrind-3.4.1-glibc-2.10.1.patch" |
39 |
epatch "${FILESDIR}/valgrind-3.4.1-glibc-2.10.1.patch" |
38 |
|
40 |
|
39 |
# Respect LDFLAGS also for libmpiwrap.so (bug #279194) |
|
|
40 |
epatch "${FILESDIR}/valgrind-3.5.0-respect-LDFLAGS.patch" |
41 |
|
42 |
# Yet more local labels, this time for ppc32 & ppc64 |
43 |
epatch "${FILESDIR}/valgrind-3.5.0-local-labels.patch" |
44 |
|
45 |
# Don't just reject glibc-2.11 |
46 |
epatch "${FILESDIR}/valgrind-3.5.0-glibc-2.11.patch" |
47 |
|
48 |
# Don't build in empty assembly files for other platforms or we'll get a QA |
49 |
# warning about executable stacks. |
50 |
epatch "${FILESDIR}/valgrind-3.5.0-non-exec-stack.patch" |
51 |
|
52 |
# Minimal fixes required for glibc-2.12 |
53 |
epatch "${FILESDIR}/valgrind-3.5.0-glibc-2.12.patch" |
54 |
epatch "${FILESDIR}/valgrind-3.5.0-stat_h.patch" |
55 |
|
56 |
# Regenerate autotools files |
57 |
eautoreconf |
41 |
eautoreconf |
58 |
} |
42 |
} |
59 |
|
43 |
|
60 |
src_compile() { |
44 |
src_configure() { |
61 |
local myconf |
45 |
local myconf |
62 |
|
46 |
|
63 |
# -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression" |
47 |
# -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression" |
Lines 72-83
Link Here
|
72 |
filter-flags -fstack-protector |
56 |
filter-flags -fstack-protector |
73 |
replace-flags -ggdb3 -ggdb2 |
57 |
replace-flags -ggdb3 -ggdb2 |
74 |
|
58 |
|
75 |
# gcc 3.3.x fails to compile valgrind with -O3 (bug #129776) |
|
|
76 |
if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then |
77 |
ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead." |
78 |
replace-flags -O3 -O2 |
79 |
fi |
80 |
|
81 |
if use amd64 || use ppc64; then |
59 |
if use amd64 || use ppc64; then |
82 |
! has_multilib_profile && myconf="${myconf} --enable-only64bit" |
60 |
! has_multilib_profile && myconf="${myconf} --enable-only64bit" |
83 |
fi |
61 |
fi |
Lines 87-98
Link Here
|
87 |
myconf="${myconf} --without-mpicc" |
65 |
myconf="${myconf} --without-mpicc" |
88 |
fi |
66 |
fi |
89 |
|
67 |
|
90 |
econf ${myconf} || die "Configure failed!" |
68 |
econf ${myconf} |
91 |
emake || die "Make failed!" |
|
|
92 |
} |
69 |
} |
93 |
|
70 |
|
94 |
src_install() { |
71 |
src_install() { |
95 |
emake DESTDIR="${D}" install || die "Install failed!" |
72 |
emake DESTDIR="${D}" install || die |
96 |
dodoc AUTHORS FAQ.txt NEWS README* |
73 |
dodoc AUTHORS FAQ.txt NEWS README* |
97 |
} |
74 |
} |
98 |
|
75 |
|