# Maintainer: Natanael Copa pkgname=valgrind pkgver=3.12.0 pkgrel=1 pkgdesc="A tool to help find memory-management problems in programs" url="http://valgrind.org/" arch="all !aarch64" license="GPL2+" # it seems like busybox sed works but the configure script requires GNU sed makedepends="sed paxmark perl bash autoconf automake libtool" # from README_PACKAGERS: # Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so # in the installation tree. Either Valgrind won't work at all, or it # will still work if you do, but will generate less helpful error # messages. options="!strip" subpackages="$pkgname-dev $pkgname-doc" source="http://$pkgname.org/downloads/$pkgname-$pkgver.tar.bz2 uclibc.patch musl-fixes.patch arm.patch" builddir="$srcdir"/$pkgname-$pkgver prepare() { default_prepare cd "$builddir" aclocal && autoconf && automake --add-missing echo '#include ' > include/a.out.h } build() { cd "$builddir" # fails to build with ccache export CC="gcc" export CFLAGS="$CFLAGS -fno-stack-protector -no-pie" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --without-mpicc make } package() { cd "$builddir" make DESTDIR="$pkgdir" install # we have options=!strip above so we strip the /usr/bin/* manually if [ -z "$DEBUG" ]; then strip "$pkgdir"/usr/bin/valgrind \ "$pkgdir"/usr/bin/valgrind-di-server \ "$pkgdir"/usr/bin/vgdb \ "$pkgdir"/usr/bin/valgrind-listener \ "$pkgdir"/usr/bin/cg_merge fi # pax causes some issues # http://marc.info/?l=gentoo-hardened&m=119512627126298&w=2 # http://bugs.alpinelinux.org/issues/999 paxmark -m "$pkgdir"/usr/lib/valgrind/*-*-linux } sha512sums="2c083f7c2e74dc58600397726d9d3af7a2cea40fe3d8733149886d1d77867e6c09996e5be1c58dd932f3662acf7363e04eeadbc0f9c8f0dac089e605024229be valgrind-3.12.0.tar.bz2 d59a10db9037e120df2ee94a103402ca95a79abee9d8be63e4e1bca29c82dca775cc402a79b854ec11a2160a4d2da202c237369418e221d1925267ea2613fd5d uclibc.patch 47735294a0641208c6bcbc51203019da18ec16d51316ca6437d0f9eba14d9acc09d82f65149b8b1d56aba90825397ef0c215e8036eccd0dce1287c58ee3ccda2 musl-fixes.patch 9ee297d1b2b86891584443ad0caadc4977e1447979611ccf1cc55dbee61911b0b063bc4ad936d86c451cedae410cb3219b5a088b2ad0aa17df182d564fe36cfe arm.patch"