diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2016-01-07 20:14:30 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-01-08 13:26:15 +0000 |
commit | 956d74faf5dac34cdd2f4b059877489bf6401663 (patch) | |
tree | 2a60be60d1bb040bda9d82c7a42a47b2271dfab1 /testing/i3status/no-pulseaudio.patch | |
parent | 4067f7055ef643069310d500b8896120076fa712 (diff) | |
download | aports-956d74faf5dac34cdd2f4b059877489bf6401663.tar.bz2 aports-956d74faf5dac34cdd2f4b059877489bf6401663.tar.xz |
testing/i3status: upgrade to 2.10
Pulseaudio support is not included since the testing/pulseaudio package
is somewhat broken currently.
Diffstat (limited to 'testing/i3status/no-pulseaudio.patch')
-rw-r--r-- | testing/i3status/no-pulseaudio.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/testing/i3status/no-pulseaudio.patch b/testing/i3status/no-pulseaudio.patch new file mode 100644 index 0000000000..94baae7e53 --- /dev/null +++ b/testing/i3status/no-pulseaudio.patch @@ -0,0 +1,80 @@ +diff -upr i3status-2.10.orig/Makefile i3status-2.10/Makefile +--- i3status-2.10.orig/Makefile 2016-01-07 19:53:31.912304558 +0100 ++++ i3status-2.10/Makefile 2016-01-07 19:55:02.869685848 +0100 +@@ -24,6 +24,10 @@ LIBS+=-lyajl + LIBS+=-lpulse + LIBS+=-lm + ++ifeq ($(OS),OpenBSD) ++LIBS+=-lpthread ++endif ++ + VERSION=2.10 + GIT_VERSION="2.10 (2016-01-01)" + OS:=$(shell uname) +@@ -70,10 +74,8 @@ CFLAGS += -idirafter yajl-fallback + OBJS:=$(wildcard src/*.c *.c) + OBJS:=$(OBJS:.c=.o) + +-ifeq ($(OS),OpenBSD) + OBJS:=$(filter-out src/pulse.o, $(OBJS)) +-LIBS:=$(filter-out -lpulse, $(LIBS)) -lpthread +-endif ++LIBS:=$(filter-out -lpulse, $(LIBS)) + + src/%.o: src/%.c include/i3status.h + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< +diff -upr i3status-2.10.orig/src/print_volume.c i3status-2.10/src/print_volume.c +--- i3status-2.10.orig/src/print_volume.c 2016-01-07 19:53:31.912304558 +0100 ++++ i3status-2.10/src/print_volume.c 2016-01-07 19:53:44.447718125 +0100 +@@ -60,50 +60,6 @@ void print_volume(yajl_gen json_gen, cha + free(instance); + } + +-#ifndef __OpenBSD__ +- /* Try PulseAudio first */ +- +- /* If the device name has the format "pulse[:N]" where N is the +- * index of the PulseAudio sink then force PulseAudio, optionally +- * overriding the default sink */ +- if (!strncasecmp(device, "pulse", strlen("pulse"))) { +- uint32_t sink_idx = device[5] == ':' ? (uint32_t)atoi(device + 6) +- : DEFAULT_SINK_INDEX; +- int cvolume = pulse_initialize() ? volume_pulseaudio(sink_idx) : 0; +- int ivolume = DECOMPOSE_VOLUME(cvolume); +- bool muted = DECOMPOSE_MUTED(cvolume); +- if (muted) { +- START_COLOR("color_degraded"); +- pbval = 0; +- } +- /* negative result means error, stick to 0 */ +- if (ivolume < 0) +- ivolume = 0; +- outwalk = apply_volume_format(muted ? fmt_muted : fmt, +- outwalk, +- ivolume); +- goto out; +- } else if (!strcasecmp(device, "default") && pulse_initialize()) { +- /* no device specified or "default" set */ +- int cvolume = volume_pulseaudio(DEFAULT_SINK_INDEX); +- int ivolume = DECOMPOSE_VOLUME(cvolume); +- bool muted = DECOMPOSE_MUTED(cvolume); +- if (ivolume >= 0) { +- if (muted) { +- START_COLOR("color_degraded"); +- pbval = 0; +- } +- outwalk = apply_volume_format(muted ? fmt_muted : fmt, +- outwalk, +- ivolume); +- goto out; +- } +- /* negative result means error, fail PulseAudio attempt */ +- } +-/* If some other device was specified or PulseAudio is not detected, +- * proceed to ALSA / OSS */ +-#endif +- + #ifdef LINUX + int err; + snd_mixer_t *m; |