diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-05-31 20:35:02 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-05-31 20:35:02 -0500 |
commit | cd765235a4086473210dd826410aa89b40fb92a1 (patch) | |
tree | 78b5e3b6111a863d42ea3ac35977a06549da0194 /harmony/valgrind/APKBUILD | |
parent | c54fee0ab06630eb8fb185cc1add21930f69b3f4 (diff) | |
download | packages-cd765235a4086473210dd826410aa89b40fb92a1.tar.gz packages-cd765235a4086473210dd826410aa89b40fb92a1.tar.bz2 packages-cd765235a4086473210dd826410aa89b40fb92a1.tar.xz packages-cd765235a4086473210dd826410aa89b40fb92a1.zip |
harmony/valgrind: new package, based on alpine, but working on ppc64
Diffstat (limited to 'harmony/valgrind/APKBUILD')
-rw-r--r-- | harmony/valgrind/APKBUILD | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/harmony/valgrind/APKBUILD b/harmony/valgrind/APKBUILD new file mode 100644 index 000000000..26c2596f8 --- /dev/null +++ b/harmony/valgrind/APKBUILD @@ -0,0 +1,76 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=valgrind +pkgver=3.13.0 +pkgrel=0 +pkgdesc="A tool to help find memory-management problems in programs" +url="http://valgrind.org/" +arch="all !aarch64" +license="GPL-2.0-or-later" +# 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 !check" +subpackages="$pkgname-dev $pkgname-doc" +source="ftp://sourceware.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2 + uclibc.patch + arm.patch + coregrind-elfv2.patch" +# musl-fixes.patch +builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + default_prepare + cd "$builddir" + aclocal && autoconf && automake --add-missing + echo '#include <linux/a.out.h>' > 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 +} + +check() { + cd "$buildir" + make check +} + +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="34e1013cd3815d30a459b86220e871bb0a6209cc9e87af968f347083693779f022e986f211bdf1a5184ad7370cde12ff2cfca8099967ff94732970bd04a97009 valgrind-3.13.0.tar.bz2 +d59a10db9037e120df2ee94a103402ca95a79abee9d8be63e4e1bca29c82dca775cc402a79b854ec11a2160a4d2da202c237369418e221d1925267ea2613fd5d uclibc.patch +9ee297d1b2b86891584443ad0caadc4977e1447979611ccf1cc55dbee61911b0b063bc4ad936d86c451cedae410cb3219b5a088b2ad0aa17df182d564fe36cfe arm.patch +83c04d8fbb6ed659d0176c395199751b7b01707c6bad43334b11ede82dfdb790ee16ef6ee01529040d63373ae37e387903097d36214501a32e030cd5dd539b7a coregrind-elfv2.patch" |