diff options
author | nia <nia@pkgsrc.org> | 2020-03-11 22:46:36 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-03-11 22:46:36 +0000 |
commit | efc36334d08dbd1bfc6bdda3df00b3d9721b310b (patch) | |
tree | 4a6921e71fb597da21a6879da9b322cbde2c5ed0 /sysutils | |
parent | bb64b47ac5fc93180eb751d2bcf539cc4f7399d1 (diff) | |
download | pkgsrc-efc36334d08dbd1bfc6bdda3df00b3d9721b310b.tar.gz |
i3status: Use sun audio for volume mixing on NetBSD
Remove pulseaudio dependency for non-Linux
Remove our bad patching for pulse=false on Free/DragonFlyBSD, it breaks
the non-pulseaudio case because it's missing an automake check.
Bump PKGREVISION
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/i3status/Makefile | 9 | ||||
-rw-r--r-- | sysutils/i3status/distinfo | 5 | ||||
-rw-r--r-- | sysutils/i3status/patches/patch-configure | 157 | ||||
-rw-r--r-- | sysutils/i3status/patches/patch-src_print__volume.c | 33 | ||||
-rw-r--r-- | sysutils/i3status/patches/patch-src_pulse.c | 17 |
5 files changed, 58 insertions, 163 deletions
diff --git a/sysutils/i3status/Makefile b/sysutils/i3status/Makefile index 88c429a0ad0..864b4c2e9f8 100644 --- a/sysutils/i3status/Makefile +++ b/sysutils/i3status/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.12 2020/03/08 16:51:18 wiz Exp $ +# $NetBSD: Makefile,v 1.13 2020/03/11 22:46:36 nia Exp $ DISTNAME= i3status-2.13 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= sysutils MASTER_SITES= https://i3wm.org/i3status/ EXTRACT_SUFX= .tar.bz2 @@ -35,7 +35,8 @@ post-install: .include "../../devel/confuse/buildlink3.mk" .include "../../devel/yajl/buildlink3.mk" .include "../../mk/bsd.prefs.mk" -.if ${OPSYS} != "OpenBSD" && ${OPSYS} != "DragonFly" -.include "../../audio/pulseaudio/buildlink3.mk" +.if ${OPSYS} == "Linux" +. include "../../audio/alsa-lib/buildlink3.mk" +. include "../../audio/pulseaudio/buildlink3.mk" .endif .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/i3status/distinfo b/sysutils/i3status/distinfo index d814da3a07c..bd6221e5e97 100644 --- a/sysutils/i3status/distinfo +++ b/sysutils/i3status/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.3 2019/07/22 23:04:31 wiz Exp $ +$NetBSD: distinfo,v 1.4 2020/03/11 22:46:36 nia Exp $ SHA1 (i3status-2.13.tar.bz2) = b09fd2f322046daaca22f60cf6bfc7dbebea1b11 RMD160 (i3status-2.13.tar.bz2) = 8432809add78a0086ce8181160528f5e34b7c0d3 SHA512 (i3status-2.13.tar.bz2) = 6dadff19e53499d169ba4f491e1f821014b4f92fc3c93d7947c85cbbbdeaba538d02bd8ab98fe266a8f80756a287fd5803ec77a8cd874d50082b5cad309875c2 Size (i3status-2.13.tar.bz2) = 201409 bytes SHA1 (patch-Makefile.in) = e50ed614d41a1bcef33feb6414322affa5e20a92 -SHA1 (patch-configure) = e372bf638683a2b30a13f6fd5b58d0293e5bd767 +SHA1 (patch-src_print__volume.c) = 68dd7489b9e7748edf2e326ffb8d320788960c42 SHA1 (patch-src_print__wireless__info.c) = 7039b7fbd2f43b798763793cd4296035610eeee0 +SHA1 (patch-src_pulse.c) = bfc5265c5c11f3a56e9b88c936b9856245b998f4 diff --git a/sysutils/i3status/patches/patch-configure b/sysutils/i3status/patches/patch-configure deleted file mode 100644 index 7f56f4eb91e..00000000000 --- a/sysutils/i3status/patches/patch-configure +++ /dev/null @@ -1,157 +0,0 @@ -$NetBSD: patch-configure,v 1.1 2019/07/22 23:04:31 wiz Exp $ - -Based on https://github.com/i3/i3status/commit/54e798e3a6dcf5747c3e943b376ae441ee0534a4 - ---- configure.orig 2019-06-30 17:54:48.000000000 +0000 -+++ configure -@@ -7178,6 +7166,7 @@ $as_echo "yes" >&6; } - - fi - -+pulse=true - case $host_os in - linux*) - -@@ -7362,6 +7351,74 @@ else - $as_echo "yes" >&6; } - - fi -+ ;; -+ openbsd*) -+ pulse=false -+ ;; -+ dragonfly*) -+ pulse=false -+ ;; -+ netbsd*) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing prop_string_create" >&5 -+$as_echo_n "checking for library containing prop_string_create... " >&6; } -+if ${ac_cv_search_prop_string_create+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_func_search_save_LIBS=$LIBS -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char prop_string_create (); -+int -+main () -+{ -+return prop_string_create (); -+ ; -+ return 0; -+} -+_ACEOF -+for ac_lib in '' prop; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_search_prop_string_create=$ac_res -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext -+ if ${ac_cv_search_prop_string_create+:} false; then : -+ break -+fi -+done -+if ${ac_cv_search_prop_string_create+:} false; then : -+ -+else -+ ac_cv_search_prop_string_create=no -+fi -+rm conftest.$ac_ext -+LIBS=$ac_func_search_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_prop_string_create" >&5 -+$as_echo "$ac_cv_search_prop_string_create" >&6; } -+ac_res=$ac_cv_search_prop_string_create -+if test "$ac_res" != no; then : -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -+ -+fi -+ -+ ;; -+esac -+ -+if test x"$pulse" = x"true"; then : - - pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSE" >&5 -@@ -7453,67 +7510,7 @@ else - $as_echo "yes" >&6; } - - fi -- ;; -- netbsd*) -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing prop_string_create" >&5 --$as_echo_n "checking for library containing prop_string_create... " >&6; } --if ${ac_cv_search_prop_string_create+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- ac_func_search_save_LIBS=$LIBS --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char prop_string_create (); --int --main () --{ --return prop_string_create (); -- ; -- return 0; --} --_ACEOF --for ac_lib in '' prop; do -- if test -z "$ac_lib"; then -- ac_res="none required" -- else -- ac_res=-l$ac_lib -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" -- fi -- if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_search_prop_string_create=$ac_res --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext -- if ${ac_cv_search_prop_string_create+:} false; then : -- break --fi --done --if ${ac_cv_search_prop_string_create+:} false; then : -- --else -- ac_cv_search_prop_string_create=no --fi --rm conftest.$ac_ext --LIBS=$ac_func_search_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_prop_string_create" >&5 --$as_echo "$ac_cv_search_prop_string_create" >&6; } --ac_res=$ac_cv_search_prop_string_create --if test "$ac_res" != no; then : -- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -- --fi -- -- ;; --esac -- - - # Checks for programs. - for ac_prog in gawk mawk nawk awk diff --git a/sysutils/i3status/patches/patch-src_print__volume.c b/sysutils/i3status/patches/patch-src_print__volume.c new file mode 100644 index 00000000000..3e9a02519a0 --- /dev/null +++ b/sysutils/i3status/patches/patch-src_print__volume.c @@ -0,0 +1,33 @@ +$NetBSD: patch-src_print__volume.c,v 1.1 2020/03/11 22:46:36 nia Exp $ + +Use sunaudio on NetBSD. + +--- src/print_volume.c.orig 2019-01-23 08:03:56.000000000 +0000 ++++ src/print_volume.c +@@ -21,7 +21,7 @@ + #include <sys/soundcard.h> + #endif + +-#ifdef __OpenBSD__ ++#if defined(__NetBSD__) || defined(__OpenBSD__) + #include <fcntl.h> + #include <unistd.h> + #include <sys/audioio.h> +@@ -86,7 +86,7 @@ void print_volume(yajl_gen json_gen, cha + free(instance); + } + +-#if !defined(__DragonFly__) && !defined(__OpenBSD__) ++#if defined(__linux__) + /* Try PulseAudio first */ + + /* If the device name has the format "pulse[:N]" where N is the +@@ -272,7 +272,7 @@ void print_volume(yajl_gen json_gen, cha + if (mixer_idx > 0) + free(mixerpath); + +-#if defined(__OpenBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + int oclass_idx = -1, master_idx = -1, master_mute_idx = -1; + int master_next = AUDIO_MIXER_LAST; + mixer_devinfo_t devinfo, devinfo2; diff --git a/sysutils/i3status/patches/patch-src_pulse.c b/sysutils/i3status/patches/patch-src_pulse.c new file mode 100644 index 00000000000..ad4c77889d7 --- /dev/null +++ b/sysutils/i3status/patches/patch-src_pulse.c @@ -0,0 +1,17 @@ +$NetBSD: patch-src_pulse.c,v 1.1 2020/03/11 22:46:36 nia Exp $ + +The makefile forgets to conditionally build this file even +when pulseaudio isn't available. Hack around this. + +--- src/pulse.c.orig 2019-01-23 08:03:56.000000000 +0000 ++++ src/pulse.c +@@ -1,3 +1,4 @@ ++#if defined(__linux__) + // vim:ts=4:sw=4:expandtab + #include <config.h> + #include <string.h> +@@ -337,3 +338,4 @@ bool pulse_initialize(void) { + } + return true; + } ++#endif |