Skip to content

Commit df147fd

Browse files
authored
Merge pull request #668 from macaroni-os/merge/mark-31/bump-dev-util_valgrind-3_25_1
mark-devkit: [mark-31] Bump dev-util/valgrind-3.25.1
2 parents 691c0a0 + 5759e44 commit df147fd

2 files changed

Lines changed: 81 additions & 0 deletions

File tree

dev-util/valgrind/Manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
DIST valgrind-3.24.0.tar.bz2 16632387 BLAKE2B e11ad08f0062bd39788cd71d7ce058dec7a7207fbbe25f0dbfc7fb5735667809681cec2c843659553fbd49bcc6c71bdb93d87ffda3589247e4ee87c98fe51332 SHA512 6c131ff93d1f432d8362a47285cc377cba224ebca4f18e922c6156f7736d43020ece14d8fd16913498ab00fd18c85e2042a7d5351c3901e80413c584ebb406f3
2+
DIST valgrind-3.25.1.tar.bz2 16888334 BLAKE2B 5337096c846b62899017589fbb242ca601741ebb353834cd788efb60f951f2380c5904ba5102a17b26fa9561c2fa58912570d477e5fcc901612d6e5c14ff9b97 SHA512 6a474d58730274c57d6ca012ffd3226d393d6507cd57bf46c3b26c87a0cba84e3c8cfc84c8c76e50041861e98baba7b9613490faef4212d082845581d08af351
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Distributed under the terms of the GNU General Public License v2
2+
3+
EAPI=7
4+
inherit autotools flag-o-matic toolchain-funcs pax-utils
5+
6+
DESCRIPTION="An open-source memory debugger for GNU/Linux"
7+
HOMEPAGE="https://www.valgrind.org"
8+
LICENSE="GPL-2"
9+
SLOT="0"
10+
IUSE="mpi"
11+
12+
SRC_URI="https://sourceware.org/pub/valgrind/valgrind-3.25.1.tar.bz2 -> valgrind-3.25.1.tar.bz2"
13+
KEYWORDS="*"
14+
15+
DEPEND="mpi? ( virtual/mpi )"
16+
RDEPEND="${DEPEND}"
17+
18+
src_prepare() {
19+
# Correct hard coded doc location
20+
sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
21+
22+
# Don't force multiarch stuff on OSX, bug #306467
23+
sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
24+
25+
# Respect CFLAGS, LDFLAGS
26+
eapply "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
27+
28+
eapply "${FILESDIR}"/${PN}-3.15.0-Build-ldst_multiple-test-with-fno-pie.patch
29+
30+
# Allow users to test their own patches
31+
eapply_user
32+
33+
# Regenerate autotools files
34+
eautoreconf
35+
}
36+
37+
src_configure() {
38+
local myconf=()
39+
40+
# Respect ar, bug #468114
41+
tc-export AR
42+
43+
# -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
44+
# while compiling insn_sse.c in none/tests/x86
45+
# -fstack-protector more undefined references to __guard and __stack_smash_handler
46+
# because valgrind doesn't link to glibc (bug #114347)
47+
# -fstack-protector-all Fails same way as -fstack-protector/-fstack-protector-strong.
48+
# Note: -fstack-protector-explicit is a no-op for Valgrind, no need to strip it
49+
# -fstack-protector-strong See -fstack-protector (bug #620402)
50+
# -m64 -mx32 for multilib-portage, bug #398825
51+
# -ggdb3 segmentation fault on startup
52+
filter-flags -fomit-frame-pointer
53+
filter-flags -fstack-protector
54+
filter-flags -fstack-protector-all
55+
filter-flags -fstack-protector-strong
56+
filter-flags -m64 -mx32
57+
replace-flags -ggdb3 -ggdb2
58+
59+
# Don't use mpicc unless the user asked for it (bug #258832)
60+
if ! use mpi; then
61+
myconf+=("--without-mpicc")
62+
fi
63+
64+
econf "${myconf[@]}"
65+
}
66+
67+
src_install() {
68+
default
69+
dodoc FAQ.txt
70+
pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
71+
}
72+
73+
pkg_postinst() {
74+
elog "Valgrind will not work if glibc does not have debug symbols."
75+
elog "To fix this you can add splitdebug to FEATURES in make.conf"
76+
elog "and remerge glibc. See:"
77+
elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
78+
elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
79+
elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
80+
}

0 commit comments

Comments
 (0)