1 |
commit: c43a8b3cd8be202b594522496958762e6701109d |
2 |
Author: Craig Andrews <candrews <AT> integralblue <DOT> com> |
3 |
AuthorDate: Sun Jul 31 22:34:27 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 2 17:29:12 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c43a8b3c |
7 |
|
8 |
app-misc/lirc-0.9.4a-r2: cleanup old ebuild, init script improvements, remove la files, don't set docdir unnecessarily (EAPI 6 does that automatically) |
9 |
|
10 |
Gentoo-bug: 454466, 353774 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/1988 |
12 |
|
13 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
14 |
|
15 |
app-misc/lirc/Manifest | 1 - |
16 |
app-misc/lirc/files/irexec-initd-0.9.4a-r2 | 28 +++++ |
17 |
app-misc/lirc/files/lircmd-0.9.4a-r2 | 20 ++++ |
18 |
app-misc/lirc/files/lircmd.conf | 4 + |
19 |
app-misc/lirc/lirc-0.9.4.ebuild | 125 --------------------- |
20 |
app-misc/lirc/lirc-0.9.4a-r1.ebuild | 8 ++ |
21 |
.../{lirc-0.9.4a.ebuild => lirc-0.9.4a-r2.ebuild} | 22 ++-- |
22 |
7 files changed, 73 insertions(+), 135 deletions(-) |
23 |
|
24 |
diff --git a/app-misc/lirc/Manifest b/app-misc/lirc/Manifest |
25 |
index 2545d62..244e890 100644 |
26 |
--- a/app-misc/lirc/Manifest |
27 |
+++ b/app-misc/lirc/Manifest |
28 |
@@ -1,3 +1,2 @@ |
29 |
DIST lirc-0.9.0.tar.bz2 857286 SHA256 6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff SHA512 e91534c63e6065bd7da3b15e1676edf1672b8beb21864a6825df86247d7d165bf2dee6f8191732933e24e42a406e46afc55559948e4061eed2de7b08fac13431 WHIRLPOOL 0a1c00b07898aa7a5d78865fb73c6d26c6331dd0a4945773a801d29e40298b365eb58cae113a95fcf73be678a24ac082ad0868e8051303d732882fb82a859a7b |
30 |
-DIST lirc-0.9.4.tar.bz2 2291164 SHA256 dd18a6751674fd61e4a96eebc3b9e5c883389d6230811943513443522dfc5dd0 SHA512 0220cfa0e1900691eed3d6b0624c27e0a99825cd60303304eee7c60e3ae1d8e939d05d32680da64cdbf764919708888ce05803e9ab2423f4bf019b4acd8542f1 WHIRLPOOL 83390295e55445f2d10372e1515b0163d5b3b1e9903f132e018d975d66998d98ffee1caaa1fe26577a0ce18fce20ec025fd5cc0aaf5074728269b12e84d55268 |
31 |
DIST lirc-0.9.4a.tar.bz2 2292119 SHA256 386086a74c7d12e7e8f26f7dbc8f40d20b9968c9ad2a42599483a51dd2da03ba SHA512 16be0ac5dd9b07d717ceba63cdc38c0db4a2bdcfc373ca6346d7cd4ab2cd2973aa7585d10b045fcaea952a3aabf7617c564ccb8268db6c62b172683a4b2cc188 WHIRLPOOL 93431c43d2dd31081e97113e2d49134de7feb29be53508900b3360408f7a099becf169fcebd0f6fc196280c594dc83d1299617ee54b65452828492db9bcd09ad |
32 |
|
33 |
diff --git a/app-misc/lirc/files/irexec-initd-0.9.4a-r2 b/app-misc/lirc/files/irexec-initd-0.9.4a-r2 |
34 |
new file mode 100644 |
35 |
index 0000000..2945577 |
36 |
--- /dev/null |
37 |
+++ b/app-misc/lirc/files/irexec-initd-0.9.4a-r2 |
38 |
@@ -0,0 +1,28 @@ |
39 |
+#!/sbin/openrc-run |
40 |
+# Copyright 2003 Martin Hierling <mad@×××××××××××.de> |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+# $Id$ |
43 |
+ |
44 |
+: ${IREXEC_USER:=root} |
45 |
+ |
46 |
+depend() { |
47 |
+ need lircd |
48 |
+} |
49 |
+ |
50 |
+start() { |
51 |
+ if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then |
52 |
+ ewarn "Warning: Running irexec as root can open security holes" |
53 |
+ fi |
54 |
+ |
55 |
+ ebegin "Starting irexec" |
56 |
+ start-stop-daemon --start --user ${IREXEC_USER} --chdir / \ |
57 |
+ --exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS} |
58 |
+ eend $? "Failed to start irexec." |
59 |
+} |
60 |
+ |
61 |
+stop() { |
62 |
+ ebegin "Stopping irexec" |
63 |
+ start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER} |
64 |
+ eend $? "Failed to stop irexec." |
65 |
+} |
66 |
+ |
67 |
|
68 |
diff --git a/app-misc/lirc/files/lircmd-0.9.4a-r2 b/app-misc/lirc/files/lircmd-0.9.4a-r2 |
69 |
new file mode 100644 |
70 |
index 0000000..6b51c6e |
71 |
--- /dev/null |
72 |
+++ b/app-misc/lirc/files/lircmd-0.9.4a-r2 |
73 |
@@ -0,0 +1,20 @@ |
74 |
+#!/sbin/openrc-run |
75 |
+# Copyright 1999-2016 Gentoo Foundation |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+# $Id$ |
78 |
+ |
79 |
+depend() { |
80 |
+ need lircd |
81 |
+} |
82 |
+ |
83 |
+start() { |
84 |
+ ebegin "Starting lircmd" |
85 |
+ start-stop-daemon --start --quiet --exec /usr/sbin/lircmd -- ${LIRCMD_OPTS} |
86 |
+ eend $? |
87 |
+} |
88 |
+ |
89 |
+stop() { |
90 |
+ ebegin "Stopping lircmd" |
91 |
+ start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd |
92 |
+ eend $? |
93 |
+} |
94 |
|
95 |
diff --git a/app-misc/lirc/files/lircmd.conf b/app-misc/lirc/files/lircmd.conf |
96 |
new file mode 100644 |
97 |
index 0000000..319362a |
98 |
--- /dev/null |
99 |
+++ b/app-misc/lirc/files/lircmd.conf |
100 |
@@ -0,0 +1,4 @@ |
101 |
+# Options to pass to the lircmd process |
102 |
+ |
103 |
+LIRCMD_OPTS="--uinput" |
104 |
+ |
105 |
|
106 |
diff --git a/app-misc/lirc/lirc-0.9.4.ebuild b/app-misc/lirc/lirc-0.9.4.ebuild |
107 |
deleted file mode 100644 |
108 |
index 3d735c5..0000000 |
109 |
--- a/app-misc/lirc/lirc-0.9.4.ebuild |
110 |
+++ /dev/null |
111 |
@@ -1,125 +0,0 @@ |
112 |
-# Copyright 1999-2016 Gentoo Foundation |
113 |
-# Distributed under the terms of the GNU General Public License v2 |
114 |
-# $Id$ |
115 |
- |
116 |
-EAPI=6 |
117 |
- |
118 |
-inherit eutils flag-o-matic systemd |
119 |
- |
120 |
-DESCRIPTION="decode and send infra-red signals of many commonly used remote controls" |
121 |
-HOMEPAGE="http://www.lirc.org/" |
122 |
- |
123 |
-LIRC_DRIVER_DEVICE="/dev/lirc0" |
124 |
- |
125 |
-MY_P=${PN}-${PV/_/} |
126 |
- |
127 |
-if [[ "${PV/_pre/}" = "${PV}" ]]; then |
128 |
- SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2" |
129 |
-else |
130 |
- SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2" |
131 |
-fi |
132 |
- |
133 |
-LICENSE="GPL-2" |
134 |
-SLOT="0" |
135 |
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
136 |
-IUSE="doc static-libs X audio irman ftdi inputlirc iguanair systemd" |
137 |
- |
138 |
-S="${WORKDIR}/${MY_P}" |
139 |
- |
140 |
-REQUIRED_USE=" |
141 |
- iguanair? ( irman ) |
142 |
-" |
143 |
-DEPEND=" |
144 |
- doc? ( app-doc/doxygen ) |
145 |
-" |
146 |
- |
147 |
-RDEPEND=" |
148 |
- X? ( |
149 |
- x11-libs/libX11 |
150 |
- x11-libs/libSM |
151 |
- x11-libs/libICE |
152 |
- ) |
153 |
- systemd? ( sys-apps/systemd ) |
154 |
- audio? ( |
155 |
- >media-libs/portaudio-18 |
156 |
- media-libs/alsa-lib |
157 |
- ) |
158 |
- irman? ( media-libs/libirman ) |
159 |
- iguanair? ( app-misc/iguanaIR ) |
160 |
- ftdi? ( dev-embedded/libftdi:0 ) |
161 |
- inputlirc? ( app-misc/inputlircd ) |
162 |
- virtual/libusb:0 |
163 |
-" |
164 |
- |
165 |
-src_configure() { |
166 |
- filter-flags -Wl,-O1 |
167 |
- econf \ |
168 |
- $(use_enable static-libs static) \ |
169 |
- $(use_with X x) |
170 |
-} |
171 |
- |
172 |
-src_install() { |
173 |
- default |
174 |
- |
175 |
- newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd |
176 |
- newinitd "${FILESDIR}"/lircmd lircmd |
177 |
- newconfd "${FILESDIR}"/lircd.conf.4 lircd |
178 |
- |
179 |
- insinto /etc/modprobe.d/ |
180 |
- newins "${FILESDIR}"/modprobed.lirc lirc.conf |
181 |
- |
182 |
- newinitd "${FILESDIR}"/irexec-initd irexec |
183 |
- newconfd "${FILESDIR}"/irexec-confd irexec |
184 |
- |
185 |
- if use doc ; then |
186 |
- dodoc -r doc/html |
187 |
- fi |
188 |
- |
189 |
- keepdir /etc/lirc |
190 |
- if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then |
191 |
- newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example |
192 |
- fi |
193 |
- |
194 |
- if ! use static-libs; then |
195 |
- rm "${D}/usr/$(get_libdir)/liblirc_client.la" || die |
196 |
- fi |
197 |
-} |
198 |
- |
199 |
-pkg_preinst() { |
200 |
- local dir="${EROOT}/etc/modprobe.d" |
201 |
- if [[ -a "${dir}"/lirc && ! -a "${dir}"/lirc.conf ]]; then |
202 |
- elog "Renaming ${dir}/lirc to lirc.conf" |
203 |
- mv -f "${dir}/lirc" "${dir}/lirc.conf" || die |
204 |
- fi |
205 |
- |
206 |
- # copy the first file that can be found |
207 |
- if [[ -f "${EROOT}"/etc/lirc/lircd.conf ]]; then |
208 |
- cp "${EROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf || die |
209 |
- elif [[ -f "${EROOT}"/etc/lircd.conf ]]; then |
210 |
- cp "${EROOT}"/etc/lircd.conf "${T}"/lircd.conf || die |
211 |
- MOVE_OLD_LIRCD_CONF=1 |
212 |
- elif [[ -f "${D}"/etc/lirc/lircd.conf ]]; then |
213 |
- cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf || die |
214 |
- fi |
215 |
- |
216 |
- # stop portage from touching the config file |
217 |
- if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then |
218 |
- rm -f "${D}"/etc/lirc/lircd.conf || die |
219 |
- fi |
220 |
-} |
221 |
- |
222 |
-pkg_postinst() { |
223 |
- # copy config file to new location |
224 |
- # without portage knowing about it |
225 |
- # so it will not delete it on unmerge or ever touch it again |
226 |
- if [[ -e "${T}"/lircd.conf ]]; then |
227 |
- cp "${T}"/lircd.conf "${EROOT}"/etc/lirc/lircd.conf || die |
228 |
- if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then |
229 |
- elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf" |
230 |
- rm -f "${EROOT}"/etc/lircd.conf || die |
231 |
- fi |
232 |
- fi |
233 |
- |
234 |
- einfo "The new default location for lircd.conf is inside of" |
235 |
- einfo "/etc/lirc/ directory" |
236 |
-} |
237 |
|
238 |
diff --git a/app-misc/lirc/lirc-0.9.4a-r1.ebuild b/app-misc/lirc/lirc-0.9.4a-r1.ebuild |
239 |
index e77f5fa..0c413ef 100644 |
240 |
--- a/app-misc/lirc/lirc-0.9.4a-r1.ebuild |
241 |
+++ b/app-misc/lirc/lirc-0.9.4a-r1.ebuild |
242 |
@@ -64,6 +64,14 @@ src_configure() { |
243 |
$(use_with X x) |
244 |
} |
245 |
|
246 |
+# Defined src_compile as a workaround for a parallel make issue |
247 |
+# See https://bugs.gentoo.org/show_bug.cgi?id=588864 |
248 |
+# and https://sourceforge.net/p/lirc/tickets/210/ |
249 |
+src_compile() { |
250 |
+ emake lib |
251 |
+ emake |
252 |
+} |
253 |
+ |
254 |
src_install() { |
255 |
default |
256 |
|
257 |
|
258 |
diff --git a/app-misc/lirc/lirc-0.9.4a.ebuild b/app-misc/lirc/lirc-0.9.4a-r2.ebuild |
259 |
similarity index 87% |
260 |
rename from app-misc/lirc/lirc-0.9.4a.ebuild |
261 |
rename to app-misc/lirc/lirc-0.9.4a-r2.ebuild |
262 |
index 395ddd3..d1b39e5 100644 |
263 |
--- a/app-misc/lirc/lirc-0.9.4a.ebuild |
264 |
+++ b/app-misc/lirc/lirc-0.9.4a-r2.ebuild |
265 |
@@ -51,9 +51,14 @@ RDEPEND=" |
266 |
usb? ( virtual/libusb:0 ) |
267 |
" |
268 |
|
269 |
+PATCHES=( |
270 |
+ "${FILESDIR}"/lirc-0.9.4-doc-path-fix.patch # https://bugs.gentoo.org/show_bug.cgi?id=589246 https://sourceforge.net/p/lirc/tickets/214/ |
271 |
+) |
272 |
+ |
273 |
src_configure() { |
274 |
filter-flags -Wl,-O1 |
275 |
econf \ |
276 |
+ --localstatedir=/var \ |
277 |
$(use_enable static-libs static) \ |
278 |
$(use_with X x) |
279 |
} |
280 |
@@ -70,27 +75,26 @@ src_install() { |
281 |
default |
282 |
|
283 |
newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd |
284 |
- newinitd "${FILESDIR}"/lircmd lircmd |
285 |
+ newinitd "${FILESDIR}"/lircmd-0.9.4a-r2 lircmd |
286 |
newconfd "${FILESDIR}"/lircd.conf.4 lircd |
287 |
+ newconfd "${FILESDIR}"/lircmd.conf lircmd |
288 |
|
289 |
insinto /etc/modprobe.d/ |
290 |
newins "${FILESDIR}"/modprobed.lirc lirc.conf |
291 |
|
292 |
- newinitd "${FILESDIR}"/irexec-initd irexec |
293 |
+ newinitd "${FILESDIR}"/irexec-initd-0.9.4a-r2 irexec |
294 |
newconfd "${FILESDIR}"/irexec-confd irexec |
295 |
|
296 |
- if use doc ; then |
297 |
- dodoc -r doc/html |
298 |
- fi |
299 |
- |
300 |
keepdir /etc/lirc |
301 |
if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then |
302 |
newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example |
303 |
fi |
304 |
|
305 |
- if ! use static-libs; then |
306 |
- rm "${D}/usr/$(get_libdir)/liblirc_client.la" || die |
307 |
- fi |
308 |
+ find "${D}" -name '*.la' -delete || die |
309 |
+ |
310 |
+ # Avoid QA notice |
311 |
+ rm -d "${D}"/var/run/lirc || die |
312 |
+ rm -d "${D}"/var/run || die |
313 |
} |
314 |
|
315 |
pkg_preinst() { |