summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-12-27 10:12:57 +0000
committernia <nia@pkgsrc.org>2021-12-27 10:12:57 +0000
commitba8947edb7f12f42ae8658a0def4493830f74925 (patch)
tree5a41a86f02db2764c3752f63749a2438193c0a2b /emulators
parentac33d127e59e93acbc6c68a8060c36fce000f1cc (diff)
downloadpkgsrc-ba8947edb7f12f42ae8658a0def4493830f74925.tar.gz
qemu: bulk builds with jack enabled get jack picked up through a
dependency of qemu, resulting in a build failure on NetBSD. just add support for jack on netbsd to fix this.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/distinfo3
-rw-r--r--emulators/qemu/options.mk11
-rw-r--r--emulators/qemu/patches/patch-audio_jackaudio.c18
3 files changed, 29 insertions, 3 deletions
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index e0fa32801f8..a2b9c565c35 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.189 2021/12/16 12:59:43 tnn Exp $
+$NetBSD: distinfo,v 1.190 2021/12/27 10:12:57 nia Exp $
BLAKE2s (palcode-clipper-qemu-5.2.0nb8) = d388c896a80c1cc3d4785c8434d6688bbcfd54c28f7252ce550ab162a0bba321
SHA512 (palcode-clipper-qemu-5.2.0nb8) = 33695d6001d86a19793a92d5e31775607c4dfc9ab9eea019ea6c4d543a2e11e8c07f83cca4934811a13ef829b528737ea37d9d2aaf66cba6f2746d44d2aa0b43
@@ -6,6 +6,7 @@ Size (palcode-clipper-qemu-5.2.0nb8) = 159808 bytes
BLAKE2s (qemu-6.2.0.tar.xz) = f8a5e369a65ed0903c271712c81a3c8a1b8893f923dfb815a7db1359fc263ece
SHA512 (qemu-6.2.0.tar.xz) = e9f8231c9e1cfcc41cb47f10a55d63f6b8aee307af00cf6acf64acb7aa4f49fa7e9d6330703a2abea15d8b7bbaba7d3cb08c83edd98d82642367b527df730817
Size (qemu-6.2.0.tar.xz) = 115667324 bytes
+SHA1 (patch-audio_jackaudio.c) = 0c9e2bea94857007938e16285b721d1495fcb8e1
SHA1 (patch-backends_tpm_tpm__ioctl.h) = fbd6c877ad605f7120290efbb0ac653c69f351de
SHA1 (patch-hw-mips-Kconfig) = c7199ad26ac45116ab4d38252db4234ae93bdf9a
SHA1 (patch-hw-mips-mipssim.c) = 1f682b74b34398b3ff15f9e7f24a85f4b8bb4853
diff --git a/emulators/qemu/options.mk b/emulators/qemu/options.mk
index 83c99433906..760653b4ccc 100644
--- a/emulators/qemu/options.mk
+++ b/emulators/qemu/options.mk
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.16 2021/02/23 09:28:33 wiz Exp $
+# $NetBSD: options.mk,v 1.17 2021/12/27 10:12:57 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.qemu
-PKG_SUPPORTED_OPTIONS= debug-info gtk3 iscsi sdl spice
+PKG_SUPPORTED_OPTIONS= debug-info gtk3 iscsi jack sdl spice
PKG_SUGGESTED_OPTIONS+= iscsi spice
.include "../../mk/bsd.fast.prefs.mk"
@@ -26,6 +26,13 @@ PKG_SUGGESTED_OPTIONS+= sdl
PLIST_VARS+= gtk keymap virtfs-proxy-helper
+.if !empty(PKG_OPTIONS:Mjack)
+CONFIGURE_ARGS+= --enable-jack
+.include "../../audio/jack/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-jack
+.endif
+
.if !empty(PKG_OPTIONS:Mdebug-info)
CONFIGURE_ARGS+= --enable-debug-info
.else
diff --git a/emulators/qemu/patches/patch-audio_jackaudio.c b/emulators/qemu/patches/patch-audio_jackaudio.c
new file mode 100644
index 00000000000..fb7710169f5
--- /dev/null
+++ b/emulators/qemu/patches/patch-audio_jackaudio.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-audio_jackaudio.c,v 1.1 2021/12/27 10:12:57 nia Exp $
+
+Teach it about NetBSD's pthread_setname_np.
+
+--- audio/jackaudio.c.orig 2021-12-14 20:42:02.000000000 +0000
++++ audio/jackaudio.c
+@@ -631,7 +631,11 @@ static int qjack_thread_creator(jack_nat
+ }
+
+ /* set the name of the thread */
++#ifdef __NetBSD__
++ pthread_setname_np(*thread, "%s", (void *)"jack-client");
++#else
+ pthread_setname_np(*thread, "jack-client");
++#endif
+
+ return ret;
+ }