aboutsummaryrefslogtreecommitdiffstats
path: root/testing/i3status
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2016-01-07 20:14:30 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2016-01-08 13:26:15 +0000
commit956d74faf5dac34cdd2f4b059877489bf6401663 (patch)
tree2a60be60d1bb040bda9d82c7a42a47b2271dfab1 /testing/i3status
parent4067f7055ef643069310d500b8896120076fa712 (diff)
downloadaports-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')
-rw-r--r--testing/i3status/APKBUILD29
-rw-r--r--testing/i3status/no-pulseaudio.patch80
2 files changed, 96 insertions, 13 deletions
diff --git a/testing/i3status/APKBUILD b/testing/i3status/APKBUILD
index a889f5244c..e68b11a14b 100644
--- a/testing/i3status/APKBUILD
+++ b/testing/i3status/APKBUILD
@@ -1,19 +1,21 @@
# Contributor: k0r10n <k0r10n.dev@gmail.com>
-# Maintainer:
+# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=i3status
-pkgver=2.9
-pkgrel=1
+pkgver=2.10
+pkgrel=0
pkgdesc="Generates status bar to use with i3bar, dzen2 or xmobar"
url="http://i3.zekjur.net/i3status/"
arch="all"
license="BSD"
depends=""
-depends_dev="wireless-tools-dev alsa-lib-dev confuse-dev yajl-dev"
-makedepends="$depends_dev asciidoc linux-headers"
+depends_dev=""
+makedepends="libnl3-dev alsa-lib-dev confuse-dev yajl-dev
+ asciidoc linux-headers"
install=""
subpackages="$pkgname-doc"
source="http://i3wm.org/i3status/${pkgname}-${pkgver}.tar.bz2
musl-fix.patch
+ no-pulseaudio.patch
"
_builddir="$srcdir"/${pkgname}-${pkgver}
@@ -35,13 +37,14 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir/" install || return 1
- install -Dm644 LICENSE \
- "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE || return 1
}
-md5sums="f02a61ade525fd9e9b092f778632a8b0 i3status-2.9.tar.bz2
-75f4468573a132ae9fb255fb9a5531a7 musl-fix.patch"
-sha256sums="42eb09500c625fcac9a7125a29e7bf532ca4b8540942418ee3253aa15e5e9de3 i3status-2.9.tar.bz2
-e976f20fb165d2f96e7a49a95a2d5c803d882883dd4a87bfe20e62f85bf5fb4d musl-fix.patch"
-sha512sums="67d026fcb4cc2a8af39cc268c962d49c4d3f2473bad92d99fa7fba876235ac83471663b318f890e9d7d3e9e06897286d693d352e686376a3a4876f253f309cb6 i3status-2.9.tar.bz2
-340c44f68b2f74c2f66314f515f6843a6ac609a4d203ceb152b662aa8822ed405ccbbe459ea2eb1b42891cea84e3b63d1ff3bfe478d7fa2fc6c8b51f39f12a00 musl-fix.patch"
+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
+340c44f68b2f74c2f66314f515f6843a6ac609a4d203ceb152b662aa8822ed405ccbbe459ea2eb1b42891cea84e3b63d1ff3bfe478d7fa2fc6c8b51f39f12a00 musl-fix.patch
+bb7fdd60b70545038b5120915fed796bf1e6259cb5eba15d9621db54870e634799024752588fd3e9a87efc6c97b410ccee4690eb66812054838b50771afe9799 no-pulseaudio.patch"
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;