1 |
axs 13/08/27 18:24:41 |
2 |
|
3 |
Modified: lirc-0.9.0-r2.ebuild ChangeLog |
4 |
Added: lirc-0.9.0-r3.ebuild |
5 |
Log: |
6 |
fixed oops where I applied the new patch to the ebuild with stable keywords |
7 |
|
8 |
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED) |
9 |
|
10 |
Revision Changes Path |
11 |
1.13 app-misc/lirc/lirc-0.9.0-r2.ebuild |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/lirc-0.9.0-r2.ebuild?rev=1.13&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/lirc-0.9.0-r2.ebuild?rev=1.13&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/lirc-0.9.0-r2.ebuild?r1=1.12&r2=1.13 |
16 |
|
17 |
Index: lirc-0.9.0-r2.ebuild |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r2.ebuild,v |
20 |
retrieving revision 1.12 |
21 |
retrieving revision 1.13 |
22 |
diff -u -r1.12 -r1.13 |
23 |
--- lirc-0.9.0-r2.ebuild 27 Aug 2013 18:22:28 -0000 1.12 |
24 |
+++ lirc-0.9.0-r2.ebuild 27 Aug 2013 18:24:40 -0000 1.13 |
25 |
@@ -1,6 +1,6 @@ |
26 |
# Copyright 1999-2013 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r2.ebuild,v 1.12 2013/08/27 18:22:28 axs Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r2.ebuild,v 1.13 2013/08/27 18:24:40 axs Exp $ |
30 |
|
31 |
EAPI=4 |
32 |
|
33 |
@@ -65,7 +65,7 @@ |
34 |
remotemaster sa1100 samsung sasem sb0540 serial |
35 |
silitek sir slinke streamzap tekram |
36 |
tekram_bt829 tira ttusbir tuxbox tvbox udp uirt2 |
37 |
- uirt2_raw usb_uirt_raw usbx wpc8769l zotac" |
38 |
+ uirt2_raw usb_uirt_raw usbx wpc8769l" |
39 |
|
40 |
# drivers that need special handling and |
41 |
# must have another name specified for |
42 |
@@ -94,7 +94,7 @@ |
43 |
imon_knob imon_lcd imon_pad imon_rsc irdeo irdeo_remote knc_one |
44 |
leadtek_pvr2000 nslu2 packard_bell parallel pixelview_bt878 |
45 |
provideo sa1100 sasem serial sir tekram tekram_bt829 ttusbir |
46 |
- tvbox wpc8769l zotac" |
47 |
+ tvbox wpc8769l" |
48 |
|
49 |
#lirc_gpio drivers, which cannot be supported on kernel >= 2.6.22 |
50 |
LIRC_GPIO_DEV=" |
51 |
@@ -299,8 +299,6 @@ |
52 |
epatch "${FILESDIR}"/${P}-kernel-3.5-err-fix.patch |
53 |
# Apply fix for missing __devinit __devexit defines in kernel 3.8+ (bug 461532) |
54 |
epatch "${FILESDIR}"/${P}-kernel-3.8-fixes.patch |
55 |
- # Add support for zotac remote, bug 342848 |
56 |
- epatch "${FILESDIR}"/${P}-add-zotac-support.patch |
57 |
|
58 |
# Do not build drivers from the top-level Makefile |
59 |
sed -i -e 's:\(SUBDIRS =\) drivers\(.*\):\1\2:' Makefile.am |
60 |
|
61 |
|
62 |
|
63 |
1.243 app-misc/lirc/ChangeLog |
64 |
|
65 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.243&view=markup |
66 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.243&content-type=text/plain |
67 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/ChangeLog?r1=1.242&r2=1.243 |
68 |
|
69 |
Index: ChangeLog |
70 |
=================================================================== |
71 |
RCS file: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v |
72 |
retrieving revision 1.242 |
73 |
retrieving revision 1.243 |
74 |
diff -u -r1.242 -r1.243 |
75 |
--- ChangeLog 27 Aug 2013 18:22:28 -0000 1.242 |
76 |
+++ ChangeLog 27 Aug 2013 18:24:40 -0000 1.243 |
77 |
@@ -1,6 +1,12 @@ |
78 |
# ChangeLog for app-misc/lirc |
79 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
80 |
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.242 2013/08/27 18:22:28 axs Exp $ |
81 |
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.243 2013/08/27 18:24:40 axs Exp $ |
82 |
+ |
83 |
+*lirc-0.9.0-r3 (27 Aug 2013) |
84 |
+ |
85 |
+ 27 Aug 2013; Ian Stakenvicius <axs@g.o> +lirc-0.9.0-r3.ebuild, |
86 |
+ lirc-0.9.0-r2.ebuild: |
87 |
+ fixed oops where I applied the new patch to the ebuild with stable keywords |
88 |
|
89 |
27 Aug 2013; Ian Stakenvicius <axs@g.o> |
90 |
+files/lirc-0.9.0-add-zotac-support.patch, lirc-0.9.0-r2.ebuild: |
91 |
|
92 |
|
93 |
|
94 |
1.1 app-misc/lirc/lirc-0.9.0-r3.ebuild |
95 |
|
96 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/lirc-0.9.0-r3.ebuild?rev=1.1&view=markup |
97 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/lirc-0.9.0-r3.ebuild?rev=1.1&content-type=text/plain |
98 |
|
99 |
Index: lirc-0.9.0-r3.ebuild |
100 |
=================================================================== |
101 |
# Copyright 1999-2013 Gentoo Foundation |
102 |
# Distributed under the terms of the GNU General Public License v2 |
103 |
# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r3.ebuild,v 1.1 2013/08/27 18:24:40 axs Exp $ |
104 |
|
105 |
EAPI=4 |
106 |
|
107 |
inherit eutils linux-mod linux-info toolchain-funcs flag-o-matic autotools |
108 |
|
109 |
DESCRIPTION="decode and send infra-red signals of many commonly used remote controls" |
110 |
HOMEPAGE="http://www.lirc.org/" |
111 |
|
112 |
MY_P=${PN}-${PV/_/} |
113 |
|
114 |
if [[ "${PV/_pre/}" = "${PV}" ]]; then |
115 |
SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2" |
116 |
else |
117 |
SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2" |
118 |
fi |
119 |
|
120 |
LICENSE="GPL-2" |
121 |
SLOT="0" |
122 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
123 |
IUSE="debug doc hardware-carrier transmitter static-libs X" |
124 |
|
125 |
S="${WORKDIR}/${MY_P}" |
126 |
|
127 |
RDEPEND=" |
128 |
X? ( |
129 |
x11-libs/libX11 |
130 |
x11-libs/libSM |
131 |
x11-libs/libICE |
132 |
) |
133 |
lirc_devices_alsa_usb? ( media-libs/alsa-lib ) |
134 |
lirc_devices_audio? ( >media-libs/portaudio-18 ) |
135 |
lirc_devices_irman? ( media-libs/libirman )" |
136 |
|
137 |
# 2012-07-17, Ian Stakenvicius |
138 |
# A helper script that scrapes out values for nearly all of the variables below |
139 |
# from lirc's configure.ac is available at |
140 |
# http://dev.gentoo.org/~axs/helper-for-lirc-iuse.sh |
141 |
|
142 |
# This are drivers with names matching the |
143 |
# parameter --with-driver=NAME |
144 |
IUSE_LIRC_DEVICES_DIRECT=" |
145 |
all userspace accent act200l act220l |
146 |
adaptec alsa_usb animax asusdh atilibusb |
147 |
atiusb audio audio_alsa avermedia avermedia_vdomate |
148 |
avermedia98 awlibusb bestbuy bestbuy2 breakoutbox |
149 |
bte bw6130 caraca chronos commandir |
150 |
cph06x creative creative_infracd |
151 |
devinput digimatrix dsp dvico ea65 ene0100 |
152 |
exaudio flyvideo ftdi gvbctv5pci hauppauge |
153 |
hauppauge_dvb hercules_smarttv_stereo i2cuser |
154 |
igorplugusb iguanaIR imon imon_24g imon_knob |
155 |
imon_lcd imon_pad imon_rsc irdeo irdeo_remote |
156 |
irlink irman irreal it87 ite8709 |
157 |
knc_one kworld leadtek_0007 leadtek_0010 |
158 |
leadtek_pvr2000 livedrive_midi |
159 |
livedrive_seq logitech macmini |
160 |
mediafocusI mouseremote |
161 |
mouseremote_ps2 mp3anywhere mplay nslu2 |
162 |
packard_bell parallel pcmak pcmak_usb |
163 |
pctv pixelview_bt878 pixelview_pak |
164 |
pixelview_pro provideo realmagic |
165 |
remotemaster sa1100 samsung sasem sb0540 serial |
166 |
silitek sir slinke streamzap tekram |
167 |
tekram_bt829 tira ttusbir tuxbox tvbox udp uirt2 |
168 |
uirt2_raw usb_uirt_raw usbx wpc8769l zotac" |
169 |
|
170 |
# drivers that need special handling and |
171 |
# must have another name specified for |
172 |
# parameter --with-driver=NAME |
173 |
IUSE_LIRC_DEVICES_SPECIAL=" |
174 |
serial_igor_cesko |
175 |
remote_wonder_plus xboxusb usbirboy inputlirc" |
176 |
|
177 |
IUSE_LIRC_DEVICES="${IUSE_LIRC_DEVICES_DIRECT} ${IUSE_LIRC_DEVICES_SPECIAL}" |
178 |
|
179 |
# The following are lists which are used to provide ewarns on incompatibilities |
180 |
# with the kernel: |
181 |
|
182 |
#drivers that do not build kernel modules |
183 |
NO_KMOD_BUILT_FOR_DEV=" |
184 |
accent bte creative creative_infracd devinput dsp ea65 exaudio |
185 |
ftdi i2cuser irlink irreal livedrive_midi livedrive_seq logitech |
186 |
mediafocusI mouseremote mouseremote_ps2 mp3anywhere mplay mplay2 |
187 |
pcmak pcmak_usb pctv realmagic remotemaster silitek tira tira_raw |
188 |
tuxbox udp uirt2 uirt2_raw usb_uirt_raw usbx" |
189 |
|
190 |
#drivers that build lirc_dev and so will conflict with kernel lirc_dev |
191 |
LIRCDEV_BUILT_FOR_DEV="all |
192 |
act200l act220l adaptec animax atiusb breakoutbox hauppauge |
193 |
hauppauge_dvb hercules_smarttv_stereo igorplugusb imon imon_24g |
194 |
imon_knob imon_lcd imon_pad imon_rsc irdeo irdeo_remote knc_one |
195 |
leadtek_pvr2000 nslu2 packard_bell parallel pixelview_bt878 |
196 |
provideo sa1100 sasem serial sir tekram tekram_bt829 ttusbir |
197 |
tvbox wpc8769l zotac" |
198 |
|
199 |
#lirc_gpio drivers, which cannot be supported on kernel >= 2.6.22 |
200 |
LIRC_GPIO_DEV=" |
201 |
avermedia avermedia98 avermedia_vdomate bestbuy bestbuy2 chronos |
202 |
cph03x cph06x flyvideo gvbctv5pci kworld leadtek_0007 leadtek_0010 |
203 |
pixelview_pak pixelview_pro" |
204 |
|
205 |
#device-driver which use libusb |
206 |
LIBUSB_USED_BY_DEV=" |
207 |
all atilibusb awlibusb sasem igorplugusb imon imon_lcd imon_pad |
208 |
imon_rsc streamzap xboxusb irlink commandir" |
209 |
|
210 |
for dev in ${LIBUSB_USED_BY_DEV}; do |
211 |
DEPEND="${DEPEND} lirc_devices_${dev}? ( virtual/libusb:0 )" |
212 |
done |
213 |
|
214 |
# adding only compile-time depends |
215 |
DEPEND="${RDEPEND} ${DEPEND} |
216 |
virtual/linux-sources |
217 |
lirc_devices_ftdi? ( dev-embedded/libftdi ) |
218 |
lirc_devices_all? ( dev-embedded/libftdi )" |
219 |
|
220 |
# adding only run-time depends |
221 |
RDEPEND="${RDEPEND} |
222 |
lirc_devices_usbirboy? ( app-misc/usbirboy ) |
223 |
lirc_devices_inputlirc? ( app-misc/inputlircd ) |
224 |
lirc_devices_iguanaIR? ( app-misc/iguanaIR )" |
225 |
|
226 |
# add all devices to IUSE |
227 |
# and ensure lirc_devices_all is not set alongside lirc_devices_* |
228 |
REQUIRED_USE="lirc_devices_all? (" |
229 |
for dev in ${IUSE_LIRC_DEVICES}; do |
230 |
IUSE="${IUSE} lirc_devices_${dev}" |
231 |
if [[ "${dev}" != "all" ]]; then |
232 |
REQUIRED_USE="${REQUIRED_USE} !lirc_devices_${dev}" |
233 |
fi |
234 |
done |
235 |
REQUIRED_USE="${REQUIRED_USE} )" |
236 |
|
237 |
add_device() { |
238 |
local dev="${1}" |
239 |
local desc="device ${dev}" |
240 |
if [[ -n "${2}" ]]; then |
241 |
desc="${2}" |
242 |
fi |
243 |
|
244 |
# Bug #187418 |
245 |
if kernel_is ge 2 6 22 && [[ " ${LIRC_GPIO_DEV} " == *" ${dev} "* ]]; then |
246 |
eerror "${desc} uses lirc_gpio which fails with kernel 2.6.22 or above. Not building." |
247 |
eerror "Use 'devinput' instead, or use 'userspace' along with in-kernel drivers" |
248 |
return 0 |
249 |
fi |
250 |
: ${lirc_device_count:=0} |
251 |
((lirc_device_count++)) |
252 |
|
253 |
elog "Compiling support for ${desc}" |
254 |
|
255 |
if [[ " ${LIRCDEV_BUILT_FOR_DEV} " == *" ${dev} "* ]] ; then |
256 |
if linux_chkconfig_present LIRC ; then |
257 |
ewarn "${desc} builds lirc_dev and CONFIG_LIRC is set in the kernel -- this may conflict." |
258 |
fi |
259 |
if ! linux_chkconfig_present MODULE_UNLOAD ; then |
260 |
ewarn "${desc} builds modules and CONFIG_MODULE_UNLOAD is unset in kernel." |
261 |
ewarn "You will need MODULE_UNLOAD support in your kernel." |
262 |
fi |
263 |
fi |
264 |
if [[ " ${NO_KMOD_BUILT_FOR_DEV} " == *" ${dev} "* ]] && ! linux_chkconfig_present IR_LIRC_CODEC ; then |
265 |
ewarn "${desc} builds no kernel module and CONFIG_IR_LIRC_CODEC is unset in kernel." |
266 |
fi |
267 |
|
268 |
if [[ ${lirc_device_count} -eq 2 ]] ; then |
269 |
ewarn |
270 |
ewarn "LIRC_DEVICES has more than one entry." |
271 |
ewarn "When selecting multiple devices for lirc to be supported," |
272 |
ewarn "it can not be guaranteed that the drivers play nice together." |
273 |
ewarn "If this is not intended, then please adjust LIRC_DEVICES" |
274 |
ewarn "and re-emerge." |
275 |
ewarn |
276 |
fi |
277 |
|
278 |
MY_OPTS="${MY_OPTS} --with-driver=${dev}" |
279 |
} |
280 |
|
281 |
pkg_pretend() { |
282 |
if [[ -n "${LIRC_OPTS}" ]] ; then |
283 |
ewarn |
284 |
ewarn "LIRC_OPTS is deprecated from lirc-0.8.0-r1 on." |
285 |
ewarn |
286 |
ewarn "Please use LIRC_DEVICES from now on." |
287 |
ewarn "e.g. LIRC_DEVICES=\"serial sir\"" |
288 |
ewarn |
289 |
ewarn "Flags are now set per use-flags." |
290 |
ewarn "e.g. transmitter, hardware-carrier" |
291 |
|
292 |
local opt |
293 |
local unsupported_opts="" |
294 |
|
295 |
# test for allowed options for LIRC_OPTS |
296 |
for opt in ${LIRC_OPTS}; do |
297 |
case ${opt} in |
298 |
--with-port=*|--with-irq=*|--with-timer=*|--with-tty=*) |
299 |
MY_OPTS="${MY_OPTS} ${opt}" |
300 |
;; |
301 |
*) |
302 |
unsupported_opts="${unsupported_opts} ${opt}" |
303 |
;; |
304 |
esac |
305 |
done |
306 |
if [[ -n ${unsupported_opts} ]]; then |
307 |
eerror "These options are no longer allowed to be set" |
308 |
eerror "with LIRC_OPTS: ${unsupported_opts}" |
309 |
die "LIRC_OPTS is no longer supported, use LIRC_DEVICES." |
310 |
fi |
311 |
fi |
312 |
} |
313 |
|
314 |
pkg_setup() { |
315 |
linux-mod_pkg_setup |
316 |
|
317 |
# set default configure options |
318 |
MY_OPTS="" |
319 |
LIRC_DRIVER_DEVICE="/dev/lirc0" |
320 |
|
321 |
if use lirc_devices_all; then |
322 |
# compile in drivers for a lot of devices |
323 |
add_device all "a lot of devices" |
324 |
else |
325 |
# compile in only requested drivers |
326 |
local dev |
327 |
for dev in ${IUSE_LIRC_DEVICES_DIRECT}; do |
328 |
if use lirc_devices_${dev}; then |
329 |
add_device ${dev} |
330 |
fi |
331 |
done |
332 |
|
333 |
if use lirc_devices_remote_wonder_plus; then |
334 |
add_device atiusb "device Remote Wonder Plus (atiusb-based)" |
335 |
fi |
336 |
|
337 |
if use lirc_devices_serial_igor_cesko; then |
338 |
add_device serial "serial with Igor Cesko design" |
339 |
MY_OPTS="${MY_OPTS} --with-igor" |
340 |
fi |
341 |
|
342 |
if use lirc_devices_imon_pad; then |
343 |
ewarn "The imon_pad driver has incorporated the previous pad2keys patch" |
344 |
ewarn "and removed the pad2keys_active option for the lirc_imon module" |
345 |
ewarn "because it is always active." |
346 |
ewarn "If you have an older imon VFD device, you may need to add the module" |
347 |
ewarn "option display_type=1 to override autodetection and force VFD mode." |
348 |
fi |
349 |
|
350 |
if use lirc_devices_xboxusb; then |
351 |
add_device atiusb "device xboxusb" |
352 |
fi |
353 |
|
354 |
if use lirc_devices_usbirboy; then |
355 |
add_device userspace "device usbirboy" |
356 |
LIRC_DRIVER_DEVICE="/dev/usbirboy" |
357 |
fi |
358 |
|
359 |
if [[ "${MY_OPTS}" == "" ]]; then |
360 |
if [[ "${PROFILE_ARCH}" == "xbox" ]]; then |
361 |
# on xbox: use special driver |
362 |
add_device atiusb "device xboxusb" |
363 |
else |
364 |
# no driver requested |
365 |
elog |
366 |
elog "Compiling only the lirc-applications, but no drivers." |
367 |
elog "Enable drivers with LIRC_DEVICES if you need them." |
368 |
MY_OPTS="--with-driver=none" |
369 |
fi |
370 |
fi |
371 |
fi |
372 |
|
373 |
use hardware-carrier && MY_OPTS="${MY_OPTS} --without-soft-carrier" |
374 |
use transmitter && MY_OPTS="${MY_OPTS} --with-transmitter" |
375 |
|
376 |
einfo |
377 |
einfo "lirc-configure-opts: ${MY_OPTS}" |
378 |
elog "Setting default lirc-device to ${LIRC_DRIVER_DEVICE}" |
379 |
|
380 |
filter-flags -Wl,-O1 |
381 |
} |
382 |
|
383 |
src_prepare() { |
384 |
# Rip out dos CRLF |
385 |
edos2unix contrib/lirc.rules |
386 |
|
387 |
# Apply patches needed for some special device-types |
388 |
use lirc_devices_audio || epatch "${FILESDIR}"/lirc-0.8.4-portaudio_check.patch |
389 |
use lirc_devices_remote_wonder_plus && epatch "${FILESDIR}"/lirc-0.8.3_pre1-remotewonderplus.patch |
390 |
|
391 |
# Apply fixes for kernel-2.6.39 and above |
392 |
epatch "${FILESDIR}"/${P}-kernel-2.6.39-fixes.patch |
393 |
# Slightly massaged upstream patch to fix kfifo issues >=2.6.38 |
394 |
# for bug 377033 |
395 |
epatch "${FILESDIR}"/${P}-atiusb_kfifo.patch |
396 |
# Apply fixes for kernel-3.3 and above (bug 439538) |
397 |
epatch "${FILESDIR}"/${P}-kernel-3.3.0-fixes.patch |
398 |
# Apply fix for missing err() in usb.h for kernel 3.5+ (bug 444736) |
399 |
epatch "${FILESDIR}"/${P}-kernel-3.5-err-fix.patch |
400 |
# Apply fix for missing __devinit __devexit defines in kernel 3.8+ (bug 461532) |
401 |
epatch "${FILESDIR}"/${P}-kernel-3.8-fixes.patch |
402 |
# Add support for zotac remote, bug 342848 |
403 |
epatch "${FILESDIR}"/${P}-add-zotac-support.patch |
404 |
|
405 |
# Do not build drivers from the top-level Makefile |
406 |
sed -i -e 's:\(SUBDIRS =\) drivers\(.*\):\1\2:' Makefile.am |
407 |
|
408 |
# remove parallel driver on SMP systems |
409 |
if linux_chkconfig_present SMP ; then |
410 |
sed -i -e "s:lirc_parallel\.o::" drivers/lirc_parallel/Makefile.am |
411 |
fi |
412 |
|
413 |
# Bug #187418 - only need this part for lirc_devices_all as others die in pkg_setup |
414 |
if use lirc_devices_all && kernel_is ge 2 6 22 ; then |
415 |
ewarn "Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+" |
416 |
sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am |
417 |
fi |
418 |
|
419 |
# respect CFLAGS |
420 |
sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac |
421 |
|
422 |
# setting default device-node |
423 |
local f |
424 |
for f in configure.ac acconfig.h; do |
425 |
[[ -f "$f" ]] && sed -i -e '/#define LIRC_DRIVER_DEVICE/d' "$f" |
426 |
done |
427 |
echo "#define LIRC_DRIVER_DEVICE \"${LIRC_DRIVER_DEVICE}\"" >> acconfig.h |
428 |
|
429 |
sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die # automake 1.13 |
430 |
eautoreconf |
431 |
} |
432 |
|
433 |
src_configure() { |
434 |
econf \ |
435 |
--localstatedir=/var \ |
436 |
--with-syslog=LOG_DAEMON \ |
437 |
--enable-sandboxed \ |
438 |
--with-kerneldir="${KV_DIR}" \ |
439 |
--with-moduledir="/lib/modules/${KV_FULL}/misc" \ |
440 |
$(use_enable debug) \ |
441 |
$(use_enable static-libs static) \ |
442 |
$(use_with X x) \ |
443 |
${MY_OPTS} \ |
444 |
ABI="${KERNEL_ABI}" \ |
445 |
ARCH="$(tc-arch-kernel)" |
446 |
} |
447 |
|
448 |
src_compile() { |
449 |
# force non-parallel make, Bug 196134 (confirmed valid for 0.9.0-r2) |
450 |
emake -j1 |
451 |
|
452 |
MODULE_NAMES="lirc(misc:${S}/drivers)" |
453 |
BUILD_TARGETS="all" |
454 |
linux-mod_src_compile |
455 |
} |
456 |
|
457 |
src_install() { |
458 |
emake DESTDIR="${D}" install |
459 |
emake -C drivers DESTDIR="${D}" install |
460 |
|
461 |
newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd |
462 |
newinitd "${FILESDIR}"/lircmd lircmd |
463 |
newconfd "${FILESDIR}"/lircd.conf.4 lircd |
464 |
|
465 |
insinto /etc/modprobe.d/ |
466 |
newins "${FILESDIR}"/modprobed.lirc lirc.conf |
467 |
|
468 |
newinitd "${FILESDIR}"/irexec-initd-0.8.6-r2 irexec |
469 |
newconfd "${FILESDIR}"/irexec-confd irexec |
470 |
|
471 |
if use doc ; then |
472 |
dohtml doc/html/*.html |
473 |
insinto /usr/share/doc/${PF}/images |
474 |
doins doc/images/* |
475 |
fi |
476 |
|
477 |
insinto /usr/share/lirc/remotes |
478 |
doins -r remotes/* |
479 |
|
480 |
keepdir /etc/lirc |
481 |
if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then |
482 |
newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example |
483 |
fi |
484 |
|
485 |
use static-libs || rm "${D}/usr/$(get_libdir)/liblirc_client.la" |
486 |
} |
487 |
|
488 |
pkg_preinst() { |
489 |
linux-mod_pkg_preinst |
490 |
|
491 |
local dir="${EROOT}/etc/modprobe.d" |
492 |
if [[ -a "${dir}"/lirc && ! -a "${dir}"/lirc.conf ]]; then |
493 |
elog "Renaming ${dir}/lirc to lirc.conf" |
494 |
mv -f "${dir}/lirc" "${dir}/lirc.conf" |
495 |
fi |
496 |
|
497 |
# copy the first file that can be found |
498 |
if [[ -f "${EROOT}"/etc/lirc/lircd.conf ]]; then |
499 |
cp "${EROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf |
500 |
elif [[ -f "${EROOT}"/etc/lircd.conf ]]; then |
501 |
cp "${EROOT}"/etc/lircd.conf "${T}"/lircd.conf |
502 |
MOVE_OLD_LIRCD_CONF=1 |
503 |
elif [[ -f "${D}"/etc/lirc/lircd.conf ]]; then |
504 |
cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf |
505 |
fi |
506 |
|
507 |
# stop portage from touching the config file |
508 |
if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then |
509 |
rm -f "${D}"/etc/lirc/lircd.conf |
510 |
fi |
511 |
} |
512 |
|
513 |
pkg_postinst() { |
514 |
linux-mod_pkg_postinst |
515 |
|
516 |
# copy config file to new location |
517 |
# without portage knowing about it |
518 |
# so it will not delete it on unmerge or ever touch it again |
519 |
if [[ -e "${T}"/lircd.conf ]]; then |
520 |
cp "${T}"/lircd.conf "${EROOT}"/etc/lirc/lircd.conf |
521 |
if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then |
522 |
elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf" |
523 |
rm -f "${EROOT}"/etc/lircd.conf |
524 |
fi |
525 |
fi |
526 |
|
527 |
einfo "The new default location for lircd.conf is inside of" |
528 |
einfo "/etc/lirc/ directory" |
529 |
} |