aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Ressel <aranea@aixah.de>2019-01-10 17:53:37 +0100
committerAnthony G. Basile <blueness@gentoo.org>2019-01-11 10:09:35 -0500
commit4ce66382d7a79879c2d646c23e345c46d78bd504 (patch)
tree6fbe62359db80a84453868a4184cb2126f277e62
parentx11-libs/xcb-util-xrm: Drop old versions (diff)
downloadmusl-4ce66382d7a79879c2d646c23e345c46d78bd504.tar.gz
musl-4ce66382d7a79879c2d646c23e345c46d78bd504.tar.bz2
musl-4ce66382d7a79879c2d646c23e345c46d78bd504.zip
Import x11-libs/i3status from ::gentoo
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--x11-misc/i3status/Manifest1
-rw-r--r--x11-misc/i3status/files/i3status-2.11-pulseaudio.patch42
-rw-r--r--x11-misc/i3status/i3status-2.12.ebuild46
-rw-r--r--x11-misc/i3status/metadata.xml19
4 files changed, 108 insertions, 0 deletions
diff --git a/x11-misc/i3status/Manifest b/x11-misc/i3status/Manifest
new file mode 100644
index 00000000..0b1283c2
--- /dev/null
+++ b/x11-misc/i3status/Manifest
@@ -0,0 +1 @@
+DIST i3status-2.12.tar.bz2 57162 BLAKE2B d3225581b628640bfb6084b390a135562c2ce052078cf014a63e106c83beb14b38270eee28d01898d478a9593ce542684252e420ffe37d07f392509ac9b2a749 SHA512 687a880a65cb8df46f5e9d2256b59724ba3424c502e9a0fb3ca71b070875df5f4008ee501c554bc716f2d728a5cf813a36d22d7377d42c3c46b14381d385bab3
diff --git a/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch b/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch
new file mode 100644
index 00000000..2447f16f
--- /dev/null
+++ b/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 3084ae7..7ea1964 100644
+--- a/Makefile
++++ b/Makefile
+@@ -58,6 +57,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/
+@@ -79,9 +82,12 @@ CFLAGS += -idirafter yajl-fallback
+ OBJS:=$(sort $(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))
++else
++CPPFLAGS+=-DPULSE
+ endif
+
+ src/%.o: src/%.c include/i3status.h
+diff --git a/src/print_volume.c b/src/print_volume.c
+index 51e84f3..9e015c0 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__
++#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.12.ebuild b/x11-misc/i3status/i3status-2.12.ebuild
new file mode 100644
index 00000000..81f9ba7f
--- /dev/null
+++ b/x11-misc/i3status/i3status-2.12.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit fcaps toolchain-funcs
+
+DESCRIPTION="generates a status bar for dzen2, xmobar or similar"
+HOMEPAGE="https://i3wm.org/i3status/"
+SRC_URI="https://i3wm.org/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="pulseaudio"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+ dev-libs/confuse:=
+ dev-libs/libnl:3
+ >=dev-libs/yajl-2.0.2
+ media-libs/alsa-lib
+ pulseaudio? ( media-sound/pulseaudio )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.11-pulseaudio.patch )
+
+src_prepare() {
+ default
+ sed -e "/@echo/d" -e "s:@\$(:\$(:g" -e "/setcap/d" \
+ -e '/CFLAGS+=-g/d' -i Makefile || die
+}
+
+src_compile() {
+ emake V=1 CC="$(tc-getCC)" PULSE=$(usex pulseaudio 1 0)
+}
+
+pkg_postinst() {
+ fcaps cap_net_admin usr/bin/${PN}
+ einfo "${PN} can be used with any of the following programs:"
+ einfo " i3bar (x11-wm/i3)"
+ einfo " x11-misc/xmobar"
+ einfo " x11-misc/dzen"
+ einfo "Please refer to manual: man ${PN}"
+}
diff --git a/x11-misc/i3status/metadata.xml b/x11-misc/i3status/metadata.xml
new file mode 100644
index 00000000..59a2a28f
--- /dev/null
+++ b/x11-misc/i3status/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>desktop-misc@gentoo.org</email>
+ <name>Gentoo Desktop Miscellaneous Project</name>
+ </maintainer>
+ <longdescription>
+ i3status is a small program (about 1500 SLOC) for generating a status bar for
+ dzen2, xmobar or similar programs. It is designed to be very efficient by
+ issuing a very small number of system calls, as one generally wants to update
+ such a status line every second. This ensures that even under high load, your
+ status bar is updated correctly. Also, it saves a bit of energy by not hogging
+ your CPU as much as spawning the corresponding amount of shell commands would.
+ </longdescription>
+ <use>
+ <flag name="filecaps">Linux capabilities library is required for i3status to be able to read net bandwith</flag>
+ </use>
+</pkgmetadata>