1 |
beandog 08/05/10 00:37:12 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: lirc-0.8.3-r1.ebuild |
5 |
Log: |
6 |
Check for MODULE_UNLOAD in kernel |
7 |
(Portage version: 2.1.5_rc6) |
8 |
|
9 |
Revision Changes Path |
10 |
1.178 app-misc/lirc/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.178&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.178&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/ChangeLog?r1=1.177&r2=1.178 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v |
19 |
retrieving revision 1.177 |
20 |
retrieving revision 1.178 |
21 |
diff -u -r1.177 -r1.178 |
22 |
--- ChangeLog 5 May 2008 10:02:31 -0000 1.177 |
23 |
+++ ChangeLog 10 May 2008 00:37:12 -0000 1.178 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for app-misc/lirc |
26 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.177 2008/05/05 10:02:31 zzam Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.178 2008/05/10 00:37:12 beandog Exp $ |
29 |
+ |
30 |
+*lirc-0.8.3-r1 (10 May 2008) |
31 |
+ |
32 |
+ 10 May 2008; Steve Dibb <beandog@g.o> +lirc-0.8.3-r1.ebuild: |
33 |
+ Check for MODULE_UNLOAD in kernel |
34 |
|
35 |
05 May 2008; Matthias Schwarzott <zzam@g.o> lirc-0.8.3.ebuild: |
36 |
Adding hack to stop portage from deleting lircd.conf. |
37 |
|
38 |
|
39 |
|
40 |
1.1 app-misc/lirc/lirc-0.8.3-r1.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/lirc-0.8.3-r1.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/lirc-0.8.3-r1.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: lirc-0.8.3-r1.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2008 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.3-r1.ebuild,v 1.1 2008/05/10 00:37:12 beandog Exp $ |
50 |
|
51 |
inherit eutils linux-mod flag-o-matic autotools |
52 |
|
53 |
DESCRIPTION="decode and send infra-red signals of many commonly used remote controls" |
54 |
HOMEPAGE="http://www.lirc.org/" |
55 |
|
56 |
MY_P=${PN}-${PV/_/} |
57 |
|
58 |
if [[ "${PV/_pre/}" = "${PV}" ]]; then |
59 |
SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2" |
60 |
else |
61 |
SRC_URI="http://lirc.sourceforge.net/software/snapshots/${MY_P}.tar.bz2" |
62 |
fi |
63 |
|
64 |
LICENSE="GPL-2" |
65 |
SLOT="0" |
66 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
67 |
IUSE="debug doc X hardware-carrier transmitter" |
68 |
|
69 |
S="${WORKDIR}/${MY_P}" |
70 |
|
71 |
RDEPEND=" |
72 |
X? ( |
73 |
x11-libs/libX11 |
74 |
x11-libs/libSM |
75 |
x11-libs/libICE |
76 |
) |
77 |
lirc_devices_alsa_usb? ( media-libs/alsa-lib ) |
78 |
lirc_devices_audio? ( media-libs/portaudio ) |
79 |
lirc_devices_irman? ( media-libs/libirman )" |
80 |
|
81 |
# This are drivers with names matching the |
82 |
# parameter --with-driver=NAME |
83 |
IUSE_LIRC_DEVICES_DIRECT=" |
84 |
all userspace accent act200l act220l |
85 |
adaptec alsa_usb animax asusdh atilibusb |
86 |
atiusb audio audio_alsa avermedia avermedia_vdomate |
87 |
avermedia98 bestbuy bestbuy2 breakoutbox |
88 |
bte bw6130 caraca chronos cmdir |
89 |
cph06x creative creative_infracd |
90 |
devinput digimatrix dsp dvico ea65 |
91 |
exaudio flyvideo gvbctv5pci hauppauge |
92 |
hauppauge_dvb hercules_smarttv_stereo |
93 |
igorplugusb imon imon_knob imon_pad imon_rsc |
94 |
irdeo irdeo_remote irman irreal it87 |
95 |
knc_one kworld leadtek_0007 leadtek_0010 |
96 |
leadtek_pvr2000 livedrive_midi |
97 |
livedrive_seq logitech macmini mceusb |
98 |
mceusb2 mediafocusI mouseremote |
99 |
mouseremote_ps2 mp3anywhere nslu2 |
100 |
packard_bell parallel pcmak pcmak_usb |
101 |
pctv pixelview_bt878 pixelview_pak |
102 |
pixelview_pro provideo realmagic |
103 |
remotemaster sa1100 sasem sb0540 serial |
104 |
silitek sir slinke streamzap tekram |
105 |
tekram_bt829 tira ttusbir tuxbox tvbox udp uirt2 |
106 |
uirt2_raw usb_uirt_raw usbx" |
107 |
|
108 |
# drivers that need special handling and |
109 |
# must have another name specified for |
110 |
# parameter --with-driver=NAME |
111 |
IUSE_LIRC_DEVICES_SPECIAL=" |
112 |
imon_pad2keys serial_igor_cesko |
113 |
remote_wonder_plus xboxusb usbirboy inputlirc" |
114 |
|
115 |
IUSE_LIRC_DEVICES="${IUSE_LIRC_DEVICES_DIRECT} ${IUSE_LIRC_DEVICES_SPECIAL}" |
116 |
|
117 |
#device-driver which use libusb |
118 |
LIBUSB_USED_BY_DEV=" |
119 |
all atilibusb sasem igorplugusb imon imon_pad imon_pad2keys |
120 |
imon_rsc streamzap mceusb mceusb2 xboxusb" |
121 |
|
122 |
for dev in ${LIBUSB_USED_BY_DEV}; do |
123 |
RDEPEND="${RDEPEND} lirc_devices_${dev}? ( dev-libs/libusb )" |
124 |
done |
125 |
|
126 |
# adding only compile-time depends |
127 |
DEPEND="${RDEPEND} |
128 |
virtual/linux-sources" |
129 |
|
130 |
# adding only run-time depends |
131 |
RDEPEND="${RDEPEND} |
132 |
lirc_devices_usbirboy? ( app-misc/usbirboy ) |
133 |
lirc_devices_inputlirc? ( app-misc/inputlircd )" |
134 |
|
135 |
# add all devices to IUSE |
136 |
for dev in ${IUSE_LIRC_DEVICES}; do |
137 |
IUSE="${IUSE} lirc_devices_${dev}" |
138 |
done |
139 |
|
140 |
add_device() { |
141 |
: ${lirc_device_count:=0} |
142 |
((lirc_device_count++)) |
143 |
|
144 |
if [[ ${lirc_device_count} -eq 2 ]]; then |
145 |
ewarn |
146 |
ewarn "When selecting multiple devices for lirc to be supported," |
147 |
ewarn "it can not be garanteed that the drivers play nice together." |
148 |
ewarn |
149 |
ewarn "If this is not intended, then abort emerge now with Ctrl-C," |
150 |
ewarn "Set LIRC_DEVICES and restart emerge." |
151 |
ewarn |
152 |
epause |
153 |
fi |
154 |
|
155 |
local dev="${1}" |
156 |
local desc="device ${dev}" |
157 |
if [[ -n "${2}" ]]; then |
158 |
desc="${2}" |
159 |
fi |
160 |
|
161 |
elog "Compiling support for ${desc}" |
162 |
MY_OPTS="${MY_OPTS} --with-driver=${dev}" |
163 |
} |
164 |
|
165 |
pkg_setup() { |
166 |
|
167 |
CONFIG_CHECK="MODULES MODULE_UNLOAD" |
168 |
|
169 |
linux-mod_pkg_setup |
170 |
|
171 |
# set default configure options |
172 |
MY_OPTS="" |
173 |
LIRC_DRIVER_DEVICE="/dev/lirc0" |
174 |
|
175 |
if use lirc_devices_all; then |
176 |
# compile in drivers for a lot of devices |
177 |
add_device all "a lot of devices" |
178 |
else |
179 |
# compile in only requested drivers |
180 |
local dev |
181 |
for dev in ${IUSE_LIRC_DEVICES_DIRECT}; do |
182 |
if use lirc_devices_${dev}; then |
183 |
add_device ${dev} |
184 |
fi |
185 |
done |
186 |
|
187 |
if use lirc_devices_remote_wonder_plus; then |
188 |
add_device atiusb "device Remote Wonder Plus (atiusb-based)" |
189 |
fi |
190 |
|
191 |
if use lirc_devices_serial_igor_cesko; then |
192 |
add_device serial "serial with Igor Cesko design" |
193 |
MY_OPTS="${MY_OPTS} --with-igor" |
194 |
fi |
195 |
|
196 |
if use lirc_devices_imon_pad2keys; then |
197 |
add_device imon_pad "device imon_pad (with converting pad input to keyspresses)" |
198 |
ewarn "You need to set the option pad2keys_active=1" |
199 |
ewarn "when loading the module lirc_imon" |
200 |
fi |
201 |
|
202 |
if use lirc_devices_xboxusb; then |
203 |
add_device atiusb "device xboxusb" |
204 |
fi |
205 |
|
206 |
if use lirc_devices_usbirboy; then |
207 |
add_device userspace "device usbirboy" |
208 |
LIRC_DRIVER_DEVICE="/dev/usbirboy" |
209 |
fi |
210 |
|
211 |
if [[ "${MY_OPTS}" == "" ]]; then |
212 |
if [[ "${PROFILE_ARCH}" == "xbox" ]]; then |
213 |
# on xbox: use special driver |
214 |
add_device atiusb "device xboxusb" |
215 |
else |
216 |
# no driver requested |
217 |
elog |
218 |
elog "Compiling only the lirc-applications, but no drivers." |
219 |
elog "Enable drivers with LIRC_DEVICES if you need them." |
220 |
MY_OPTS="--with-driver=userspace" |
221 |
fi |
222 |
fi |
223 |
fi |
224 |
|
225 |
use hardware-carrier && MY_OPTS="${MY_OPTS} --without-soft-carrier" |
226 |
use transmitter && MY_OPTS="${MY_OPTS} --with-transmitter" |
227 |
|
228 |
if [[ -n "${LIRC_OPTS}" ]] ; then |
229 |
ewarn |
230 |
ewarn "LIRC_OPTS is deprecated from lirc-0.8.0-r1 on." |
231 |
ewarn |
232 |
ewarn "Please use LIRC_DEVICES from now on." |
233 |
ewarn "e.g. LIRC_DEVICES=\"serial sir\"" |
234 |
ewarn |
235 |
ewarn "Flags are now set per use-flags." |
236 |
ewarn "e.g. transmitter, hardware-carrier" |
237 |
|
238 |
local opt |
239 |
local unsupported_opts="" |
240 |
|
241 |
# test for allowed options for LIRC_OPTS |
242 |
for opt in ${LIRC_OPTS}; do |
243 |
case ${opt} in |
244 |
--with-port=*|--with-irq=*|--with-timer=*|--with-tty=*) |
245 |
MY_OPTS="${MY_OPTS} ${opt}" |
246 |
;; |
247 |
*) |
248 |
unsupported_opts="${unsupported_opts} ${opt}" |
249 |
;; |
250 |
esac |
251 |
done |
252 |
if [[ -n ${unsupported_opts} ]]; then |
253 |
ewarn "These options are no longer allowed to be set" |
254 |
ewarn "with LIRC_OPTS: ${unsupported_opts}" |
255 |
die "LIRC_OPTS is no longer recommended." |
256 |
fi |
257 |
fi |
258 |
|
259 |
# Setup parameter for linux-mod.eclass |
260 |
MODULE_NAMES="lirc(misc:${S})" |
261 |
BUILD_TARGETS="all" |
262 |
|
263 |
ECONF_PARAMS=" --localstatedir=/var |
264 |
--with-syslog=LOG_DAEMON |
265 |
--enable-sandboxed |
266 |
--with-kerneldir=${KV_DIR} |
267 |
--with-moduledir=/lib/modules/${KV_FULL}/misc |
268 |
$(use_enable debug) |
269 |
$(use_with X x) |
270 |
${MY_OPTS}" |
271 |
|
272 |
einfo |
273 |
einfo "lirc-configure-opts: ${MY_OPTS}" |
274 |
elog "Setting default lirc-device to ${LIRC_DRIVER_DEVICE}" |
275 |
|
276 |
filter-flags -Wl,-O1 |
277 |
|
278 |
# force non-parallel make, Bug 196134 |
279 |
MAKEOPTS="${MAKEOPTS} -j1" |
280 |
} |
281 |
|
282 |
src_unpack() { |
283 |
unpack ${A} |
284 |
cd "${S}" |
285 |
|
286 |
# Rip out dos CRLF |
287 |
edos2unix contrib/lirc.rules |
288 |
|
289 |
# Apply patches needed for some special device-types |
290 |
epatch "${FILESDIR}"/${P}-imon-pad2keys.patch |
291 |
use lirc_devices_remote_wonder_plus && epatch "${FILESDIR}"/lirc-0.8.3_pre1-remotewonderplus.patch |
292 |
|
293 |
# remove parallel driver on SMP systems |
294 |
if linux_chkconfig_present SMP ; then |
295 |
sed -i -e "s:lirc_parallel\.o::" drivers/lirc_parallel/Makefile.am |
296 |
fi |
297 |
|
298 |
# Bug #187418 |
299 |
if kernel_is ge 2 6 22 ; then |
300 |
ewarn "Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+" |
301 |
sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am |
302 |
fi |
303 |
|
304 |
# respect CFLAGS |
305 |
sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac |
306 |
|
307 |
# setting default device-node |
308 |
sed -i -e '/#define LIRC_DRIVER_DEVICE/d' configure.ac acconfig.h |
309 |
echo "#define LIRC_DRIVER_DEVICE \"${LIRC_DRIVER_DEVICE}\"" >> acconfig.h |
310 |
|
311 |
eautoreconf |
312 |
} |
313 |
|
314 |
src_install() { |
315 |
emake DESTDIR="${D}" install || die "emake install failed" |
316 |
|
317 |
newinitd "${FILESDIR}"/lircd-0.8.3 lircd |
318 |
newinitd "${FILESDIR}"/lircmd lircmd |
319 |
newconfd "${FILESDIR}"/lircd.conf.2 lircd |
320 |
|
321 |
insinto /etc/modprobe.d/ |
322 |
newins "${FILESDIR}"/modulesd.lirc lirc |
323 |
|
324 |
newinitd "${FILESDIR}"/irexec-initd irexec |
325 |
newconfd "${FILESDIR}"/irexec-confd irexec |
326 |
|
327 |
if use doc ; then |
328 |
dohtml doc/html/*.html |
329 |
insinto /usr/share/doc/${PF}/images |
330 |
doins doc/images/* |
331 |
fi |
332 |
|
333 |
insinto /usr/share/lirc/remotes |
334 |
doins -r remotes/* |
335 |
} |
336 |
|
337 |
pkg_preinst() { |
338 |
linux-mod_pkg_preinst |
339 |
|
340 |
# stop portage from deleting this file |
341 |
if [[ -f ${ROOT}/etc/lircd.conf && ! -f ${D}/etc/lircd.conf ]]; then |
342 |
cp "${ROOT}"/etc/lircd.conf "${D}"/etc/lircd.conf |
343 |
fi |
344 |
} |
345 |
|
346 |
pkg_postinst() { |
347 |
linux-mod_pkg_postinst |
348 |
echo |
349 |
elog "The lirc Linux Infrared Remote Control Package has been" |
350 |
elog "merged, please read the documentation at http://www.lirc.org" |
351 |
echo |
352 |
|
353 |
if kernel_is ge 2 6 22 ; then |
354 |
# Bug #187418 |
355 |
ewarn |
356 |
ewarn "The lirc_gpio driver will not work with Kernels 2.6.22+" |
357 |
ewarn "You need to switch over to /dev/input/event? if you need gpio" |
358 |
ewarn "This device can than then be used via lirc's dev/input driver." |
359 |
ewarn |
360 |
fi |
361 |
|
362 |
elog |
363 |
elog "lirc now uses normal config-protection for lircd.conf." |
364 |
elog "If you need any other lircd.conf you may have a look at" |
365 |
elog "the directory /usr/share/lirc/remotes" |
366 |
} |
367 |
|
368 |
|
369 |
|
370 |
-- |
371 |
gentoo-commits@l.g.o mailing list |