diff options
-rw-r--r-- | testing/i3status/APKBUILD | 32 | ||||
-rw-r--r-- | testing/i3status/no-pulseaudio.patch | 101 |
2 files changed, 39 insertions, 94 deletions
diff --git a/testing/i3status/APKBUILD b/testing/i3status/APKBUILD index 1e69134473..687eb36375 100644 --- a/testing/i3status/APKBUILD +++ b/testing/i3status/APKBUILD @@ -1,8 +1,8 @@ # Contributor: k0r10n <k0r10n.dev@gmail.com> # Maintainer: pkgname=i3status -pkgver=2.10 -pkgrel=1 +pkgver=2.11 +pkgrel=0 pkgdesc="Generates status bar to use with i3bar, dzen2 or xmobar" url="http://i3.zekjur.net/i3status/" arch="all" @@ -18,33 +18,17 @@ source="http://i3wm.org/i3status/${pkgname}-${pkgver}.tar.bz2 no-pulseaudio.patch " -_builddir="$srcdir"/${pkgname}-${pkgver} -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - +builddir="$srcdir"/${pkgname}-${pkgver} build() { - cd "$_builddir" - make || return 1 + cd "$builddir" + make HAVE_PULSE=0 || return 1 } package() { - cd "$_builddir" + cd "$builddir" make DESTDIR="$pkgdir/" install || return 1 } -md5sums="1121f7c1c193c873982aba22668398ef i3status-2.10.tar.bz2 -75f4468573a132ae9fb255fb9a5531a7 musl-fix.patch -a24f6e7e3441625fdd93996d5f54e37c no-pulseaudio.patch" -sha256sums="daf5d07611b054a43da1a3d28850b05e2dbdbd6d25fd5e25ede98bb1b66e2791 i3status-2.10.tar.bz2 -e976f20fb165d2f96e7a49a95a2d5c803d882883dd4a87bfe20e62f85bf5fb4d musl-fix.patch -0232899cba3aa89c34b53c2b8a2c2667ee8e949a92826a94370978d22f68284e no-pulseaudio.patch" -sha512sums="a514331d83458de15b548686d423b38a7a9198a7a31ca3001f3f136e4b873617c397a0073bb10b44fa8613bc12ed4fa4e384d099d31122a8afbd0df5de2e9c85 i3status-2.10.tar.bz2 +sha512sums="37d2549649178122fab7411a3c714ae041d9c726c140002ec6ccd1a4f2e28af618ca28af9aa3bc45d0cafda0b25dd438c9ed4c3739ddcc0511e19305657730f0 i3status-2.11.tar.bz2 340c44f68b2f74c2f66314f515f6843a6ac609a4d203ceb152b662aa8822ed405ccbbe459ea2eb1b42891cea84e3b63d1ff3bfe478d7fa2fc6c8b51f39f12a00 musl-fix.patch -bb7fdd60b70545038b5120915fed796bf1e6259cb5eba15d9621db54870e634799024752588fd3e9a87efc6c97b410ccee4690eb66812054838b50771afe9799 no-pulseaudio.patch" +6c18330d0ba3994b0a295948641de230e36430191dd5da6a1defeb83e46b0a90826ccc03dd175dce69f51239739cc76e414e2479e4602687025b30200e669a31 no-pulseaudio.patch" diff --git a/testing/i3status/no-pulseaudio.patch b/testing/i3status/no-pulseaudio.patch index 94baae7e53..0d88afb1d9 100644 --- a/testing/i3status/no-pulseaudio.patch +++ b/testing/i3status/no-pulseaudio.patch @@ -1,80 +1,41 @@ -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 +diff --git a/Makefile b/Makefile +index 3084ae7..fdf1030 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,7 +23,6 @@ CPPFLAGS+=-DVERSION=\"${I3STATUS_VERSION}\" + CFLAGS+=-Iinclude + LIBS+=-lconfuse + LIBS+=-lyajl +-LIBS+=-lpulse LIBS+=-lm + LIBS+=-lpthread -+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) +@@ -79,7 +78,14 @@ CFLAGS += -idirafter yajl-fallback + 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)) -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 + LIBS:=$(filter-out -lpulse, $(LIBS)) + endif +diff --git a/src/print_volume.c b/src/print_volume.c +index 51e84f3..95be558 100644 +--- a/src/print_volume.c ++++ b/src/print_volume.c +@@ -61,7 +61,7 @@ void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char * 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; ++#if defined(HAVE_PULSE) + /* Try PulseAudio first */ + + /* If the device name has the format "pulse[:N]" where N is the |