summaryrefslogtreecommitdiff
path: root/audio/pulseaudio
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2021-02-20 22:10:39 +0000
committerryoon <ryoon@pkgsrc.org>2021-02-20 22:10:39 +0000
commit646a084537f873592e82696b099676d4d1fc788a (patch)
tree86bb612a8d2c14526e1cfa7021232bdaf2cea2d7 /audio/pulseaudio
parent9bd271f93990775b3a79b6b70d8bd8c8f08d6865 (diff)
downloadpkgsrc-646a084537f873592e82696b099676d4d1fc788a.tar.gz
pulseaudio: Use DEVOSSAUDIO instead of hardcoded /dev/audio
Diffstat (limited to 'audio/pulseaudio')
-rw-r--r--audio/pulseaudio/Makefile9
-rw-r--r--audio/pulseaudio/distinfo6
-rw-r--r--audio/pulseaudio/patches/patch-src_modules_module-detect.c6
-rw-r--r--audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c15
4 files changed, 20 insertions, 16 deletions
diff --git a/audio/pulseaudio/Makefile b/audio/pulseaudio/Makefile
index ced6268daf7..e04fa79abb1 100644
--- a/audio/pulseaudio/Makefile
+++ b/audio/pulseaudio/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.155 2021/02/07 06:25:31 ryoon Exp $
+# $NetBSD: Makefile,v 1.156 2021/02/20 22:10:39 ryoon Exp $
DISTNAME= pulseaudio-14.2
PKGREVISION= 1
@@ -13,6 +13,13 @@ LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v2
NOT_FOR_PLATFORM= DragonFly-*-*
+SUBST_CLASSES+= oss
+SUBST_STAGE.oss= pre-configure
+SUBST_MESSAGE.oss= Set OSS device node
+SUBST_FILES.oss+= src/modules/oss/module-oss.c
+SUBST_FILES.oss+= src/modules/module-detect.c
+SUBST_VARS.oss+= DEVOSSAUDIO
+
# Requires --desktop in msgfmt.
_TOOLS_USE_PKGSRC.msgfmt= yes
diff --git a/audio/pulseaudio/distinfo b/audio/pulseaudio/distinfo
index 20a6d73ec29..357bc01485a 100644
--- a/audio/pulseaudio/distinfo
+++ b/audio/pulseaudio/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.75 2021/02/07 06:25:31 ryoon Exp $
+$NetBSD: distinfo,v 1.76 2021/02/20 22:10:39 ryoon Exp $
SHA1 (pulseaudio-14.2.tar.xz) = 5dfc46595e981f0eb6308d07666f4108a69b2106
RMD160 (pulseaudio-14.2.tar.xz) = 5e52b8549a0ece2b52df854b5edaa2998c438ccd
@@ -6,8 +6,8 @@ SHA512 (pulseaudio-14.2.tar.xz) = 196338cbb26c542301b6d0579070dfbcc42e76dc17405f
Size (pulseaudio-14.2.tar.xz) = 1951300 bytes
SHA1 (patch-configure.ac) = 125098049a779b7afb70a7a4a625706a0c172683
SHA1 (patch-src_Makefile.am) = 5d136002c12016a8b451e84103a627685ec403de
-SHA1 (patch-src_modules_module-detect.c) = b68923d6adc6640d2eef4b50b54e3f9ec437d042
-SHA1 (patch-src_modules_oss_module-oss.c) = 399ac178ae832619253ce8dd985edbed23db86e7
+SHA1 (patch-src_modules_module-detect.c) = 860529fef9a14cbaa3979d985f5fde391b121484
+SHA1 (patch-src_modules_oss_module-oss.c) = d254f6c346d34470c9e178199c485e929bfd84c5
SHA1 (patch-src_modules_raop_raop-client.h) = 9fb7ae86a6852022f53aee3765777bd136250ffb
SHA1 (patch-src_pulsecore_mix__neon.c) = 6f6d33d38024d65045d637d48276e1ba92b81342
SHA1 (patch-src_pulsecore_shm.c) = c7079e8ac3461f5069e1415a2816784781aaa59c
diff --git a/audio/pulseaudio/patches/patch-src_modules_module-detect.c b/audio/pulseaudio/patches/patch-src_modules_module-detect.c
index 6c2ac03b8fa..f602a16f6da 100644
--- a/audio/pulseaudio/patches/patch-src_modules_module-detect.c
+++ b/audio/pulseaudio/patches/patch-src_modules_module-detect.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_modules_module-detect.c,v 1.6 2020/12/17 09:42:59 ryoon Exp $
+$NetBSD: patch-src_modules_module-detect.c,v 1.7 2021/02/20 22:10:39 ryoon Exp $
Hack to set proper sound device on NetBSD.
@@ -17,12 +17,12 @@ Hack to set proper sound device on NetBSD.
+ */
+ char args[64];
-+ pa_snprintf(args, sizeof(args), "mmap=0 device=/dev/audio");
++ pa_snprintf(args, sizeof(args), "mmap=0 device=@DEVOSSAUDIO@");
+ if (pa_module_load(&m, c, "module-oss", args) < 0)
+ return 0;
+
+ for (int i = 0; i < 4; i++) {
-+ pa_snprintf(args, sizeof(args), "mmap=0 device=/dev/audio%d", i);
++ pa_snprintf(args, sizeof(args), "mmap=0 device=@DEVOSSAUDIO@%d", i);
+ if (pa_module_load(&m, c, "module-oss", args) < 0)
+ return i + 1;
+ }
diff --git a/audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c b/audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c
index 3647a772b23..fe58b903f05 100644
--- a/audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c
+++ b/audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c
@@ -1,18 +1,15 @@
-$NetBSD: patch-src_modules_oss_module-oss.c,v 1.2 2014/06/25 15:26:40 ryoon Exp $
+$NetBSD: patch-src_modules_oss_module-oss.c,v 1.3 2021/02/20 22:10:39 ryoon Exp $
-Set proper sound device default on NetBSD.
+Set DEVOSSAUDIO value to fix default device on NetBSD at least.
---- src/modules/oss/module-oss.c.orig 2014-01-23 18:57:55.000000000 +0000
+--- src/modules/oss/module-oss.c.orig 2021-01-16 17:26:36.000000000 +0000
+++ src/modules/oss/module-oss.c
-@@ -98,7 +98,11 @@ PA_MODULE_USAGE(
+@@ -95,7 +95,7 @@ PA_MODULE_USAGE(
PA_MODULE_DEPRECATED("Please use module-alsa-card instead of module-oss!");
#endif
-+#if defined(__NetBSD__)
-+#define DEFAULT_DEVICE "/dev/audio"
-+#else /* Linux */
- #define DEFAULT_DEVICE "/dev/dsp"
-+#endif
+-#define DEFAULT_DEVICE "/dev/dsp"
++#define DEFAULT_DEVICE "@DEVOSSAUDIO@"
struct userdata {
pa_core *core;