summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2012-07-17 19:18:25 +0000
committerIan Stakenvicius <axs@gentoo.org>2012-07-17 19:18:25 +0000
commit96cd6c93d68dd364200aafbea0c818e8c67cabe3 (patch)
treee3c20c0273b9e89c3ad20bf2d93da3694d36b374 /app-misc/lirc
parentadding myself as maintainer (diff)
downloadhistorical-96cd6c93d68dd364200aafbea0c818e8c67cabe3.tar.gz
historical-96cd6c93d68dd364200aafbea0c818e8c67cabe3.tar.bz2
historical-96cd6c93d68dd364200aafbea0c818e8c67cabe3.zip
converted ebuild to EAPI4, made drivers build separately from tools to fix bug 160134, fixed init script so that socket path exists (bug 414307), added option so that init script can set 'lirc' as the kernel IR decoding protocol on startup (bug 368489)
Package-Manager: portage-2.1.10.65/cvs/Linux x86_64
Diffstat (limited to 'app-misc/lirc')
-rw-r--r--app-misc/lirc/ChangeLog11
-rw-r--r--app-misc/lirc/Manifest15
-rw-r--r--app-misc/lirc/files/lircd-0.8.6-r152
-rw-r--r--app-misc/lirc/files/lircd.conf.315
-rw-r--r--app-misc/lirc/lirc-0.9.0-r1.ebuild413
5 files changed, 504 insertions, 2 deletions
diff --git a/app-misc/lirc/ChangeLog b/app-misc/lirc/ChangeLog
index 2d10ad0a87a2..1324d66c69ed 100644
--- a/app-misc/lirc/ChangeLog
+++ b/app-misc/lirc/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-misc/lirc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.225 2012/01/09 07:19:17 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.226 2012/07/17 19:18:25 axs Exp $
+
+*lirc-0.9.0-r1 (17 Jul 2012)
+
+ 17 Jul 2012; Ian Stakenvicius <axs@gentoo.org> +files/lircd-0.8.6-r1,
+ +lirc-0.9.0-r1.ebuild, +files/lircd.conf.3:
+ converted ebuild to EAPI4, made drivers build separately from tools to fix
+ bug 160134, fixed init script so that socket path exists (bug 414307), added
+ option so that init script can set 'lirc' as the kernel IR decoding protocol
+ on startup (bug 368489)
09 Jan 2012; Samuli Suominen <ssuominen@gentoo.org> lirc-0.8.5.ebuild,
lirc-0.8.7_pre1.ebuild, lirc-0.8.7.ebuild, lirc-0.9.0.ebuild:
diff --git a/app-misc/lirc/Manifest b/app-misc/lirc/Manifest
index 822baecb228c..f5c02aa8cd58 100644
--- a/app-misc/lirc/Manifest
+++ b/app-misc/lirc/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX irexec-confd 280 SHA256 c404ad3b624004cab25bd3a89593cdeb0abbc25771d6e52caf2f37cb4f7b2b79 SHA512 2b33e1044086d11fd6e1f9a204ce925182a3a2b92ef4399610e01702f9c2c8fbc87cae52961123297171eef3d40468ac17437b4281b26a5f3b256c9cebc612ac WHIRLPOOL ff0e09a0babe7f434252416f3c7d0fb27b95215c62e582c1cd4670130c48c74dcf1e565e4aa7c5705fe39f67922b0abdc28a1938a9288ef3476979bd99609377
AUX irexec-initd 808 SHA256 9325419aa45d80c205bc1cd47fe839b178da74bca5dd928cbe3ae17423b92493 SHA512 6d9535cfc6469d62f2b09bc5d12ff7c792c279dab6d58d3847625ac995f20945309765c3b9781bd51dbd9d2986465f0b96818c3f4162a689807bf5e3936a4067 WHIRLPOOL be2ef1c89803a6a7c3f533c075a6a60be550d84c9b1812673d79df400305518df2b5329c6726c4aece88cf113dd2db051d1c6d6e5ea7e37e16eb463c38694690
AUX irexec-initd-0.8.6-r2 816 SHA256 5e5a31fbd93294a6e210499a880fcab371b23706824c9d60d827b0187d7bade4 SHA512 b90226e8dc29ed1769275a010e0b1f5376b91d4f3cfd7bb9dd135bdee31c0f7849f31a885baafe4cbbf9f11b548712e1d78198b44252c779ffeccc5e47730054 WHIRLPOOL 00936357f3df1f63821d7da4f4452ba25a5368d4d128c088e421be2fff2e50d1a190522a9aac6712da2867e827492e674806e5871f797eacf12d333091991f96
@@ -6,7 +9,9 @@ AUX lirc-0.8.4-portaudio_check.patch 769 SHA256 01e2034aaa6a7eb039e5c0e6c3b4a6ed
AUX lirc-0.8.6-send-evsyn.diff 563 SHA256 26c442281253732b0fda80168893f2bef90c4684edeb902bf52faca680bde0c7 SHA512 737afde76134b18ed2c0ccbd7bf9bce3ce87efc9551d84f2a32bb60f056c08fe42301bf6822afe7af24f95da4bd1a0cf06f5f686b1368671f72108733ca24a0c WHIRLPOOL b7580846d0c6520f24ccd30b90db964ba6c67e5417debd11f54b9491f08e684f69a52a127947a808bdb2e75bdf38e5a1cecd4cae2e2cd3e3acf0c41bf376640f
AUX lircd-0.8.3 581 SHA256 9ba3c5a8c0ca5966729dc5e2c7a5960bbf12b443d91e9e319a0277f153df1b1f SHA512 d0f652df31fa1583232e3b29b5fc95d21fc76564df9f5e54881ee849c7a6fa0d697f15335c2e3f1b8ab0b29b7cddef605bd15073f394c29df9e5704854b0017a WHIRLPOOL 69c23cc6584ec435ce50689df223b27244a8deda351dbf048646f05021eba6893c22be24e167930cbb786f15e79cbfa97cf335de8b311ff9543c0e50a853a503
AUX lircd-0.8.6 973 SHA256 473cf04b2f6addf7c86d23103b1eff68bf3758fda2bf25401ff0631c568c7805 SHA512 9992b629073d9d9c05388b6063d1a7eff6a47514ccc1af2739638c8375b284cd6252c1a825d172d160acee9983f7bd59fdde6dd282c62597e8d6d7a149f06f69 WHIRLPOOL ccb99a3df8e52f3b6abeddebd727aa734c547fafb3db19b4fd266fc7f69d0b0674f937a21bb11d8d338d59c019d870797715993eb781de1f15f4bef1cfe9927d
+AUX lircd-0.8.6-r1 1305 SHA256 7ddfef39128a8f685046f189cad827430a69b41650e6c451b0b25a9bc87d5654 SHA512 b462413b2d3960f89e7838e37e81284201d2e0e8e3a9c49d4264702004a2bc1580e1230755d7b6406043ef08cbbe2b0414fc1e5d20281ce48365d62f31346313 WHIRLPOOL 50e8abc72f86c5d6d84c8db47c5fb1504ba13f0119e4d714339b3574ca0dfc47d13df81083fcccd9a93c0295c0cce505f00c397d12c7f244aabc9c6efead6568
AUX lircd.conf.2 317 SHA256 694d96ffc0c5b8d258592d89c0221aa9b10d69ce024a69a0cc935d899e0b855e SHA512 59779104301e96b377999aad9980f2a915ee9d817e0ba33c172602ea868b49450cd198fe26cf6da4dd8690684768f4d5cd6132a66fec5fea486fbd7a5a8c3a7b WHIRLPOOL 353f5e9e17a831bc124124316f043063ee9c4a13f29f44cf66d236cfcd7d30e756392f18ad761343c723e0e4079541638d1ea7b921074e75a8449f0a5388d179
+AUX lircd.conf.3 502 SHA256 efb63b6e6af77dddd6a8ad757fad78642a43c6e399f40cef0fcc23609f5d2a0e SHA512 e21c76f0ccc689e06da4c60a38302a8cc12aac8da002be9df8f057c30f383a615a1ea1062745ec6121a5e9c9090f64563f585cc1c9e0e7dcaae5ac48fa466c4b WHIRLPOOL 191d3024b1e9dfd22215dfc6ba7fef74638202fdc2240140d3687d43011ab3fec35ef667fd4e1bc33896a4def67ce26e28fd893c4dd011ccc8bf0ccec07c1075
AUX lircmd 466 SHA256 d47f22a33a83c14a4a0c333d6a445c40e550c491899fb0c6d323e23fe1eac7b7 SHA512 d3cf896f1a2229a51670d5c658c04d5c0aa078a3f8ea15211d655f8883366f9d4102e93941a75957ab3095faa5f598fb1242bfd03f534bb8af134f542d077c6e WHIRLPOOL 39880900b60f44277f41db990841620deefae03f2698122949038187a36631a14e90dba07323e5bf9b6e14cf05f28fe5a3b944ee802e56286ccbf58194ab3d35
AUX modprobed.lirc 549 SHA256 b4951252321ea326d3ec401e5ff1112716c5aaf5b2ca94d9f5e187e22ad35c44 SHA512 a64cac97e21ab53c247d8dd3e518b3caee5eeb9c3558727eba8a04684894c6be1695ce681e71d559474f4e78bbb39130d97f843eae18e56b3d3eb70f1fbefc63 WHIRLPOOL a45ec8b3cd725f9b4c6b991cf6d4fec7869a07911a2ac82535dca665a0dd99a66b40d85faf0beea780001e9260a8a17c1ccec880c05a271a138c1e0501f7727c
AUX modulesd.lirc 482 SHA256 3906b61951e1245cb3c9b16e81255a735f7bcdbbfcbedcdf44cd53236e2a3f28 SHA512 07ae7c7288878f65857962bb3a343b83d58eca6447299253dd297dec6443b95d89f46ebcbe1f1ac66ec5062f8134a2e19ecc3ce397b2f8d0d27f203a2a103fcc WHIRLPOOL 2bc4c45d3fd314cc88d50f79974b2aafa4e55a7df7383cbd2f3ddf5b66e144b5700f8d411f79ea458caec0da3e47d5e0db2c34e1efcc2d748c473fe2c5ae7389
@@ -17,6 +22,14 @@ DIST lirc-0.9.0.tar.bz2 857286 SHA256 6323afae6ad498d4369675f77ec3dbb680fe661bea
EBUILD lirc-0.8.5.ebuild 9419 SHA256 bd6ac677e6e820e414a5febb48fd7a15d93b461aef91f1badb6152c1b7916097 SHA512 a258461e028b8edac05de5acbf8c01b6aa727776232e321b79dabf1cb35911e2977c2e86199ff73f347cde703062118b1f4019e8e51134f1c66f921f3b1374ee WHIRLPOOL 1bf220960c9a48995f618571a9514040369589876e1d1cc3787da9f2f90443b5fa8adc9e87856bc2e611f43eea6b5f44094f2180f7683e98b918a2bed6a4ea64
EBUILD lirc-0.8.7.ebuild 10100 SHA256 4a68073a5039a14358a63b65ef2b8981a178b9369d9bc9548420f8d97153bc8f SHA512 15508d9bdd99e94c5bf5520ceb8a57ca6bdc05ed8cdc3b79307acbb00a03553a21c625a502d242a05da6c9137abe9dd809ac27c905129351ca752c466d2b0bb3 WHIRLPOOL 404b9f37112328044bd4a578052cbf0352fb13e44e4c855260670f978a0d916fa03aa6f4c3a72f18a7569cc767e4ec470b88e030b18e934afe10a894230d8969
EBUILD lirc-0.8.7_pre1.ebuild 10108 SHA256 a7f35ebeece34ba3199ab308e209299c8adfbf07e3cd325bb82b4def8d6f97c4 SHA512 c8a857549606e547bce798b61e5efe3f24c4b9447b6e8cd107dfba81c78254f99fd19af6e15a0280c959930d3355cc07e781fe379fbef45aa6ef5b5b08122c41 WHIRLPOOL 56155cd2042135599f6085f064b7000c559eca0057a8a5d2dbc517a9ea74d1bba6a6e533cd3887676d883f45c763a67da602b87b18065733d58044aa30ebef32
+EBUILD lirc-0.9.0-r1.ebuild 12407 SHA256 aca01e29646ff55b94de534ca0d5cde0dbdb30f7f03a2091736baf223c2c5b59 SHA512 1aba48d73e6f9165e32beb9efe1340d2e1a5543533f9af961710b974211bb17fbaacf03e7992c23732247475a80dba28ee643af28b12e5d85bf032b501480a9f WHIRLPOOL b31024cee7462c5c37de572f5faa4cb1be2a0a051cdd32512e2ff62d9fa73bd0ea84f448d9b95561c173a581badf5613098b41654cfad4eb1621accf800add38
EBUILD lirc-0.9.0.ebuild 10161 SHA256 570944822013fd494d91a915e763d74c27870d2488d09b2ace54f4cd4603e0d4 SHA512 ef91477c7840ee3848f6a3da063ba73f62f0017b17a290ca33354e8c7960ca167c5a45edf6a5b3c5d993b09bc14da7884dbe79279d653bcca7a0f923d1f54e7f WHIRLPOOL c03ea9947a658e24ef263de4c40c4b19f014326636d3ffae83eefc04361926d992250587f90f440015b2fb244a79437c8f19967a8fa6f70adf3d364eceafda4d
-MISC ChangeLog 37073 SHA256 becefd08ce4ac9b6d81ca4995c6674879ab69e080f97940e4e15ea4b041305d2 SHA512 68d43d380cdab30f143c89e5141ec96620dba1497c7a1841cd864aaff57116dabcbaef73246e003a19fd16f4c7223384efe75ebecb0cdda384aea53f7f56013d WHIRLPOOL bde2dfc1b029841eaf9e9b021699de8b470c96b3f61f879416f7353b1b7812c7c9e5ac0a523654a5ee5d7ec458be95fb3c3c4a987e6f7bbc5d0b8355c4357f49
+MISC ChangeLog 37477 SHA256 2350e0d30ff0a8e4b3e26e4c0d717a17d6697f80f066adb848e390cd24c7596f SHA512 0e98e8c82cac1e6c3243eb76b3baa68c7f98c947dc97e9573e4d9ed9c6da9ff45c0e7ef177cc453c093bcaff3d27bda37d837b91db6c354b88904fb450b938ab WHIRLPOOL 70c0a60dda86f2b649065fe6754852acb9831d8b6587eb765329a19e90257907cd2c6f8d170ee91d6a07686dcd9cd08dfaa6ad9b55cb2d02c0cc0ef66aadd710
MISC metadata.xml 376 SHA256 e3b4637a67a93eb4b9457fa5941e8a6a891adca11a1ebc80c21a59650eac93aa SHA512 17eca2da394c7ca359766b80a0bd743f57235e49f422a7c2b1108e7d2dcdd7ea38ba36d8b3e3bc58b3d3818d75af99c0220eefff9d73aea97b561278cc243ce7 WHIRLPOOL 39c1156d377164114fb8730153a9e5e9dd4753ed98aec00fdff779de354336c3f791dd4fde3a0eff2dff3a8e62279f6e1ab473cf5e6cf00902f3febce0e2ac4f
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iF4EAREIAAYFAlAFuosACgkQ2ugaI38ACPC8zQD+LbAZpD4OBem5tXhS1yNtZeaD
+wEN4zUnm0bKJ72XpyKwBAK9z3FyOhd1/+yI7/d5arACZWjwKMOdHMtZQjg/YlnYP
+=/0K5
+-----END PGP SIGNATURE-----
diff --git a/app-misc/lirc/files/lircd-0.8.6-r1 b/app-misc/lirc/files/lircd-0.8.6-r1
new file mode 100644
index 000000000000..aba22626b12f
--- /dev/null
+++ b/app-misc/lirc/files/lircd-0.8.6-r1
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/lircd-0.8.6-r1,v 1.1 2012/07/17 19:18:25 axs Exp $
+
+PIDFILE=/var/run/lirc/${SVCNAME}.pid
+LIRCD_SYMLINKFILE=/dev/lircd
+LIRCD_SOCKET=/var/run/lirc/lircd
+
+depend() {
+ need localmount
+ use modules
+ provide lirc
+}
+
+start() {
+ local retval
+
+ ebegin "Starting lircd"
+
+ for retval in ${LIRCD_SET_SYSCLASSRCS} ; do
+ if [ -e /sys/class/rc/${retval}/protocols ] && \
+ grep 'lirc' /sys/class/rc/${retval}/protocols &>/dev/null ; then
+ einfo "Setting lirc protocol active for ${retval}"
+ echo lirc >/sys/class/rc/${retval}/protocols
+ fi
+ done
+
+ checkpath -q -d -m 0755 -o root:root /var/run/lirc
+ rm -Rf ${LIRCD_SOCKET} && ln -s ${LIRCD_SOCKET} ${LIRCD_SYMLINKFILE}
+ if [ $? -ne 0 ]; then
+ eend $? "Unable to create symbolic link ${LIRCD_SYMLINKFILE}"
+ return 1
+ fi
+
+ start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd -- \
+ -P "${PIDFILE}" ${LIRCD_OPTS}
+ retval=$?
+
+ if [ ${retval} -ne 0 ]; then
+ rm -Rf ${LIRCD_SOCKET}
+ fi
+
+ eend ${retval}
+}
+
+stop() {
+ ebegin "Stopping lircd"
+ rm -f ${LIRCD_SYMLINKFILE}
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd
+ eend $?
+}
diff --git a/app-misc/lirc/files/lircd.conf.3 b/app-misc/lirc/files/lircd.conf.3
new file mode 100644
index 000000000000..f800c0aa191e
--- /dev/null
+++ b/app-misc/lirc/files/lircd.conf.3
@@ -0,0 +1,15 @@
+# Options to pass to the lircd process
+
+# for devices with lirc-kernel-module
+#LIRCD_OPTS="-d /dev/lirc0"
+#LIRCD_OPTS="-d /dev/lirc"
+
+# for devices using the input-layer
+#LIRCD_OPTS="-H devinput -d /dev/input/by-path/pci-0000:00:0a.0--event-ir"
+# This should work, Bug #235107
+#LIRCD_OPTS="-H devinput -d name=*DVB*"
+
+# set default protocol to 'lirc' for in-kernel IR decoding
+# for the following entries in /sys/class/rc/
+# (space-separated list if there is more than one)
+LIRCD_SET_SYSCLASSRCS="rc0"
diff --git a/app-misc/lirc/lirc-0.9.0-r1.ebuild b/app-misc/lirc/lirc-0.9.0-r1.ebuild
new file mode 100644
index 000000000000..9e0ab247335d
--- /dev/null
+++ b/app-misc/lirc/lirc-0.9.0-r1.ebuild
@@ -0,0 +1,413 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r1.ebuild,v 1.1 2012/07/17 19:18:25 axs Exp $
+
+EAPI=4
+
+inherit eutils linux-mod linux-info flag-o-matic autotools
+
+DESCRIPTION="decode and send infra-red signals of many commonly used remote controls"
+HOMEPAGE="http://www.lirc.org/"
+
+MY_P=${PN}-${PV/_/}
+
+if [[ "${PV/_pre/}" = "${PV}" ]]; then
+ SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2"
+else
+ SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc X hardware-carrier transmitter"
+
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="
+ X? (
+ x11-libs/libX11
+ x11-libs/libSM
+ x11-libs/libICE
+ )
+ lirc_devices_alsa_usb? ( media-libs/alsa-lib )
+ lirc_devices_audio? ( >media-libs/portaudio-18 )
+ lirc_devices_irman? ( media-libs/libirman )"
+
+# 2012-07-17, Ian Stakenvicius
+# A helper script that scrapes out values for nearly all of the variables below
+# from lirc's configure.ac is available at
+# http://dev.gentoo.org/~axs/helper-for-lirc-iuse.sh
+
+# This are drivers with names matching the
+# parameter --with-driver=NAME
+IUSE_LIRC_DEVICES_DIRECT="
+ all userspace accent act200l act220l
+ adaptec alsa_usb animax asusdh atilibusb
+ atiusb audio audio_alsa avermedia avermedia_vdomate
+ avermedia98 awlibusb bestbuy bestbuy2 breakoutbox
+ bte bw6130 caraca chronos commandir
+ cph06x creative creative_infracd
+ devinput digimatrix dsp dvico ea65 ene0100
+ exaudio flyvideo ftdi gvbctv5pci hauppauge
+ hauppauge_dvb hercules_smarttv_stereo i2cuser
+ igorplugusb iguanaIR imon imon_24g imon_knob
+ imon_lcd imon_pad imon_rsc irdeo irdeo_remote
+ irlink irman irreal it87 ite8709
+ knc_one kworld leadtek_0007 leadtek_0010
+ leadtek_pvr2000 livedrive_midi
+ livedrive_seq logitech macmini
+ mediafocusI mouseremote
+ mouseremote_ps2 mp3anywhere mplay nslu2
+ packard_bell parallel pcmak pcmak_usb
+ pctv pixelview_bt878 pixelview_pak
+ pixelview_pro provideo realmagic
+ remotemaster sa1100 samsung sasem sb0540 serial
+ silitek sir slinke streamzap tekram
+ tekram_bt829 tira ttusbir tuxbox tvbox udp uirt2
+ uirt2_raw usb_uirt_raw usbx wpc8769l"
+
+# drivers that need special handling and
+# must have another name specified for
+# parameter --with-driver=NAME
+IUSE_LIRC_DEVICES_SPECIAL="
+ serial_igor_cesko
+ remote_wonder_plus xboxusb usbirboy inputlirc"
+
+IUSE_LIRC_DEVICES="${IUSE_LIRC_DEVICES_DIRECT} ${IUSE_LIRC_DEVICES_SPECIAL}"
+
+# The following are lists which are used to provide ewarns on incompatibilities
+# with the kernel:
+
+#drivers that do not build kernel modules
+NO_KMOD_BUILT_FOR_DEV="
+ accent bte creative creative_infracd devinput dsp ea65 exaudio
+ ftdi i2cuser irlink irreal livedrive_midi livedrive_seq logitech
+ mediafocusI mouseremote mouseremote_ps2 mp3anywhere mplay mplay2
+ pcmak pcmak_usb pctv realmagic remotemaster silitek tira tira_raw
+ tuxbox udp uirt2 uirt2_raw usb_uirt_raw usbx"
+
+#drivers that build lirc_dev and so will conflict with kernel lirc_dev
+LIRCDEV_BUILT_FOR_DEV="all
+ act200l act220l adaptec animax atiusb breakoutbox hauppauge
+ hauppauge_dvb hercules_smarttv_stereo igorplugusb imon imon_24g
+ imon_knob imon_lcd imon_pad imon_rsc irdeo irdeo_remote knc_one
+ leadtek_pvr2000 nslu2 packard_bell parallel pixelview_bt878
+ provideo sa1100 sasem serial sir tekram tekram_bt829 ttusbir
+ tvbox wpc8769l"
+
+#lirc_gpio drivers, which cannot be supported on kernel >= 2.6.22
+LIRC_GPIO_DEV="
+ avermedia avermedia98 avermedia_vdomate bestbuy bestbuy2 chronos
+ cph03x cph06x flyvideo gvbctv5pci kworld leadtek_0007 leadtek_0010
+ pixelview_pak pixelview_pro"
+
+#device-driver which use libusb
+LIBUSB_USED_BY_DEV="
+ all atilibusb awlibusb sasem igorplugusb imon imon_lcd imon_pad
+ imon_rsc streamzap xboxusb irlink commandir"
+
+for dev in ${LIBUSB_USED_BY_DEV}; do
+ DEPEND="${DEPEND} lirc_devices_${dev}? ( virtual/libusb:0 )"
+done
+
+# adding only compile-time depends
+DEPEND="${RDEPEND} ${DEPEND}
+ virtual/linux-sources
+ lirc_devices_ftdi? ( dev-embedded/libftdi )
+ lirc_devices_all? ( dev-embedded/libftdi )"
+
+# adding only run-time depends
+RDEPEND="${RDEPEND}
+ lirc_devices_usbirboy? ( app-misc/usbirboy )
+ lirc_devices_inputlirc? ( app-misc/inputlircd )
+ lirc_devices_iguanaIR? ( app-misc/iguanaIR )"
+
+# add all devices to IUSE
+# and ensure lirc_devices_all is not set alongside lirc_devices_*
+REQUIRED_USE="lirc_devices_all? ("
+for dev in ${IUSE_LIRC_DEVICES}; do
+ IUSE="${IUSE} lirc_devices_${dev}"
+ if [[ "${dev}" != "all" ]]; then
+ REQUIRED_USE="${REQUIRED_USE} !lirc_devices_${dev}"
+ fi
+done
+REQUIRED_USE="${REQUIRED_USE} )"
+
+add_device() {
+ local dev="${1}"
+ local desc="device ${dev}"
+ if [[ -n "${2}" ]]; then
+ desc="${2}"
+ fi
+
+ # Bug #187418
+ if kernel_is ge 2 6 22 && [[ " ${LIRC_GPIO_DEV} " == *" ${dev} "* ]]; then
+ eerror "${desc} uses lirc_gpio which fails with kernel 2.6.22 or above. Not building."
+ eerror "Use 'devinput' instead, or use 'userspace' along with in-kernel drivers"
+ return 0
+ fi
+ : ${lirc_device_count:=0}
+ ((lirc_device_count++))
+
+ elog "Compiling support for ${desc}"
+
+ if [[ " ${LIRCDEV_BUILT_FOR_DEV} " == *" ${dev} "* ]] ; then
+ if linux_chkconfig_present LIRC ; then
+ ewarn "${desc} builds lirc_dev and CONFIG_LIRC is set in the kernel -- this may conflict."
+ fi
+ if ! linux_chkconfig_present MODULE_UNLOAD ; then
+ ewarn "${desc} builds modules and CONFIG_MODULE_UNLOAD is unset in kernel."
+ ewarn "You will need MODULE_UNLOAD support in your kernel."
+ fi
+ fi
+ if [[ " ${NO_KMOD_BUILT_FOR_DEV} " == *" ${dev} "* ]] && ! linux_chkconfig_present IR_LIRC_CODEC ; then
+ ewarn "${desc} builds no kernel module and CONFIG_IR_LIRC_CODEC is unset in kernel."
+ fi
+
+ if [[ ${lirc_device_count} -eq 2 ]] ; then
+ ewarn
+ ewarn "LIRC_DEVICES has more than one entry."
+ ewarn "When selecting multiple devices for lirc to be supported,"
+ ewarn "it can not be guaranteed that the drivers play nice together."
+ ewarn "If this is not intended, then please adjust LIRC_DEVICES"
+ ewarn "and re-emerge."
+ ewarn
+ fi
+
+ MY_OPTS="${MY_OPTS} --with-driver=${dev}"
+}
+
+pkg_pretend() {
+ if [[ -n "${LIRC_OPTS}" ]] ; then
+ ewarn
+ ewarn "LIRC_OPTS is deprecated from lirc-0.8.0-r1 on."
+ ewarn
+ ewarn "Please use LIRC_DEVICES from now on."
+ ewarn "e.g. LIRC_DEVICES=\"serial sir\""
+ ewarn
+ ewarn "Flags are now set per use-flags."
+ ewarn "e.g. transmitter, hardware-carrier"
+
+ local opt
+ local unsupported_opts=""
+
+ # test for allowed options for LIRC_OPTS
+ for opt in ${LIRC_OPTS}; do
+ case ${opt} in
+ --with-port=*|--with-irq=*|--with-timer=*|--with-tty=*)
+ MY_OPTS="${MY_OPTS} ${opt}"
+ ;;
+ *)
+ unsupported_opts="${unsupported_opts} ${opt}"
+ ;;
+ esac
+ done
+ if [[ -n ${unsupported_opts} ]]; then
+ eerror "These options are no longer allowed to be set"
+ eerror "with LIRC_OPTS: ${unsupported_opts}"
+ die "LIRC_OPTS is no longer supported, use LIRC_DEVICES."
+ fi
+ fi
+}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ # set default configure options
+ MY_OPTS=""
+ LIRC_DRIVER_DEVICE="/dev/lirc0"
+
+ if use lirc_devices_all; then
+ # compile in drivers for a lot of devices
+ add_device all "a lot of devices"
+ else
+ # compile in only requested drivers
+ local dev
+ for dev in ${IUSE_LIRC_DEVICES_DIRECT}; do
+ if use lirc_devices_${dev}; then
+ add_device ${dev}
+ fi
+ done
+
+ if use lirc_devices_remote_wonder_plus; then
+ add_device atiusb "device Remote Wonder Plus (atiusb-based)"
+ fi
+
+ if use lirc_devices_serial_igor_cesko; then
+ add_device serial "serial with Igor Cesko design"
+ MY_OPTS="${MY_OPTS} --with-igor"
+ fi
+
+ if use lirc_devices_imon_pad; then
+ ewarn "The imon_pad driver has incorporated the previous pad2keys patch"
+ ewarn "and removed the pad2keys_active option for the lirc_imon module"
+ ewarn "because it is always active."
+ ewarn "If you have an older imon VFD device, you may need to add the module"
+ ewarn "option display_type=1 to override autodetection and force VFD mode."
+ fi
+
+ if use lirc_devices_xboxusb; then
+ add_device atiusb "device xboxusb"
+ fi
+
+ if use lirc_devices_usbirboy; then
+ add_device userspace "device usbirboy"
+ LIRC_DRIVER_DEVICE="/dev/usbirboy"
+ fi
+
+ if [[ "${MY_OPTS}" == "" ]]; then
+ if [[ "${PROFILE_ARCH}" == "xbox" ]]; then
+ # on xbox: use special driver
+ add_device atiusb "device xboxusb"
+ else
+ # no driver requested
+ elog
+ elog "Compiling only the lirc-applications, but no drivers."
+ elog "Enable drivers with LIRC_DEVICES if you need them."
+ MY_OPTS="--with-driver=none"
+ fi
+ fi
+ fi
+
+ use hardware-carrier && MY_OPTS="${MY_OPTS} --without-soft-carrier"
+ use transmitter && MY_OPTS="${MY_OPTS} --with-transmitter"
+
+ einfo
+ einfo "lirc-configure-opts: ${MY_OPTS}"
+ elog "Setting default lirc-device to ${LIRC_DRIVER_DEVICE}"
+
+ filter-flags -Wl,-O1
+
+ # force non-parallel make, Bug 196134
+ MAKEOPTS="${MAKEOPTS} -j1"
+}
+
+src_prepare() {
+ # Rip out dos CRLF
+ edos2unix contrib/lirc.rules
+
+ # Apply patches needed for some special device-types
+ use lirc_devices_audio || epatch "${FILESDIR}"/lirc-0.8.4-portaudio_check.patch
+ use lirc_devices_remote_wonder_plus && epatch "${FILESDIR}"/lirc-0.8.3_pre1-remotewonderplus.patch
+
+ # Do not build drivers from the top-level Makefile
+ sed -i -e 's:\(SUBDIRS =\) drivers\(.*\):\1\2:' Makefile.am
+
+ # remove parallel driver on SMP systems
+ if linux_chkconfig_present SMP ; then
+ sed -i -e "s:lirc_parallel\.o::" drivers/lirc_parallel/Makefile.am
+ fi
+
+ # Bug #187418 - only need this part for lirc_devices_all as others die in pkg_setup
+ if use lirc_devices_all && kernel_is ge 2 6 22 ; then
+ ewarn "Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+"
+ sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am
+ fi
+
+ # respect CFLAGS
+ sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac
+
+ # setting default device-node
+ local f
+ for f in configure.ac acconfig.h; do
+ [[ -f "$f" ]] && sed -i -e '/#define LIRC_DRIVER_DEVICE/d' "$f"
+ done
+ echo "#define LIRC_DRIVER_DEVICE \"${LIRC_DRIVER_DEVICE}\"" >> acconfig.h
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-syslog=LOG_DAEMON \
+ --enable-sandboxed \
+ --with-kerneldir="${KV_DIR}" \
+ --with-moduledir="/lib/modules/${KV_FULL}/misc" \
+ $(use_enable debug) \
+ $(use_with X x) \
+ ${MY_OPTS} \
+ ABI="${KERNEL_ABI}" \
+ ARCH="$(tc-arch-kernel)"
+}
+
+src_compile() {
+ emake
+
+ MODULE_NAMES="lirc(misc:${S}/drivers)"
+ BUILD_TARGETS="all"
+ linux-mod_src_compile
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ emake -C drivers DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/lircd-0.8.6-r1 lircd
+ newinitd "${FILESDIR}"/lircmd lircmd
+ newconfd "${FILESDIR}"/lircd.conf.3 lircd
+
+ insinto /etc/modprobe.d/
+ newins "${FILESDIR}"/modprobed.lirc lirc.conf
+
+ newinitd "${FILESDIR}"/irexec-initd-0.8.6-r2 irexec
+ newconfd "${FILESDIR}"/irexec-confd irexec
+
+ if use doc ; then
+ dohtml doc/html/*.html
+ insinto /usr/share/doc/${PF}/images
+ doins doc/images/*
+ fi
+
+ insinto /usr/share/lirc/remotes
+ doins -r remotes/*
+
+ keepdir /etc/lirc
+ if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+ newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example
+ fi
+}
+
+pkg_preinst() {
+ linux-mod_pkg_preinst
+
+ local dir="${EROOT}/etc/modprobe.d"
+ if [[ -a "${dir}"/lirc && ! -a "${dir}"/lirc.conf ]]; then
+ elog "Renaming ${dir}/lirc to lirc.conf"
+ mv -f "${dir}/lirc" "${dir}/lirc.conf"
+ fi
+
+ # copy the first file that can be found
+ if [[ -f "${EROOT}"/etc/lirc/lircd.conf ]]; then
+ cp "${EROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf
+ elif [[ -f "${EROOT}"/etc/lircd.conf ]]; then
+ cp "${EROOT}"/etc/lircd.conf "${T}"/lircd.conf
+ MOVE_OLD_LIRCD_CONF=1
+ elif [[ -f "${D}"/etc/lirc/lircd.conf ]]; then
+ cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf
+ fi
+
+ # stop portage from touching the config file
+ if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+ rm -f "${D}"/etc/lirc/lircd.conf
+ fi
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ # copy config file to new location
+ # without portage knowing about it
+ # so it will not delete it on unmerge or ever touch it again
+ if [[ -e "${T}"/lircd.conf ]]; then
+ cp "${T}"/lircd.conf "${EROOT}"/etc/lirc/lircd.conf
+ if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then
+ elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf"
+ rm -f "${EROOT}"/etc/lircd.conf
+ fi
+ fi
+
+ einfo "The new default location for lircd.conf is inside of"
+ einfo "/etc/lirc/ directory"
+}