2018-01-06 20:32:44 +00:00
|
|
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
|
|
# Contributor: Dan McGee <dan@archlinux.org>
|
|
|
|
# Contributor: Allan McRae <allan@archlinux.org>
|
2012-06-06 20:28:35 +00:00
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2015-10-27 03:46:58 +00:00
|
|
|
# - hold for toolchain update, only build for v7/v8
|
2017-10-27 13:03:57 +00:00
|
|
|
# - patch from Fedora for AArch64
|
2018-01-06 20:32:44 +00:00
|
|
|
# - removed lib32 package make/optdepends
|
2013-08-15 12:37:29 +00:00
|
|
|
|
2015-10-27 03:46:58 +00:00
|
|
|
buildarch=12
|
2021-02-06 15:36:53 +00:00
|
|
|
noautobuild=1
|
2014-02-10 04:08:27 +00:00
|
|
|
|
2012-06-06 20:28:35 +00:00
|
|
|
pkgname=valgrind
|
2020-07-23 02:02:51 +00:00
|
|
|
pkgver=3.16.1
|
2021-02-06 15:36:53 +00:00
|
|
|
pkgrel=4
|
2018-01-06 20:32:44 +00:00
|
|
|
pkgdesc='Tool to help find memory-management problems in programs'
|
|
|
|
arch=('x86_64')
|
|
|
|
license=('GPL')
|
2014-04-06 02:27:51 +00:00
|
|
|
url='http://valgrind.org/'
|
2018-04-24 12:17:36 +00:00
|
|
|
depends=('glibc' 'perl')
|
2020-07-23 02:02:51 +00:00
|
|
|
makedepends=('gdb' 'docbook-xml'
|
2018-08-24 05:23:52 +00:00
|
|
|
'docbook-xsl' 'docbook-sgml')
|
2018-01-06 20:32:44 +00:00
|
|
|
checkdepends=('procps-ng')
|
|
|
|
provides=('valgrind-multilib')
|
|
|
|
replaces=('valgrind-multilib')
|
|
|
|
options=('!emptydirs' '!strip')
|
2020-07-23 02:02:51 +00:00
|
|
|
source=(https://sourceware.org/pub/valgrind/valgrind-${pkgver}.tar.bz2{,.asc}
|
2018-01-06 20:32:44 +00:00
|
|
|
valgrind-3.7.0-respect-flags.patch
|
2021-01-21 13:17:48 +00:00
|
|
|
valgrind-3.16-openmpi-4.0.patch
|
2018-01-06 20:32:44 +00:00
|
|
|
valgrind-3.13.0-arm64-hwcap.patch)
|
2020-07-23 02:02:51 +00:00
|
|
|
validpgpkeys=(
|
|
|
|
0E9FFD0C16A1856CF9C7C690BA0166E698FA6035 # Julian Seward <jseward@acm.org>
|
|
|
|
)
|
|
|
|
sha512sums=('2a4173efe1b6facdd2f5c5ee8ed006704168eba1813736fccc8191d60363afd96197512cf42037e65f18d4ddd49adc74a54c47210df216fba3c46bf68ef0f950'
|
|
|
|
'SKIP'
|
2018-01-06 20:32:44 +00:00
|
|
|
'e0cec39381cefeca09ae4794cca309dfac7c8693e6315e137e64f5c33684598726d41cfbb4edf764fe985503b13ff596184ca5fc32b159d500ec092e4cf8838c'
|
2021-01-21 13:17:48 +00:00
|
|
|
'65157c991c342953b838632bd1494ac101d26a5c7bef412606f20a18c42c0448c092a983436bf8d73af6f9518471c3ed26ddd7e37e3157a235bc001dffdad7e7'
|
2017-10-27 13:03:57 +00:00
|
|
|
'5af853399c6abdf8016fd1c2be854b3952b7d7e9ca16c870f84eed72e606e639d5f64de32e60105899f5201b53156380ae460111e05209e843301492742c9bfd')
|
2020-07-23 02:02:51 +00:00
|
|
|
b2sums=('1c333c26827f7a8356869e8758da9dd6a7444642ac4f6377c84fdab8349b9cee1e9bf2cf2eb86043c4feffab342dd97da20e76d7566d0296189e6ea8483a8c65'
|
|
|
|
'SKIP'
|
|
|
|
'af556fdf3c02e37892bfe9afebc954cf2f1b2fa9b75c1caacfa9f3b456ebc02bf078475f9ee30079b3af5d150d41415a947c3d04235c1ea8412cf92b959c484a'
|
2021-01-21 13:17:48 +00:00
|
|
|
'28d3a259a96fb4a1c4417674f587058a65b5e5c4e0f3a88d443d2ba36da71273bcfbf01947de0fa523813f627a439f539d6139eb9c9ebede96a002310de0d0c1'
|
2020-07-23 02:02:51 +00:00
|
|
|
'ff8cf51a6034c13ffbc412c387e83a32fa59f96e01be8faf6b52aa6d55bd5e5836c16d75f2291d87450709d0c75689b21870514006c603c6419940a9b977e609')
|
2017-10-27 13:03:57 +00:00
|
|
|
|
2018-08-24 05:23:52 +00:00
|
|
|
|
2017-10-27 13:03:57 +00:00
|
|
|
prepare() {
|
2020-07-23 02:02:51 +00:00
|
|
|
cd valgrind-${pkgver}
|
2018-01-06 20:32:44 +00:00
|
|
|
patch -Np1 < ../valgrind-3.7.0-respect-flags.patch
|
2021-01-21 13:17:48 +00:00
|
|
|
patch -Np1 < ../valgrind-3.16-openmpi-4.0.patch
|
2018-01-06 20:32:44 +00:00
|
|
|
patch -Np1 < ../valgrind-3.13.0-arm64-hwcap.patch
|
2021-01-21 13:17:48 +00:00
|
|
|
sed -i 's|sgml/docbook/xsl-stylesheets|xml/docbook/xsl-stylesheets-1.79.2-nons|' docs/Makefile.am
|
2018-08-24 05:23:52 +00:00
|
|
|
|
|
|
|
autoreconf -ifv
|
2017-10-27 13:03:57 +00:00
|
|
|
}
|
2014-02-10 04:08:27 +00:00
|
|
|
|
|
|
|
build() {
|
2019-10-06 15:28:10 +00:00
|
|
|
# valgrind does not like some of our flags
|
2017-03-11 03:43:42 +00:00
|
|
|
CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
|
2019-10-06 15:28:10 +00:00
|
|
|
CFLAGS=${CFLAGS/-fno-plt/}
|
|
|
|
CXXFLAGS=${CXXFLAGS/-fno-plt/}
|
2015-10-02 00:26:51 +00:00
|
|
|
|
2020-07-23 02:02:51 +00:00
|
|
|
cd valgrind-${pkgver}
|
2018-01-06 20:32:44 +00:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2019-10-06 15:28:10 +00:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--mandir=/usr/share/man
|
2012-06-06 20:28:35 +00:00
|
|
|
make
|
2018-08-24 05:23:52 +00:00
|
|
|
make -C docs man-pages
|
2012-06-06 20:28:35 +00:00
|
|
|
}
|
|
|
|
|
2018-01-06 20:32:44 +00:00
|
|
|
check() {
|
2020-07-23 02:02:51 +00:00
|
|
|
cd valgrind-${pkgver}
|
2018-01-06 20:32:44 +00:00
|
|
|
|
|
|
|
# Make sure a basic binary runs. There should be no errors.
|
|
|
|
./vg-in-place --error-exitcode=1 /bin/true
|
|
|
|
|
2019-10-06 15:28:10 +00:00
|
|
|
# Make sure no extra FLAGS leak through, the testsuite
|
|
|
|
# sets all flags necessary. See also configure above.
|
|
|
|
make check CPPFLAGS= CFLAGS= CXXFLAGS= LDFLAGS=
|
2018-01-06 20:32:44 +00:00
|
|
|
|
2020-07-23 02:02:51 +00:00
|
|
|
# XXX: run full regtest but only report issues some tests fail duo
|
|
|
|
# current toolchain and expectations, take a manual look if its fine
|
|
|
|
#echo "===============TESTING==================="
|
|
|
|
#make regtest || true
|
|
|
|
|
|
|
|
# Make sure test failures show up in build.log
|
|
|
|
# Gather up the diffs (at most the first 20 lines for each one)
|
|
|
|
#local f max_lines=20 diff_files=()
|
|
|
|
#mapfile -d '' diff_files < <(find . -name '*.diff' -print0 | sort -z)
|
|
|
|
#if (( ${#diff_files[@]} == 0 )); then
|
|
|
|
#echo "Congratulations, all tests passed!"
|
|
|
|
#else
|
|
|
|
#warning "Some tests failed!"
|
|
|
|
#for f in "${diff_files[@]}"; do
|
|
|
|
#echo "================================================="
|
|
|
|
#echo "${f}"
|
|
|
|
#echo "================================================="
|
|
|
|
#if (( $(wc -l < "${f}") < ${max_lines} )); then
|
|
|
|
#cat "${f}"
|
|
|
|
#else
|
|
|
|
#head -n ${max_lines} "${f}"
|
|
|
|
#echo "<truncated beyond ${max_lines} lines>"
|
|
|
|
#fi
|
|
|
|
#done | tee diffs
|
|
|
|
#fi
|
|
|
|
#echo "===============END TESTING==============="
|
2018-01-06 20:32:44 +00:00
|
|
|
}
|
|
|
|
|
2012-06-06 20:28:35 +00:00
|
|
|
package() {
|
2020-07-23 02:02:51 +00:00
|
|
|
cd valgrind-${pkgver}
|
2018-01-06 20:32:44 +00:00
|
|
|
make DESTDIR="${pkgdir}" install
|
2018-08-24 05:23:52 +00:00
|
|
|
|
2019-10-06 15:28:10 +00:00
|
|
|
install -Dm644 docs/*.1 -t "$pkgdir/usr/share/man/man1"
|
2018-08-24 05:23:52 +00:00
|
|
|
|
|
|
|
if check_option 'debug' n; then
|
2019-10-06 15:28:10 +00:00
|
|
|
find "${pkgdir}/usr/bin" -type f -executable -exec strip $STRIP_BINARIES {} + || :
|
2018-08-24 05:23:52 +00:00
|
|
|
fi
|
2012-06-06 20:28:35 +00:00
|
|
|
}
|
2018-01-06 20:32:44 +00:00
|
|
|
|
|
|
|
# vim: ts=2 sw=2 et:
|