mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-12 18:59:50 +03:00
testing/valgrind-loongarch: new aport
This commit is contained in:
parent
9cb0a6bc3a
commit
3a1a048995
3 changed files with 109 additions and 0 deletions
91
testing/valgrind-loongarch/APKBUILD
Normal file
91
testing/valgrind-loongarch/APKBUILD
Normal file
|
@ -0,0 +1,91 @@
|
|||
# Maintainer: Celeste <cielesti@protonmail.com>
|
||||
maintainer="Celeste <cielesti@protonmail.com>"
|
||||
pkgname=valgrind-loongarch
|
||||
pkgver=3.25.0_git20250521
|
||||
pkgrel=0
|
||||
_gitrev=1e729f9bf417a8af9e2aa5f3933d6efb12f8d46c
|
||||
pkgdesc="Tool to help find memory-management problems in programs"
|
||||
url="https://valgrind.org/"
|
||||
arch="loongarch64"
|
||||
provides="valgrind=$pkgver-r$pkgrel"
|
||||
license="GPL-2.0-or-later"
|
||||
# it seems like busybox sed works but the configure script requires GNU sed
|
||||
makedepends="
|
||||
autoconf
|
||||
automake
|
||||
linux-headers
|
||||
perl
|
||||
sed
|
||||
"
|
||||
# from README_PACKAGERS:
|
||||
# Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so
|
||||
# [and] libexec/valgrind/* in the installation tree.
|
||||
options="!strip"
|
||||
subpackages="
|
||||
$pkgname-dev
|
||||
$pkgname-scripts::noarch
|
||||
"
|
||||
source="https://github.com/FreeFlyingSheep/valgrind-loongarch64/archive/$_gitrev/valgrind-loongarch-$_gitrev.tar.gz
|
||||
no-git.patch
|
||||
throw.patch
|
||||
"
|
||||
builddir="$srcdir/${pkgname}64-$_gitrev"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
./autogen.sh
|
||||
}
|
||||
|
||||
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 -BRy "$pkgdir"/usr/bin | awk '{print $2}' | xargs strip
|
||||
fi
|
||||
}
|
||||
|
||||
dev() {
|
||||
default_dev
|
||||
|
||||
provides="valgrind-dev=$pkgver-r$pkgrel"
|
||||
}
|
||||
|
||||
scripts() {
|
||||
pkgdesc="$pkgdesc (perl+python cachegrind/callgrind script tools)"
|
||||
depends="$pkgname=$pkgver-r$pkgrel python3 perl"
|
||||
provides="valgrind-scripts=$pkgver-r$pkgrel"
|
||||
|
||||
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="
|
||||
bdd59ee39096750088e5dd556446280a541ac129f843fad8751221aafc3a9776a92f673517a622140bbbec973eec1005872ed5b0407cde2b05dacc1cf2a6e8fd valgrind-loongarch-1e729f9bf417a8af9e2aa5f3933d6efb12f8d46c.tar.gz
|
||||
98c895ba621d705d30efa0348759a89cba1cc32a56eaa5662447c325bbdce67548080ecc0c91be201fd380a66741fffa44dabcdecb43946144855bf179d4fbfb no-git.patch
|
||||
a045dd8c70910b95546ad36b3125c1813dd24a691c90098f98757a557bca864f079b8ac1be784f440d27f7773e3d49626c2e0e5838ab1edef9f0e1e92d353f63 throw.patch
|
||||
"
|
5
testing/valgrind-loongarch/no-git.patch
Normal file
5
testing/valgrind-loongarch/no-git.patch
Normal file
|
@ -0,0 +1,5 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -21 +21 @@ m4_define([v_micro_ver], [0])
|
||||
-m4_define([v_suffix_ver], [GIT])
|
||||
+m4_define([v_suffix_ver], [])
|
13
testing/valgrind-loongarch/throw.patch
Normal file
13
testing/valgrind-loongarch/throw.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- a/memcheck/tests/loongarch64-linux/scalar.h
|
||||
+++ b/memcheck/tests/loongarch64-linux/scalar.h
|
||||
@@ -12,6 +11,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
+#ifndef __THROW
|
||||
+#define __THROW
|
||||
+#endif
|
||||
+
|
||||
// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
|
||||
// declare this ourselves.
|
||||
extern long int syscall (long int __sysno, ...) __THROW;
|
Loading…
Add table
Add a link
Reference in a new issue