diff options
author | Kacper Kowalik <xarthisius@gentoo.org> | 2016-01-06 08:41:51 -0600 |
---|---|---|
committer | Kacper Kowalik <xarthisius@gentoo.org> | 2016-01-06 08:41:51 -0600 |
commit | b3d5558c2778adf5f80e1444ba62d7af2b80d5db (patch) | |
tree | 92ccb4fee93876e37533052eb15607ffaa9b1002 /x11-misc/i3status | |
parent | profiles/package.mask: Clean cruft (diff) | |
download | gentoo-b3d5558c2778adf5f80e1444ba62d7af2b80d5db.tar.gz gentoo-b3d5558c2778adf5f80e1444ba62d7af2b80d5db.tar.bz2 gentoo-b3d5558c2778adf5f80e1444ba62d7af2b80d5db.zip |
x11-misc/i3status: make dependency on pulseaudio optional
Fixes bug #570786 and introduces the new USE flag
'pulseaudio'.
Reported-by: Michele Alzetta <michele@alzetta.org>
Diffstat (limited to 'x11-misc/i3status')
-rw-r--r-- | x11-misc/i3status/files/i3status-2.10-pulseaudio.patch | 46 | ||||
-rw-r--r-- | x11-misc/i3status/i3status-2.10-r1.ebuild (renamed from x11-misc/i3status/i3status-2.10.ebuild) | 9 |
2 files changed, 51 insertions, 4 deletions
diff --git a/x11-misc/i3status/files/i3status-2.10-pulseaudio.patch b/x11-misc/i3status/files/i3status-2.10-pulseaudio.patch new file mode 100644 index 000000000000..991ce036cd4f --- /dev/null +++ b/x11-misc/i3status/files/i3status-2.10-pulseaudio.patch @@ -0,0 +1,46 @@ +Make dependency on pulseaudio optional. + +It's unfortunately not upstreamable. See: + +https://github.com/i3/i3status/pull/43 +https://bugs.gentoo.org/show_bug.cgi?id=570786 + +--- a/Makefile ++++ b/Makefile +@@ -49,6 +49,10 @@ ifeq ($(OS),NetBSD) + LIBS+=-lprop + endif + ++ifeq ($(OS),OpenBSD) ++LIBS+=-lpthread ++endif ++ + # This probably applies for any pkgsrc based system + ifneq (, $(filter $(OS), NetBSD DragonFly)) + CFLAGS+=-I/usr/pkg/include/ +@@ -70,9 +74,12 @@ CFLAGS += -idirafter yajl-fallback + OBJS:=$(wildcard src/*.c *.c) + OBJS:=$(OBJS:.c=.o) + +-ifeq ($(OS),OpenBSD) ++PULSE ?= 1 ++ifeq ($(PULSE),0) + OBJS:=$(filter-out src/pulse.o, $(OBJS)) +-LIBS:=$(filter-out -lpulse, $(LIBS)) -lpthread ++LIBS:=$(filter-out -lpulse, $(LIBS)) ++else ++CPPFLAGS+=-DPULSE + endif + + src/%.o: src/%.c include/i3status.h +--- a/src/print_volume.c ++++ b/src/print_volume.c +@@ -60,7 +60,7 @@ void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char * + free(instance); + } + +-#ifndef __OpenBSD__ ++#if !defined(__OpenBSD__) && defined(PULSE) + /* Try PulseAudio first */ + + /* If the device name has the format "pulse[:N]" where N is the diff --git a/x11-misc/i3status/i3status-2.10.ebuild b/x11-misc/i3status/i3status-2.10-r1.ebuild index 1801fdfa96cb..7405b5eb0e4c 100644 --- a/x11-misc/i3status/i3status-2.10.ebuild +++ b/x11-misc/i3status/i3status-2.10-r1.ebuild @@ -4,7 +4,7 @@ EAPI=5 -inherit toolchain-funcs versionator fcaps +inherit eutils toolchain-funcs fcaps DESCRIPTION="generates a status bar for dzen2, xmobar or similar" HOMEPAGE="http://i3wm.org/i3status/" @@ -13,25 +13,26 @@ SRC_URI="http://i3wm.org/${PN}/${P}.tar.bz2" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="pulseaudio" RDEPEND="dev-libs/confuse dev-libs/libnl:3 >=dev-libs/yajl-2.0.2 media-libs/alsa-lib - media-sound/pulseaudio" + pulseaudio? ( media-sound/pulseaudio )" DEPEND="${RDEPEND} app-text/asciidoc virtual/pkgconfig" src_prepare() { + epatch "$FILESDIR"/$P-pulseaudio.patch sed -e "/@echo/d" -e "s:@\$(:\$(:g" -e "/setcap/d" \ -e '/CFLAGS+=-g/d' -i Makefile || die rm -rf man/${PN}.1 # man not regenerated in tarball } src_compile() { - emake CC="$(tc-getCC)" + emake CC="$(tc-getCC)" PULSE=$(usex pulseaudio 1 0) } pkg_postinst() { |