aports/testing/i3status/no-pulseaudio.patch
prspkt 6c328a9f23 testing/i3status: clarify license
improve abuild and sanitize patches
2018-05-15 14:45:00 +02:00

39 lines
742 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,6 @@
CFLAGS+=-Iinclude
LIBS+=-lconfuse
LIBS+=-lyajl
-LIBS+=-lpulse
LIBS+=-lm
LIBS+=-lpthread
@@ -80,7 +79,14 @@
OBJS:=$(sort $(wildcard src/*.c *.c))
OBJS:=$(OBJS:.c=.o)
-ifeq ($(OS),OpenBSD)
+ifneq ($(OS),OpenBSD)
+HAVE_PULSE ?=1
+endif
+
+ifeq ($(HAVE_PULSE),1)
+LIBS+=-lpulse
+CFLAGS+=-DHAVE_PULSE
+else
OBJS:=$(filter-out src/pulse.o, $(OBJS))
LIBS:=$(filter-out -lpulse, $(LIBS))
endif
Only in /tmp/i3status-2.12/: Makefile.orig
--- a/src/print_volume.c
+++ b/src/print_volume.c
@@ -61,7 +61,7 @@
free(instance);
}
-#ifndef __OpenBSD__
+#if defined(HAVE_PULSE)
/* Try PulseAudio first */
/* If the device name has the format "pulse[:N]" where N is the