Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: x11-misc/i3status/files/, x11-misc/i3status/
Date: Fri, 11 Jan 2019 15:10:54
Message-Id: 1547219375.4ce66382d7a79879c2d646c23e345c46d78bd504.blueness@gentoo
1 commit: 4ce66382d7a79879c2d646c23e345c46d78bd504
2 Author: Luis Ressel <aranea <AT> aixah <DOT> de>
3 AuthorDate: Thu Jan 10 16:53:37 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 11 15:09:35 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=4ce66382
7
8 Import x11-libs/i3status from ::gentoo
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11
12 x11-misc/i3status/Manifest | 1 +
13 .../i3status/files/i3status-2.11-pulseaudio.patch | 42 ++++++++++++++++++++
14 x11-misc/i3status/i3status-2.12.ebuild | 46 ++++++++++++++++++++++
15 x11-misc/i3status/metadata.xml | 19 +++++++++
16 4 files changed, 108 insertions(+)
17
18 diff --git a/x11-misc/i3status/Manifest b/x11-misc/i3status/Manifest
19 new file mode 100644
20 index 0000000..0b1283c
21 --- /dev/null
22 +++ b/x11-misc/i3status/Manifest
23 @@ -0,0 +1 @@
24 +DIST i3status-2.12.tar.bz2 57162 BLAKE2B d3225581b628640bfb6084b390a135562c2ce052078cf014a63e106c83beb14b38270eee28d01898d478a9593ce542684252e420ffe37d07f392509ac9b2a749 SHA512 687a880a65cb8df46f5e9d2256b59724ba3424c502e9a0fb3ca71b070875df5f4008ee501c554bc716f2d728a5cf813a36d22d7377d42c3c46b14381d385bab3
25
26 diff --git a/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch b/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch
27 new file mode 100644
28 index 0000000..2447f16
29 --- /dev/null
30 +++ b/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch
31 @@ -0,0 +1,42 @@
32 +diff --git a/Makefile b/Makefile
33 +index 3084ae7..7ea1964 100644
34 +--- a/Makefile
35 ++++ b/Makefile
36 +@@ -58,6 +57,10 @@ ifeq ($(OS),NetBSD)
37 + LIBS+=-lprop
38 + endif
39 +
40 ++ifeq ($(OS),OpenBSD)
41 ++LIBS+=-lpthread
42 ++endif
43 ++
44 + # This probably applies for any pkgsrc based system
45 + ifneq (, $(filter $(OS), NetBSD DragonFly))
46 + CFLAGS+=-I/usr/pkg/include/
47 +@@ -79,9 +82,12 @@ CFLAGS += -idirafter yajl-fallback
48 + OBJS:=$(sort $(wildcard src/*.c *.c))
49 + OBJS:=$(OBJS:.c=.o)
50 +
51 +-ifeq ($(OS),OpenBSD)
52 ++PULSE ?= 1
53 ++ifeq ($(PULSE),0)
54 + OBJS:=$(filter-out src/pulse.o, $(OBJS))
55 + LIBS:=$(filter-out -lpulse, $(LIBS))
56 ++else
57 ++CPPFLAGS+=-DPULSE
58 + endif
59 +
60 + src/%.o: src/%.c include/i3status.h
61 +diff --git a/src/print_volume.c b/src/print_volume.c
62 +index 51e84f3..9e015c0 100644
63 +--- a/src/print_volume.c
64 ++++ b/src/print_volume.c
65 +@@ -61,7 +61,7 @@ void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char *
66 + free(instance);
67 + }
68 +
69 +-#ifndef __OpenBSD__
70 ++#if !defined(__OpenBSD__) && defined(PULSE)
71 + /* Try PulseAudio first */
72 +
73 + /* If the device name has the format "pulse[:N]" where N is the
74
75 diff --git a/x11-misc/i3status/i3status-2.12.ebuild b/x11-misc/i3status/i3status-2.12.ebuild
76 new file mode 100644
77 index 0000000..81f9ba7
78 --- /dev/null
79 +++ b/x11-misc/i3status/i3status-2.12.ebuild
80 @@ -0,0 +1,46 @@
81 +# Copyright 1999-2018 Gentoo Foundation
82 +# Distributed under the terms of the GNU General Public License v2
83 +
84 +EAPI=7
85 +
86 +inherit fcaps toolchain-funcs
87 +
88 +DESCRIPTION="generates a status bar for dzen2, xmobar or similar"
89 +HOMEPAGE="https://i3wm.org/i3status/"
90 +SRC_URI="https://i3wm.org/${PN}/${P}.tar.bz2"
91 +
92 +LICENSE="BSD"
93 +SLOT="0"
94 +KEYWORDS="amd64 ~arm x86"
95 +IUSE="pulseaudio"
96 +
97 +BDEPEND="virtual/pkgconfig"
98 +DEPEND="
99 + dev-libs/confuse:=
100 + dev-libs/libnl:3
101 + >=dev-libs/yajl-2.0.2
102 + media-libs/alsa-lib
103 + pulseaudio? ( media-sound/pulseaudio )
104 +"
105 +RDEPEND="${DEPEND}"
106 +
107 +PATCHES=( "${FILESDIR}"/${PN}-2.11-pulseaudio.patch )
108 +
109 +src_prepare() {
110 + default
111 + sed -e "/@echo/d" -e "s:@\$(:\$(:g" -e "/setcap/d" \
112 + -e '/CFLAGS+=-g/d' -i Makefile || die
113 +}
114 +
115 +src_compile() {
116 + emake V=1 CC="$(tc-getCC)" PULSE=$(usex pulseaudio 1 0)
117 +}
118 +
119 +pkg_postinst() {
120 + fcaps cap_net_admin usr/bin/${PN}
121 + einfo "${PN} can be used with any of the following programs:"
122 + einfo " i3bar (x11-wm/i3)"
123 + einfo " x11-misc/xmobar"
124 + einfo " x11-misc/dzen"
125 + einfo "Please refer to manual: man ${PN}"
126 +}
127
128 diff --git a/x11-misc/i3status/metadata.xml b/x11-misc/i3status/metadata.xml
129 new file mode 100644
130 index 0000000..59a2a28
131 --- /dev/null
132 +++ b/x11-misc/i3status/metadata.xml
133 @@ -0,0 +1,19 @@
134 +<?xml version="1.0" encoding="UTF-8"?>
135 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
136 +<pkgmetadata>
137 + <maintainer type="project">
138 + <email>desktop-misc@g.o</email>
139 + <name>Gentoo Desktop Miscellaneous Project</name>
140 + </maintainer>
141 + <longdescription>
142 + i3status is a small program (about 1500 SLOC) for generating a status bar for
143 + dzen2, xmobar or similar programs. It is designed to be very efficient by
144 + issuing a very small number of system calls, as one generally wants to update
145 + such a status line every second. This ensures that even under high load, your
146 + status bar is updated correctly. Also, it saves a bit of energy by not hogging
147 + your CPU as much as spawning the corresponding amount of shell commands would.
148 + </longdescription>
149 + <use>
150 + <flag name="filecaps">Linux capabilities library is required for i3status to be able to read net bandwith</flag>
151 + </use>
152 +</pkgmetadata>