pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/i3status i3status: Use sun audio for volume m...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/aeb5c671a9f6
branches:  trunk
changeset: 412754:aeb5c671a9f6
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Mar 11 22:46:36 2020 +0000

description:
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:

 sysutils/i3status/Makefile                          |    9 +-
 sysutils/i3status/distinfo                          |    5 +-
 sysutils/i3status/patches/patch-configure           |  157 --------------------
 sysutils/i3status/patches/patch-src_print__volume.c |   33 ++++
 sysutils/i3status/patches/patch-src_pulse.c         |   17 ++
 5 files changed, 58 insertions(+), 163 deletions(-)

diffs (259 lines):

diff -r 25f75f220558 -r aeb5c671a9f6 sysutils/i3status/Makefile
--- a/sysutils/i3status/Makefile        Wed Mar 11 22:41:17 2020 +0000
+++ b/sysutils/i3status/Makefile        Wed Mar 11 22:46:36 2020 +0000
@@ -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 @@
 .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 -r 25f75f220558 -r aeb5c671a9f6 sysutils/i3status/distinfo
--- a/sysutils/i3status/distinfo        Wed Mar 11 22:41:17 2020 +0000
+++ b/sysutils/i3status/distinfo        Wed Mar 11 22:46:36 2020 +0000
@@ -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 -r 25f75f220558 -r aeb5c671a9f6 sysutils/i3status/patches/patch-configure
--- a/sysutils/i3status/patches/patch-configure Wed Mar 11 22:41:17 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 25f75f220558 -r aeb5c671a9f6 sysutils/i3status/patches/patch-src_print__volume.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/patches/patch-src_print__volume.c       Wed Mar 11 22:46:36 2020 +0000
@@ -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 -r 25f75f220558 -r aeb5c671a9f6 sysutils/i3status/patches/patch-src_pulse.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/i3status/patches/patch-src_pulse.c       Wed Mar 11 22:46:36 2020 +0000
@@ -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



Home | Main Index | Thread Index | Old Index