Gentoo Archives: gentoo-commits

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