Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/valgrind/
Date: Thu, 28 May 2020 21:49:44
Message-Id: 1590702574.6115efb777e78b663a359c88361ccc355ee46a0d.blueness@gentoo
1 commit: 6115efb777e78b663a359c88361ccc355ee46a0d
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 28 21:49:16 2020 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu May 28 21:49:34 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6115efb7
7
8 dev-util/valgrind: version bump to 3.16.0
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
12
13 dev-util/valgrind/Manifest | 1 +
14 dev-util/valgrind/valgrind-3.16.0.ebuild | 120 +++++++++++++++++++++++++++++++
15 2 files changed, 121 insertions(+)
16
17 diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest
18 index dcf5af4b3c0..f6762bcaa82 100644
19 --- a/dev-util/valgrind/Manifest
20 +++ b/dev-util/valgrind/Manifest
21 @@ -1,2 +1,3 @@
22 DIST valgrind-3.14.0.tar.bz2 16602858 BLAKE2B 00d601593388180cc874cf2f0c78e79f705f145e45ea82996117cb91ba881e7888ef241fb7e45927f82f99666d76ed35cb5d451e9a3ef123c04a0dff233b2269 SHA512 68e548c42df31dc2b883a403e0faff7480c49b3054841870f5d2f742141ba199eca5d83c96bbf283115f0633f2bdb0860161d422f98e3ec720ec65760d250f97
23 DIST valgrind-3.15.0.tar.bz2 20241437 BLAKE2B a1bd46d46b3cd9f963773d011e7c74bf5e09e59be13afe38229a3c66a89eeb416498faed67d6ec21489b630b55ac73cc212e17ba515884f8b6374849a60e3720 SHA512 5695d1355226fb63b0c80809ed43bb077b6eed4d427792d9d7ed944c38b557a84fe3c783517b921e32f161228e10e4625bea0550faa4685872bb4454450cfa7f
24 +DIST valgrind-3.16.0.tar.bz2 16267317 BLAKE2B 4ab7a248bc46a772a03fecdab4658b059e65dc328f422f51d23d116d658b8fcfe1dc4b3b26b43ca7bd824169b169506f67cd14a1db2b767b5b5a34c949687d25 SHA512 6c82a0121e0ffde79f84943ea0f5791159ad3e37a490c1a18ff23f41cd4de62b62110e9c4d48b95b06d542f2a6d638492ecaeba9fed48f7e909e959aa4b4856d
25
26 diff --git a/dev-util/valgrind/valgrind-3.16.0.ebuild b/dev-util/valgrind/valgrind-3.16.0.ebuild
27 new file mode 100644
28 index 00000000000..33873a0e69c
29 --- /dev/null
30 +++ b/dev-util/valgrind/valgrind-3.16.0.ebuild
31 @@ -0,0 +1,120 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +inherit autotools flag-o-matic toolchain-funcs multilib pax-utils
37 +
38 +DESCRIPTION="An open-source memory debugger for GNU/Linux"
39 +HOMEPAGE="http://www.valgrind.org"
40 +LICENSE="GPL-2"
41 +SLOT="0"
42 +IUSE="mpi"
43 +
44 +if [[ ${PV} == "9999" ]]; then
45 + EGIT_REPO_URI="https://sourceware.org/git/${PN}.git"
46 + inherit git-r3
47 +else
48 + SRC_URI="ftp://sourceware.org/pub/valgrind/${P}.tar.bz2"
49 + KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
50 +fi
51 +
52 +DEPEND="mpi? ( virtual/mpi )"
53 +RDEPEND="${DEPEND}"
54 +
55 +src_prepare() {
56 + # Correct hard coded doc location
57 + sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
58 +
59 + # Don't force multiarch stuff on OSX, bug #306467
60 + sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
61 +
62 + # Respect CFLAGS, LDFLAGS
63 + eapply "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
64 +
65 + eapply "${FILESDIR}"/${PN}-3.15.0-Build-ldst_multiple-test-with-fno-pie.patch
66 +
67 + if [[ ${CHOST} == *-solaris* ]] ; then
68 + # upstream doesn't support this, but we don't build with
69 + # Sun/Oracle ld, we have a GNU toolchain, so get some things
70 + # working the Linux/GNU way
71 + find "${S}" -name "Makefile.am" -o -name "Makefile.tool.am" | xargs \
72 + sed -i -e 's:-M,/usr/lib/ld/map.noexstk:-z,noexecstack:' || die
73 + cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
74 + fi
75 +
76 + # Allow users to test their own patches
77 + eapply_user
78 +
79 + # Regenerate autotools files
80 + eautoreconf
81 +}
82 +
83 +src_configure() {
84 + local myconf=()
85 +
86 + # Respect ar, bug #468114
87 + tc-export AR
88 +
89 + # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
90 + # while compiling insn_sse.c in none/tests/x86
91 + # -fstack-protector more undefined references to __guard and __stack_smash_handler
92 + # because valgrind doesn't link to glibc (bug #114347)
93 + # -fstack-protector-all Fails same way as -fstack-protector/-fstack-protector-strong.
94 + # Note: -fstack-protector-explicit is a no-op for Valgrind, no need to strip it
95 + # -fstack-protector-strong See -fstack-protector (bug #620402)
96 + # -m64 -mx32 for multilib-portage, bug #398825
97 + # -ggdb3 segmentation fault on startup
98 + filter-flags -fomit-frame-pointer
99 + filter-flags -fstack-protector
100 + filter-flags -fstack-protector-all
101 + filter-flags -fstack-protector-strong
102 + filter-flags -m64 -mx32
103 + replace-flags -ggdb3 -ggdb2
104 +
105 + if use amd64 || use ppc64; then
106 + ! has_multilib_profile && myconf+=("--enable-only64bit")
107 + fi
108 +
109 + # Force bitness on darwin, bug #306467
110 + use x86-macos && myconf+=("--enable-only32bit")
111 + use x64-macos && myconf+=("--enable-only64bit")
112 +
113 + # Don't use mpicc unless the user asked for it (bug #258832)
114 + if ! use mpi; then
115 + myconf+=("--without-mpicc")
116 + fi
117 +
118 + econf "${myconf[@]}"
119 +}
120 +
121 +src_install() {
122 + default
123 +
124 + if [[ ${PV} == "9999" ]]; then
125 + # Otherwise FAQ.txt won't exist:
126 + emake -C docs FAQ.txt
127 + mv docs/FAQ.txt . || die "Couldn't move FAQ.txt"
128 + fi
129 +
130 + dodoc FAQ.txt
131 +
132 + pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
133 +
134 + if [[ ${CHOST} == *-darwin* ]] ; then
135 + # fix install_names on shared libraries, can't turn them into bundles,
136 + # as dyld won't load them any more then, bug #306467
137 + local l
138 + for l in "${ED}"/usr/lib/valgrind/*.so ; do
139 + install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
140 + done
141 + fi
142 +}
143 +
144 +pkg_postinst() {
145 + elog "Valgrind will not work if glibc does not have debug symbols."
146 + elog "To fix this you can add splitdebug to FEATURES in make.conf"
147 + elog "and remerge glibc. See:"
148 + elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
149 + elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
150 + elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
151 +}