aboutsummaryrefslogtreecommitdiffstats
path: root/testing/i3status/no-pulseaudio.patch
blob: 532e4ef62316c1121b26f118dfd39f9451fc46ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- 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