aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/a2jmidid/APKBUILD27
-rw-r--r--testing/a2jmidid/check-for-libc-backtrace.patch34
2 files changed, 61 insertions, 0 deletions
diff --git a/testing/a2jmidid/APKBUILD b/testing/a2jmidid/APKBUILD
new file mode 100644
index 0000000000..5fe2e56552
--- /dev/null
+++ b/testing/a2jmidid/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Kevin Thomas <me@kevinthomas.dev>
+# Maintainer: Kevin Thomas <me@kevinthomas.dev>
+pkgname=a2jmidid
+pkgver=9
+pkgrel=0
+pkgdesc="ALSA sequencer to JACK MIDI bridging"
+url="https://github.com/jackaudio/a2jmidid"
+arch="all"
+license="GPL-2.0-or-later"
+depends="py3-dbus"
+makedepends="meson libexecinfo-dev jack-dev alsa-lib-dev dbus-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/jackaudio/a2jmidid/archive/$pkgver.tar.gz
+ check-for-libc-backtrace.patch"
+options="!check" # No testsuite
+
+build() {
+ abuild-meson . build
+ meson compile ${JOBS:+-j ${JOBS}} -C build
+}
+
+package() {
+ DESTDIR="$pkgdir" meson install --no-rebuild -C build
+}
+
+sha512sums="5bd13b6904ed68c5bfe40ca516fd49b7eb4d4a946b9908ee04687265848734c8e1a81579f0f1a5bd0752595be8858dc748da10487b7f366394c09a5ffc7d5e5c a2jmidid-9.tar.gz
+0639c8f2070a8af2872a073c255f0d4dca709363457c726fc0824a6574ca479a78a079a2f71dac18b2f0fa738a8f96ce261984a88687ad804f45a0aad81a869f check-for-libc-backtrace.patch"
diff --git a/testing/a2jmidid/check-for-libc-backtrace.patch b/testing/a2jmidid/check-for-libc-backtrace.patch
new file mode 100644
index 0000000000..774914cf6b
--- /dev/null
+++ b/testing/a2jmidid/check-for-libc-backtrace.patch
@@ -0,0 +1,34 @@
+Check if libc supports error backtracing from execinfo.h before attempting
+to use it (musl does not support this).
+--- a2jmidid-9/sigsegv.c
++++ a2jmidid-9/sigsegv.c
+@@ -28,7 +28,9 @@
+ #include <signal.h>
+ #include <ucontext.h>
+ #include <dlfcn.h>
++#ifdef LIBC_HAS_BACKTRACE
+ #include <execinfo.h>
++#endif
+ #include <errno.h>
+ #ifndef NO_CPP_DEMANGLE
+ //#include <cxxabi.h>
+@@ -148,12 +150,14 @@
+ bp = (void**)bp[0];
+ }
+ #else
+- a2j_error("Stack trace (non-dedicated):");
+- sz = backtrace(bt, 20);
+- strings = backtrace_symbols(bt, sz);
++ #ifdef LIBC_HAS_BACKTRACE
++ a2j_error("Stack trace (non-dedicated):");
++ sz = backtrace(bt, 20);
++ strings = backtrace_symbols(bt, sz);
+
+- for(i = 0; i < sz; ++i)
+- a2j_error("%s", strings[i]);
++ for(i = 0; i < sz; ++i)
++ a2j_error("%s", strings[i]);
++ #endif
+ #endif
+ a2j_error("End of stack trace");
+ exit (-1);