This makes i3status display sndiod master volume knob. This makes it
work by default with any audio device, including USB ones with no
volume controls.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/i3status/Makefile,v
retrieving revision 1.58
diff -u -p -r1.58 Makefile
--- Makefile 27 Sep 2019 20:33:22 -0000 1.58
+++ Makefile 8 Mar 2020 15:33:22 -0000
@@ -5,7 +5,7 @@ ONLY_FOR_ARCHS= ${APM_ARCHS}
COMMENT= generate a statusbar for use with i3/xmobar/dzen2
DISTNAME= i3status-2.13
-REVISION= 1
+REVISION= 2
CATEGORIES= x11 sysutils
HOMEPAGE= https://i3wm.org/i3status/
@@ -28,7 +28,9 @@ BUILD_DEPENDS= textproc/asciidoc>=8.6.8
LIB_DEPENDS= devel/libconfuse \
devel/libyajl
-CONFIGURE_STYLE = gnu
+AUTOCONF_VERSION = 2.69
+AUTOMAKE_VERSION = 1.16
+CONFIGURE_STYLE = autoreconf
SEPARATE_BUILD = Yes
FAKE_FLAGS += sysconfdir=${PREFIX}/share/examples/i3status/
Index: patches/patch-Makefile_am
===================================================================
RCS file: patches/patch-Makefile_am
diff -N patches/patch-Makefile_am
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_am 8 Mar 2020 15:33:22 -0000
@@ -0,0 +1,37 @@
+$OpenBSD$
+
+Index: Makefile.am
+--- Makefile.am.orig
++++ Makefile.am
+@@ -1,5 +1,3 @@
+-@CODE_COVERAGE_RULES@
+-
+ echo-version:
+ @echo "@I3STATUS_VERSION@"
+
+@@ -30,6 +28,7 @@ i3status_CFLAGS = \
+ $(PULSE_CFLAGS) \
+ $(NLGENL_CFLAGS) \
+ $(ALSA_CFLAGS) \
++ $(SNDIO_CFLAGS) \
+ $(PTHREAD_CFLAGS)
+
+ i3status_CPPFLAGS = \
+@@ -42,6 +41,7 @@ i3status_LDADD = \
+ $(PULSE_LIBS) \
+ $(NLGENL_LIBS) \
+ $(ALSA_LIBS) \
++ $(SNDIO_LIBS) \
+ $(PTHREAD_LIBS)
+
+ i3status_SOURCES = \
+@@ -69,7 +69,8 @@ i3status_SOURCES = \
+ src/print_wireless_info.c \
+ src/print_file_contents.c \
+ src/process_runs.c \
+- src/pulse.c
++ src/pulse.c \
++ src/sndio.c
+
+ dist_sysconf_DATA = \
+ i3status.conf
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 6 Jul 2019 20:20:27 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.1 2019/07/06 20:20:27 jasper Exp $
-
-The CODE_COVERAGE_RULES fragment contains an unmatched "if" clause.
-
-Index: Makefile.in
---- Makefile.in.orig
-+++ Makefile.in
-@@ -1851,7 +1851,6 @@ uninstall-man: uninstall-man1
-
- .PRECIOUS: Makefile
-
--@CODE_COVERAGE_RULES@
-
- echo-version:
- @echo "@I3STATUS_VERSION@"
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac 8 Mar 2020 15:33:22 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -91,6 +91,13 @@ case $host_os in
+ ;;
+ esac
+
++# if sndio is available, define USE_SNDIO
++AC_CHECK_HEADER(sndio.h,
++ [AC_CHECK_LIB([sndio], [sio_open], [
++ AC_SUBST(SNDIO_LIBS, "-lsndio")
++ AC_DEFINE([USE_SNDIO], [], [Use sndio])
++ ], [])], [])
++
+ dnl TODO: check for libbsd for GNU/kFreeBSD
+
+ # Checks for programs.
Index: patches/patch-include_i3status_h
===================================================================
RCS file: patches/patch-include_i3status_h
diff -N patches/patch-include_i3status_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-include_i3status_h 8 Mar 2020 15:33:22 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: include/i3status.h
+--- include/i3status.h.orig
++++ include/i3status.h
+@@ -232,6 +232,7 @@ int volume_pulseaudio(uint32_t sink_idx, const char *s
+ bool description_pulseaudio(uint32_t sink_idx, const char *sink_name, char buffer[MAX_SINK_DESCRIPTION_LEN]);
+ bool pulse_initialize(void);
+ void print_file_contents(yajl_gen json_gen, char *buffer, const char *title, const char *path, const char *format, const char *format_bad, const int max_chars);
++int volume_sndio(void);
+
+ /* socket file descriptor for general purposes */
+ extern int general_socket;
Index: patches/patch-src_print_volume_c
===================================================================
RCS file: patches/patch-src_print_volume_c
diff -N patches/patch-src_print_volume_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_print_volume_c 8 Mar 2020 15:33:22 -0000
@@ -0,0 +1,144 @@
+$OpenBSD$
+
+Index: src/print_volume.c
+--- src/print_volume.c.orig
++++ src/print_volume.c
+@@ -21,13 +21,6 @@
+ #include <sys/soundcard.h>
+
No comments:
Post a Comment