mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-09 01:24:35 +02:00
70 lines
2.1 KiB
Text
70 lines
2.1 KiB
Text
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=valgrind
|
|
pkgver=3.25.0
|
|
pkgrel=0
|
|
pkgdesc="Tool to help find memory-management problems in programs"
|
|
url="https://valgrind.org/"
|
|
# armv6 not supported upstream
|
|
arch="all !armhf !loongarch64"
|
|
license="GPL-2.0-or-later"
|
|
# it seems like busybox sed works but the configure script requires GNU sed
|
|
makedepends="sed perl linux-headers"
|
|
# 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-scripts $pkgname-dev $pkgname-doc"
|
|
source="https://sourceware.org/pub/valgrind/valgrind-$pkgver.tar.bz2
|
|
fix-tests-musl-s390x.patch
|
|
fix-tests-musl-armv7.patch
|
|
"
|
|
|
|
build() {
|
|
export CFLAGS="${CFLAGS/-fno-plt} -fno-stack-protector -no-pie -U_FORTIFY_SOURCE"
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--mandir=/usr/share/man \
|
|
--infodir=/usr/share/info \
|
|
--localstatedir=/var \
|
|
--without-mpicc
|
|
make
|
|
}
|
|
|
|
check() {
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# we have options=!strip above so we strip the /usr/bin/* manually
|
|
if [ -z "$DEBUG" ]; then
|
|
scanelf -Ry "$pkgdir" \
|
|
| awk '$1=="ET_DYN"{printf("%s%c",$2,0)}' \
|
|
| xargs -0 strip
|
|
fi
|
|
}
|
|
|
|
scripts() {
|
|
pkgdesc="$pkgdesc (perl+python cachegrind/callgrind script tools)"
|
|
depends="$pkgname=$pkgver-r$pkgrel python3 perl"
|
|
|
|
amove \
|
|
usr/bin/ms_print \
|
|
usr/bin/cg_merge \
|
|
usr/bin/cg_annotate \
|
|
usr/bin/cg_diff \
|
|
usr/bin/callgrind_control \
|
|
usr/bin/callgrind_annotate
|
|
}
|
|
|
|
sha512sums="
|
|
1fc649ae346d5106b69fe2cf8b494fa441d63f576b16e62d90e547f760851e427a173b6d03c4076a8ae13df66717f66631f4dc6769ede15f5521bd95099a649d valgrind-3.25.0.tar.bz2
|
|
a6c5a33d0d5c09cc65c6c62456e213006560b20f37db0a24bf218c5bd2eb3275541494866699d15bbbc2672292122cb6f6d67176b0f37ba1dec37211c584c480 fix-tests-musl-s390x.patch
|
|
5e0f6b10081318fc5630a7500d490ff5e9b2832889158ecb40a4f310f8be6fcbd8a8744be96742341eba952a0994e407db091673a69d111fae3e132e0ea6ca72 fix-tests-musl-armv7.patch
|
|
"
|