# Maintainer: Natanael Copa pkgname=valgrind pkgver=3.11.0 pkgrel=0 pkgdesc="A tool to help find memory-management problems in programs" url="http://valgrind.org/" arch="x86 x86_64" license="GPL2+" depends="" # 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" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done aclocal && autoconf && automake --add-missing || return 1 echo '#include ' > include/a.out.h } build() { cd "$_builddir" # fails to build with ccache export CC="gcc" export CFLAGS="$CFLAGS -fno-stack-protector" export GCC_SPECS="hardenednopie.specs" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --without-mpicc \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 # we have options=!strip above so we strip the /usr/bin/* manually if [ -z "$DEBUG" ]; then strip "$pkgdir"/usr/bin/valgrind \ "$pkgdir"/usr/bin/no_op_client_for_valgrind \ "$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 } md5sums="4ea62074da73ae82e0162d6550d3f129 valgrind-3.11.0.tar.bz2 c29b4572a070eb0d3a6a977be586c771 uclibc.patch 474f8e1f9488b631c4b6d1530fea7f97 musl-fixes.patch" sha256sums="6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42 valgrind-3.11.0.tar.bz2 fab5afea5cb7abec79ff68088d97ccc188613c733b4dfc8ede029cb818ec397f uclibc.patch 1ee00eb48e6984e709de40bb1f147215f8e147edf7b8f6c9ccfbb7cc87114471 musl-fixes.patch" sha512sums="a25f97fa80aef4ad1e86b303886cd7a97aac248820a4c24e3d3dc26567dd7d2d86db237866468fd43885a9fb8534cb0a8e301a3c752fffbc231a2842272999da valgrind-3.11.0.tar.bz2 d59a10db9037e120df2ee94a103402ca95a79abee9d8be63e4e1bca29c82dca775cc402a79b854ec11a2160a4d2da202c237369418e221d1925267ea2613fd5d uclibc.patch d77fff2c6c30ce211fd5c0ac232daea10bf3c6843ec3a03f70dcb1739761231ffa549ad19f3a0c82703b38082ad06316575fec91cee6ede750b62781c6b9527c musl-fixes.patch"