summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2021-05-01 12:11:52 +0100
committerdakkar <dakkar@thenautilus.net>2021-05-01 12:11:52 +0100
commit86fbe7877903f13497d35331048a2a6d203a807a (patch)
tree7a1605dc0659bebf2dd137ef391ca101842606bd
parentremove old claws ebuilds (diff)
downloadgentoo-overlay-86fbe7877903f13497d35331048a2a6d203a807a.tar.gz
gentoo-overlay-86fbe7877903f13497d35331048a2a6d203a807a.tar.bz2
gentoo-overlay-86fbe7877903f13497d35331048a2a6d203a807a.zip
lirc 0.10.0 contains the driver already
-rw-r--r--app-misc/lirc/Manifest28
-rw-r--r--app-misc/lirc/files/irexec-confd9
-rwxr-xr-xapp-misc/lirc/files/irexec-initd28
-rwxr-xr-xapp-misc/lirc/files/irexec-initd-0.8.6-r228
-rw-r--r--app-misc/lirc/files/irexec.service10
-rw-r--r--app-misc/lirc/files/lirc-0.8.3_pre1-remotewonderplus.patch26
-rw-r--r--app-misc/lirc/files/lirc-0.8.4-portaudio_check.patch18
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-add-zotac-support.patch658
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-atiusb_kfifo.patch14
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-fixed-font.patch20
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-kernel-2.6.39-fixes.patch67
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-kernel-3.3.0-fixes.patch50
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-kernel-3.5-err-fix.patch12
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-kernel-3.8-fixes.patch80
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-usb_irtoy.patch772
-rw-r--r--app-misc/lirc/files/lirc.service11
-rw-r--r--app-misc/lirc/files/lircd-0.8.323
-rw-r--r--app-misc/lirc/files/lircd-0.8.641
-rw-r--r--app-misc/lirc/files/lircd-0.8.6-r252
-rw-r--r--app-misc/lirc/files/lircd.conf.210
-rw-r--r--app-misc/lirc/files/lircd.conf.422
-rw-r--r--app-misc/lirc/files/lircm.service11
-rw-r--r--app-misc/lirc/files/lircmd20
-rw-r--r--app-misc/lirc/files/modprobed.lirc22
-rw-r--r--app-misc/lirc/files/modulesd.lirc22
-rw-r--r--app-misc/lirc/lirc-0.9.0-r3.ebuild424
-rw-r--r--app-misc/lirc/lirc-0.9.0-r5.ebuild437
-rw-r--r--app-misc/lirc/lirc-0.9.0-r6.ebuild431
28 files changed, 0 insertions, 3346 deletions
diff --git a/app-misc/lirc/Manifest b/app-misc/lirc/Manifest
deleted file mode 100644
index 9630d5c..0000000
--- a/app-misc/lirc/Manifest
+++ /dev/null
@@ -1,28 +0,0 @@
-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 710 SHA256 c5fcf54620ae2c003fe6ea04ab624c3607c6b9b6f65c971c34fbb7293681d030 SHA512 f60eafa10a0d77a5ef7603ad74c0736b4cc89dba4db65e05e5e8f1a5939f95c644f59044837579f896eb7f4d3478d8ae06acea4e9bfb18f1744c88bf7bc3b42c WHIRLPOOL b024a3a908dd4fa308e14c3b0326b27af0e24003d9d919632fd0d1219a26a8e1eac69b7eea3d0fe0fe91fd97acc6c84080c00d126678055288fd91ab91759376
-AUX irexec.service 140 SHA256 e8c5c387f9f357d4b19215bec5f7f3ac4a2722ec4f23f85417428465afe0fe9d SHA512 573e037d7132d216f095e4af370cdd020d72eca4ca6dfb1a652d6cd3f533b7d86491469a14d86419406561a6fb6500567e5e38a13b8dd0c99c63ff8494562249 WHIRLPOOL 7b018590f32f7129621eba73785b2925962a9b8d7356d92191b2937e3354902689dda1ace94cb4f3dcae4f6fb0700b42b5e176a3674c2e9d9dd43464f7835849
-AUX lirc-0.8.3_pre1-remotewonderplus.patch 943 SHA256 547efbfa30f282ba9100495044e3b720c8f74c44f9a4e34db934d2ac7976fe29 SHA512 f1c5b03eafb8fb9d4190e438fb4ca734cac102c7f3a097f193a0a1ac7cdee33b01fb1d794959e00be16c78bb66e34d113f3ff8fb87678e99f82670ec0306e3ca WHIRLPOOL 999b01a1c2860457bf9ed68891cbb497595d58fe57627bc87d5f6401835ee5586ebcf124e1f563264ba64df22e38c7a6ccfbaf628123c5a2419bb0f57f74f19a
-AUX lirc-0.8.4-portaudio_check.patch 769 SHA256 01e2034aaa6a7eb039e5c0e6c3b4a6ed38860614d3d0b0005d99a4aac2b3827e SHA512 a4e63da5d03f1fbb072679c3a415ae55767d601512f158c5e2fc52a045b632a055b94dca4e9d0d236ceeeb367daf22d4cc71f542229edb4fb13410512a8e4f0b WHIRLPOOL 0717efa4d7934c9736b220ec4416d1827397267b34bc3343a16a5963729fcfaa4871bb4e47b1aebbb310ea5bcc2bfaa7c675a451f5db46d979f0e4438e84a37e
-AUX lirc-0.9.0-add-zotac-support.patch 19305 SHA256 47d8a1b19f44ec2244cd95bb54dba6e5f2a565d067f63a0b7ffbc1d6a4be3462 SHA512 72ac76eba13ed043630b10adad7a8a0df9183c7b2eeab1cc2bee3f7d6a97d56382debcf61aa4a2d6068d85bbd8d592ee425f34a6ac6eabcbf0a300ed6fb208cb WHIRLPOOL 748fbd3b27995a62c8f449b4fb48f2eaca1ce1f3db4b187e67296a69b4a7fa85641a847be6e4300ed4055aafce29c6c4f94796334409d6b2d3fb6b2c3d1764bf
-AUX lirc-0.9.0-atiusb_kfifo.patch 437 SHA256 b7950ee185588a3626b8024cb22c0e67c8514362f5c9cb74bfcead8018e11b02 SHA512 d072ecd94ed4b7f1662441106650b7eb329cbe62887819c1e607ae87375a17dedea02a3a5dcf6956a1151743fd652ec5884577c595771740eef509daab8dbd02 WHIRLPOOL f0013dd75d6cf3486cddbea4e97e7ca9962af882befc5e994f258d1eb5e77e09379c4ca246e407f4c7ad5438b860e0e3b0abb2cade6f04b101525f060188ed03
-AUX lirc-0.9.0-fixed-font.patch 630 SHA256 28e2ad5deccfbc09718d19ff94bae22a7651f31085b87351e3d7fd4c515a38bb SHA512 782eb14bd540f202a3df71ce801a42b9adca17fa25a79265af6a3b0ed6b503a67b46a0d29ac6b4607862b712a3511a3a3f16cdc7bef70ba1e43967be11971ed4 WHIRLPOOL 7e67edf3a09d15c0501f0bcf3d38c9199dd0cbcb3385ae547425126e33772e4eaa0b9b8dc76a708357db303636b73474fbb1aaaf6428bcca033f50faf158c2d7
-AUX lirc-0.9.0-kernel-2.6.39-fixes.patch 2175 SHA256 f5f48c867716288835a73b8d29aa9b1fcc4905a723e1f99e35fe396b2c759957 SHA512 a502b815cec565a49382e9ad0e7237a9bc7da431f41e94db42d214655577212606500ea2651a298db8cd3a68ce706461e6a773b0d9e3316ac7d49b2038fda354 WHIRLPOOL f1968f51cc29ce4f630c59c964d106e024f4cb3e5938ea80b271800a65d130a42531db5fe6e220ae20577cd4f1998de09e5dbdf52ff1cf6f3839922dd9ece114
-AUX lirc-0.9.0-kernel-3.3.0-fixes.patch 1545 SHA256 f02e7b3c52dd17e179b6f89afc15f5eec2889a18f1df4523df680fbf50adb584 SHA512 75743844d7fe61a91174c1d7ee78a229e347659a35d1062a704c39e424d8a433efac4216a0b840282c38a4f2f22baa7a489c1c0402a40f734e7475992046a2ae WHIRLPOOL 871523dc5a9757d170b740acd9845b0ba42c4c5c4c5fdc71b5c701cefa2f6122cf1cb6171698e6bf2e605d93f052d15371657f5c1901794819ca2c3eded2ec1f
-AUX lirc-0.9.0-kernel-3.5-err-fix.patch 326 SHA256 171f03c8d93e60b86caec6027c303797028f57bc99cd37e6ccb65ef074f5de35 SHA512 c3a6e802b140595155a7ae8dc695bc13e4d6147323949a8dc9c86857bf7abcd442339eac64f99869925c308a100bfb1b7b0eb715f086afb8997252164ff079df WHIRLPOOL aa849092798c5e1335336d4de86139b5c545c8ffa899a92182f9a010e0c1e28d8e3dfca8e3d71bf2aee874c52dd237b8b10f9d514e7dce571b634b6cb1d4bd15
-AUX lirc-0.9.0-kernel-3.8-fixes.patch 2727 SHA256 82e26f0a41dc259d7ed046d888005772187ad5dfd8440408a42acc56f246d693 SHA512 0db9cbb3aba7d43dc497bc8009afb8335bfe013a06aa6936e1cd357e58c60f545575b06fb6941740d82b496dd4f2ac51b3a165435aee6b3c57107ae62bae7bdc WHIRLPOOL 69d7164ae44146db9aabbaf04376948d94826f1e70e1f957fdd83ec01fa7b30faa3778f16869544fb4e90535a4c2c048e942d3373c5570be3ca3584b5c6f7621
-AUX lirc-0.9.0-usb_irtoy.patch 19885 SHA256 9c8f7192774a46f93bddb5b9e31e8fabfd1118864db99cba4f2c7c657c7da6e5 SHA512 5fc6ccd09175c5d6b84c00f2155c0bfd694abfd4f3d3fe6e569b8ea1ebba52a20d96bf02ac432b9250069f1413947f572414fbf055ed71b63b88ce5b3966d38c WHIRLPOOL 0fc50266ed820a76f3ce8433d555514daca5a38f24e1dc980117b889588756b5d9d0ad1b98e009f037e0be06c4eabadc820af9a88a8a213254d559238bbe214d
-AUX lirc.service 216 SHA256 282a090a35e578a5a57cf14555c1369976cb3ccd48e25d8e8ab38e07e822791d SHA512 c3e43d24f562ba5ac7e0f12d160026ebf5db00fe066d9e28e0cbb6767fb272474103ad271fba10b970a6613f6e4545150d61b7aa096c696fddca4f2db8019e49 WHIRLPOOL 0dbf419aa4fe83aa7e4e05ff06c4063ed5c854ecf552a9b4d9e2826eb419aafd3fad9fdd01fade34346e07d5d52c09a50a363e8314779983c569ba4cb6521d6b
-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-r2 1211 SHA256 2647b25b7516031e66ac252edafbaca2f2d6934473a6e15fdcc2a462ba0cb2ae SHA512 e0e2ec74b094191b649cf1a4b3b9fd04b475642ea03511e515bf43f186231e7149629d5855a53a8712b496c8003088f10d1e69fdc343c44cbf64bc38fdd37236 WHIRLPOOL ca90f0129bf1c3760b610fabae62ce86505d38c32207ebdfdde43cfd0d55f2a36c0d40104dc20ac1c2a0c30a1498e96607380ba609358f12eb519f25a958c33c
-AUX lircd.conf.2 317 SHA256 694d96ffc0c5b8d258592d89c0221aa9b10d69ce024a69a0cc935d899e0b855e SHA512 59779104301e96b377999aad9980f2a915ee9d817e0ba33c172602ea868b49450cd198fe26cf6da4dd8690684768f4d5cd6132a66fec5fea486fbd7a5a8c3a7b WHIRLPOOL 353f5e9e17a831bc124124316f043063ee9c4a13f29f44cf66d236cfcd7d30e756392f18ad761343c723e0e4079541638d1ea7b921074e75a8449f0a5388d179
-AUX lircd.conf.4 699 SHA256 d36ff77fa193a065d25e373723e03f1a9471205151b82c73a6574cce4f095962 SHA512 1fb1778f4cc72fc9c11b13a704b3abe80bcce5b3770b69b6b6bea8571e5293adad8c6968779b812e611b67734462c9a577cc71c6b16da3a5bfe31b8007300a62 WHIRLPOOL c9d3b5845b4d395abed932f4553808c0eff66f2be2b6d6ab302c98b11eb2ffc0fcd752e2862982896a4c935425ae03a545cdeb4a6c0da91141d1622178263053
-AUX lircm.service 174 SHA256 67c7d03a3c43b5c0d03d2b9c994dced8a9473c3e22e32c67e4baf75fb8ccabd1 SHA512 8baccd7138fb9095c99f4f0a8ef398114dfa2bba798f23e07d41d6a7433242e2e1f071d44e1b336fb2a36b30c650ed01f2ccdb1ed365e590f85007c012343db5 WHIRLPOOL d542ad3a1ed5a4b3eec957e7cf8814ba2548f2f27cf9502aa342ea6a9c389cedcf5cf26793d94fa0977819ff6a3ebc6ee500eaf3debeddf2b4c65e82cad42eff
-AUX lircmd 371 SHA256 aee017bea6c79a419ad40e55a4cc3ffbeacafe330d931b0dd8bfb4c6cb7c6183 SHA512 d243de0a50e8103729affc04d7a5877be1cee8f96a9250d4fe8805afa8b34ae3d9de69bed66b4dac0e1a77bac0365789e0c1d552075ed4d85ad00adca8760d7a WHIRLPOOL a167230373d48c65613a72afca964b7b8000352e214e0d79d6de21d89194ad8b458a2760e298bb04effed2e4aca17dd65faa73f3ab733259d12793a2d15dd93a
-AUX modprobed.lirc 549 SHA256 b4951252321ea326d3ec401e5ff1112716c5aaf5b2ca94d9f5e187e22ad35c44 SHA512 a64cac97e21ab53c247d8dd3e518b3caee5eeb9c3558727eba8a04684894c6be1695ce681e71d559474f4e78bbb39130d97f843eae18e56b3d3eb70f1fbefc63 WHIRLPOOL a45ec8b3cd725f9b4c6b991cf6d4fec7869a07911a2ac82535dca665a0dd99a66b40d85faf0beea780001e9260a8a17c1ccec880c05a271a138c1e0501f7727c
-AUX modulesd.lirc 482 SHA256 3906b61951e1245cb3c9b16e81255a735f7bcdbbfcbedcdf44cd53236e2a3f28 SHA512 07ae7c7288878f65857962bb3a343b83d58eca6447299253dd297dec6443b95d89f46ebcbe1f1ac66ec5062f8134a2e19ecc3ce397b2f8d0d27f203a2a103fcc WHIRLPOOL 2bc4c45d3fd314cc88d50f79974b2aafa4e55a7df7383cbd2f3ddf5b66e144b5700f8d411f79ea458caec0da3e47d5e0db2c34e1efcc2d748c473fe2c5ae7389
-DIST lirc-0.9.0.tar.bz2 857286 SHA256 6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff SHA512 e91534c63e6065bd7da3b15e1676edf1672b8beb21864a6825df86247d7d165bf2dee6f8191732933e24e42a406e46afc55559948e4061eed2de7b08fac13431 WHIRLPOOL 0a1c00b07898aa7a5d78865fb73c6d26c6331dd0a4945773a801d29e40298b365eb58cae113a95fcf73be678a24ac082ad0868e8051303d732882fb82a859a7b
-EBUILD lirc-0.9.0-r3.ebuild 12895 SHA256 3c413e62975a799d7c5e99640b0a67561f4e6cf6dee80ba2a48f2021c1e728de SHA512 708b79d0d3be5730b7c69c94259a7d19af206f766a6bd30c3f7812f7cffbffa68238b7a905dcfea9a44513a370f12504531f7d746360e844b2a042b4ee21c8c7 WHIRLPOOL 26cc54ec8b102216f52e8753bf57952099b6b6dffad6f0d7d0fb3e5e7f8f87e4d43d9ce19cdec1f47f5c116d73e10adfa4d756b45739599a8a61dc87acd78f0c
-EBUILD lirc-0.9.0-r5.ebuild 13663 SHA256 4740431a36e1c24e43f969e3f36210503039eda952dbcb526f5672a402098c04 SHA512 2ad1d5e6058d33fa9e12281cb99a8e74b0ccbb57752dce884c2f8387873ade5e8c544368ebb56e8bb8112bfe68a2cd43cef48ca7112f6a52e51dd65324e5fda7 WHIRLPOOL 0a298ed984abe581b98de72df92a1df4b314d2cdce3439d8209256acb2fc0725d9e84e62c4896ad23eb0acfad271d2df5107a52d122596c46bf5f6cf0e235a71
-EBUILD lirc-0.9.0-r6.ebuild 13356 SHA256 a490dc2fb28b02959812a290ac64bd93ccbd15de4b34391f7099fc1bfb678bc8 SHA512 54f0591681ebd84d4e8e850544e7d82d064f3a44434f91552afcd01723222abb67b002d237cfd13765961ebddd7e91eb0e169f35da8b869bf3a1247e84441cd8 WHIRLPOOL d6db96b16c15a0386e8ed81f6414d865bccd359e6a76ca26522f0fc5b48eaef3b5fbfbea9147c3ff9bfa82e57173df40dbad3f0f60d937f877d4b90b5eb707e5
diff --git a/app-misc/lirc/files/irexec-confd b/app-misc/lirc/files/irexec-confd
deleted file mode 100644
index 48eb8dd..0000000
--- a/app-misc/lirc/files/irexec-confd
+++ /dev/null
@@ -1,9 +0,0 @@
-# Options to pass to the irexec process
-IREXEC_OPTS="/etc/lircrc"
-
-# User to execute irexec as.
-# Warning: Running irexec as root can open security holes
-#IREXEC_USER="root"
-
-# Use this to disable the warning printed when starting irexec as root
-# IREXEC_DISABLE_ROOT_WARNING=yes
diff --git a/app-misc/lirc/files/irexec-initd b/app-misc/lirc/files/irexec-initd
deleted file mode 100755
index e1defee..0000000
--- a/app-misc/lirc/files/irexec-initd
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/sbin/runscript
-# Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/irexec-initd,v 1.3 2007/05/24 20:12:16 zzam Exp $
-
-: ${IREXEC_USER:=root}
-
-depend() {
- need lircd
-}
-
-start() {
- if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then
- ewarn "Warning: Running irexec as root can open security holes"
- fi
-
- ebegin "Starting irexec"
- start-stop-daemon --start --chuid ${IREXEC_USER} --user ${IREXEC_USER} --chdir / \
- --exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS}
- eend $? "Failed to start irexec."
-}
-
-stop() {
- ebegin "Stopping irexec"
- start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER}
- eend $? "Failed to stop irexec."
-}
-
diff --git a/app-misc/lirc/files/irexec-initd-0.8.6-r2 b/app-misc/lirc/files/irexec-initd-0.8.6-r2
deleted file mode 100755
index 95b1c07..0000000
--- a/app-misc/lirc/files/irexec-initd-0.8.6-r2
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-: ${IREXEC_USER:=root}
-
-depend() {
- need lirc
-}
-
-start() {
- if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then
- ewarn "Warning: Running irexec as root can open security holes"
- fi
-
- ebegin "Starting irexec"
- start-stop-daemon --start --chuid ${IREXEC_USER} --user ${IREXEC_USER} --chdir / \
- --exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS}
- eend $? "Failed to start irexec."
-}
-
-stop() {
- ebegin "Stopping irexec"
- start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER}
- eend $? "Failed to stop irexec."
-}
-
diff --git a/app-misc/lirc/files/irexec.service b/app-misc/lirc/files/irexec.service
deleted file mode 100644
index 53dac65..0000000
--- a/app-misc/lirc/files/irexec.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=IR Exec
-After=lirc.service
-Wants=lirc.service
-
-[Service]
-ExecStart=/usr/bin/irexec
-
-[Install]
-WantedBy=multi-user.target
diff --git a/app-misc/lirc/files/lirc-0.8.3_pre1-remotewonderplus.patch b/app-misc/lirc/files/lirc-0.8.3_pre1-remotewonderplus.patch
deleted file mode 100644
index 66527bc..0000000
--- a/app-misc/lirc/files/lirc-0.8.3_pre1-remotewonderplus.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- lirc-0.8.0/drivers/lirc_atiusb/lirc_atiusb.c.orig 2005-10-29 08:18:53.000000000 -0600
-+++ lirc-0.8.0/drivers/lirc_atiusb/lirc_atiusb.c 2006-04-01 14:31:05.000000000 -0700
-@@ -147,8 +147,9 @@
- /* init strings */
- #define USB_OUTLEN 7
-
--static char init1[] = {0x01, 0x00, 0x20, 0x14};
--static char init2[] = {0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20};
-+static char init1[] = {0x80, 0x05, 0x1b, 0x15, 0x14, 0x20, 0x24, 0x15};
-+static char init2[] = {0x83, 0x03};
-+static char init3[] = {0x84, 0xd7, 0x020};
-
- struct in_endpt {
- /* inner link in list of endpoints for the remote specified by ir */
-@@ -1034,8 +1034,9 @@
- usb_sndintpipe(ir->usbdev, oep->ep->bEndpointAddress), oep->buf,
- USB_OUTLEN, usb_remote_send, oep, oep->ep->bInterval);
-
-- send_packet(oep, 0x8004, init1);
-- send_packet(oep, 0x8007, init2);
-+ send_packet(oep, 0x8007, init1);
-+ send_packet(oep, 0x8002, init2);
-+ send_packet(oep, 0x8003, init3);
- }
- }
-
diff --git a/app-misc/lirc/files/lirc-0.8.4-portaudio_check.patch b/app-misc/lirc/files/lirc-0.8.4-portaudio_check.patch
deleted file mode 100644
index 36f5f36..0000000
--- a/app-misc/lirc/files/lirc-0.8.4-portaudio_check.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Portaudio is only needed for LIRC_DEVICES=audio, so not checking for Portaudio when the device is disabled will prevent automagic dependencies.
---- configure.ac.orig 2009-03-13 10:02:50.000000000 +0100
-+++ configure.ac 2009-03-13 10:04:00.000000000 +0100
-@@ -336,14 +336,6 @@
- AC_DEFINE(HAVE_LIBIRMAN_SW)
- possible_drivers="${possible_drivers} (irman_sw)"
- )
--dnl audio driver requires PortAudio library installed and some linker flags
--AC_CHECK_HEADERS(portaudio.h,[
-- AC_CHECK_LIB(portaudio, Pa_Initialize,[
-- AC_DEFINE(HAVE_LIBPORTAUDIO)
-- possible_drivers="${possible_drivers} (audio)"
-- ],,${portaudio_lib_other}
-- )]
--)
- dnl audio_alsa driver requires ALSA library installed and some linker flags
- have_alsa=no
- AC_CHECK_HEADERS(alsa/asoundlib.h,[
diff --git a/app-misc/lirc/files/lirc-0.9.0-add-zotac-support.patch b/app-misc/lirc/files/lirc-0.9.0-add-zotac-support.patch
deleted file mode 100644
index 381860c..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-add-zotac-support.patch
+++ /dev/null
@@ -1,658 +0,0 @@
-diff -rupN base/configure.ac mod/configure.ac
---- base/configure.ac 2011-03-25 23:28:18.000000000 +0100
-+++ mod/configure.ac 2013-03-21 16:25:07.218419985 +0100
-@@ -383,7 +383,7 @@ AC_CHECK_HEADERS(linux/input.h,[
- dnl check if hiddev is available
- AC_CHECK_HEADERS([linux/types.h])
- AC_CHECK_HEADERS([linux/hiddev.h],[
-- possible_drivers="${possible_drivers} (asusdh) (bw6130) (dvico) (macmini)"
-+ possible_drivers="${possible_drivers} (asusdh) (bw6130) (dvico) (macmini) (zotac)"
- AC_MSG_CHECKING(for HIDDEV_FLAG_UREF support)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <linux/types.h>
-@@ -393,7 +393,7 @@ AC_CHECK_HEADERS([linux/hiddev.h],[
- ]])],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_LINUX_HIDDEV_FLAG_UREF)
-- possible_drivers="${possible_drivers} (samsung) (sb0540)"
-+ possible_drivers="${possible_drivers} (samsung) (sb0540) (zotac)"
- ],[
- AC_MSG_RESULT(no)
- ])
-@@ -446,7 +446,7 @@ AC_ARG_WITH(driver,
- srm7500libusb, tekram,
- tekram_bt829, tira, tira_raw, ttusbir,
- tuxbox, tvbox, udp, uirt2, uirt2_raw,
-- usb_uirt_raw, usbx, wpc8769l],
-+ usb_uirt_raw, usbx, wpc8769l, zotac],
- driver=${withval},
- driver="unset"
- )
-@@ -464,6 +464,7 @@ portaudio_lib=""
- alsa_lib=""
- atilibusb_lib=""
- atwf83_lib=""
-+zotac_lib=""
- awlibusb_lib=""
- dfclibusb_lib=""
- srm7500libusb_lib=""
-@@ -683,6 +684,10 @@ if test "$driver" = "userspace" -o "$dri
- usbx)
- hw_module="${hw_module} hw_usbx.o serial.o"
- ;;
-+ zotac)
-+ hw_module="${hw_module} hw_zotac.o"
-+ zotac_lib=-lpthread
-+ ;;
- esac
- done
- #remove duplicates
-@@ -733,6 +738,14 @@ if test "$driver" = "alsa_usb"; then
- lircd_conf="creative/lircd.conf.alsa_usb"
- fi
-
-+if test "$driver" = "zotac"; then
-+ lirc_driver="$driver"
-+ hw_module="hw_zotac.o"
-+ HW_DEFAULT="hw_zotac"
-+ lircd_conf="zotac/lircd.conf.zotac"
-+ zotac_lib=-lpthread
-+fi
-+
- if test "$driver" = "animax"; then
- lirc_driver="lirc_dev lirc_serial"
- lircd_conf="animax/lircd.conf.animax"
-@@ -1499,6 +1512,7 @@ if test "$lirc_driver" = "none" || \
- test "$lirc_driver" = "macmini" || \
- test "$lirc_driver" = "samsung" || \
- test "$lirc_driver" = "sb0540" || \
-+ test "$lirc_driver" = "zotac" || \
- test "$lirc_driver" = "srm7500libusb" || \
- test "$lirc_driver" = "userspace"; then
- lirc_driver=
-@@ -1669,7 +1683,7 @@ if ! echo ${hw_module}|grep " receive.o"
- receive="receive.o"
- fi
-
--hw_module_libs="${alsa_lib} ${atilibusb_lib} ${awlibusb_lib} ${caraca_lib} ${commandir_lib} ${dfclibusb_lib} ${ftdi_lib} ${iguanaIR_lib} ${irman_lib} ${portaudio_lib} ${srm7500libusb_lib} ${atwf83_lib}"
-+hw_module_libs="${alsa_lib} ${atilibusb_lib} ${awlibusb_lib} ${caraca_lib} ${commandir_lib} ${dfclibusb_lib} ${ftdi_lib} ${iguanaIR_lib} ${irman_lib} ${portaudio_lib} ${srm7500libusb_lib} ${atwf83_lib} ${zotac_lib}"
-
- dnl tell the Makefiles what we decided
- AC_SUBST(daemon)
-diff -rupN base/daemons/Makefile.am mod/daemons/Makefile.am
---- base/daemons/Makefile.am 2011-03-25 23:28:18.000000000 +0100
-+++ mod/daemons/Makefile.am 2013-03-21 16:25:40.488790784 +0100
-@@ -58,7 +58,8 @@ EXTRA_libhw_module_a_SOURCES = \
- hw_usbx.c hw_usbx.h \
- receive.c receive.h \
- transmit.c transmit.h \
-- serial.c serial.h
-+ serial.c serial.h \
-+ hw_zotac.c
-
- libhw_module_a_LIBADD = @hw_module@
- libhw_module_a_DEPENDENCIES = @hw_module@
-diff -rupN base/daemons/hw-types.c mod/daemons/hw-types.c
---- base/daemons/hw-types.c 2011-03-25 23:28:18.000000000 +0100
-+++ mod/daemons/hw-types.c 2013-03-21 16:26:38.913200218 +0100
-@@ -59,6 +59,7 @@ extern struct hardware hw_uirt2;
- extern struct hardware hw_uirt2_raw;
- extern struct hardware hw_usb_uirt_raw;
- extern struct hardware hw_usbx;
-+extern struct hardware hw_zotac;
-
- #ifndef HW_DEFAULT
- # define HW_DEFAULT hw_default
-@@ -160,6 +161,7 @@ struct hardware *hw_list[] = {
- #ifdef HAVE_LINUX_HIDDEV_FLAG_UREF
- &hw_samsung,
- &hw_sb0540,
-+ &hw_zotac,
- #endif
- &hw_silitek,
- #ifdef HAVE_LIBUSB
-diff -rupN base/daemons/hw_zotac.c mod/daemons/hw_zotac.c
---- base/daemons/hw_zotac.c 1970-01-01 01:00:00.000000000 +0100
-+++ mod/daemons/hw_zotac.c 2013-03-21 16:31:06.989272556 +0100
-@@ -0,0 +1,429 @@
-+/****************************************************************************
-+ ** hw_zotac.c *************************************************************
-+ ****************************************************************************
-+ *
-+ * Lirc driver for Zotac remote
-+ *
-+ * Copyright (C) 2010 Rainer Hochecker
-+ *
-+ * Distribute under GPL version 2 or later.
-+ *
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <stdio.h>
-+#include <pthread.h>
-+#include <sys/fcntl.h>
-+#include <signal.h>
-+#include <linux/hiddev.h>
-+#include <sys/ioctl.h>
-+#include "hardware.h"
-+#include "ir_remote.h"
-+#include "lircd.h"
-+
-+enum {
-+ RPT_NO = 0,
-+ RPT_YES = 1,
-+};
-+
-+static int zotac_init();
-+static int zotac_deinit();
-+static char *zotac_rec(struct ir_remote *remotes);
-+static int zotac_decode(struct ir_remote *remote, ir_code * prep, ir_code * codep, ir_code * postp, int *repeat_flagp,
-+ lirc_t * min_remaining_gapp, lirc_t * max_remaining_gapp);
-+static void *zotac_repeat();
-+static int zotac_getcode();
-+
-+/** Max number of repetitions */
-+static unsigned max_repeat_count = 500;
-+/** Code that triggers key release */
-+static unsigned release_code = 0x00000000;
-+/** Code that triggers device remove */
-+static unsigned remove_code =0x00FFFFFF;
-+/** Time to wait before first repetition */
-+static unsigned repeat_time1_us = 500000;
-+/** Time to wait between two repetitions */
-+static unsigned repeat_time2_us = 100000;
-+/** Pipe between main thread and repetition thread */
-+static int fd_pipe[2] = { -1, -1 };
-+
-+/** Thread that simulates repetitions */
-+static pthread_t repeat_thread;
-+/** File descriptor for the real device */
-+static int fd_hidraw;
-+
-+static int main_code_length = 32;
-+static signed int main_code = 0;
-+static struct timeval start, end, last;
-+static int repeat_state = RPT_NO;
-+static int error_state = 0;
-+static int probe_code = 0;
-+
-+#ifdef HAVE_LINUX_HIDDEV_FLAG_UREF
-+/* Zotac USB iR Receiver */
-+struct hardware hw_zotac = {
-+ "/dev/usb/hiddev0", /* "device" */
-+ -1, /* fd (device) */
-+ LIRC_CAN_REC_LIRCCODE, /* features */
-+ 0, /* send_mode */
-+ LIRC_MODE_LIRCCODE, /* rec_mode */
-+ 32, /* code_length */
-+ zotac_init, /* init_func */
-+ zotac_deinit, /* deinit_func */
-+ NULL, /* send_func */
-+ zotac_rec, /* rec_func */
-+ zotac_decode, /* decode_func */
-+ NULL, /* ioctl_func */
-+ NULL, /* readdata */
-+ "zotac" /* name */
-+};
-+#endif
-+
-+static int zotac_decode(struct ir_remote *remote, ir_code * prep, ir_code * codep, ir_code * postp, int *repeat_flagp,
-+ lirc_t * min_remaining_gapp, lirc_t * max_remaining_gapp)
-+{
-+ LOGPRINTF(1, "zotac_decode");
-+
-+ if (!map_code(remote, prep, codep, postp, 0, 0, main_code_length, main_code, 0, 0)) {
-+ return 0;
-+ }
-+
-+ map_gap(remote, &start, &last, 0, repeat_flagp, min_remaining_gapp, max_remaining_gapp);
-+ /* override repeat */
-+ *repeat_flagp = repeat_state;
-+
-+ return 1;
-+}
-+
-+static int zotac_getcode() {
-+
-+ ssize_t rd;
-+ struct hiddev_usage_ref uref;
-+ struct hiddev_report_info rinfo;
-+ struct hiddev_field_info finfo;
-+ int shift = 0;
-+
-+ rd = read(fd_hidraw, &uref, sizeof(uref));
-+ if (rd < 0) {
-+ logprintf(LOG_ERR, "error reading '%s'", hw.device);
-+ logperror(LOG_ERR, NULL);
-+ zotac_deinit();
-+ error_state = 1;
-+ return -1;
-+ }
-+
-+ if (uref.field_index == HID_FIELD_INDEX_NONE) {
-+ /*
-+ * we get this when the new report has been send from
-+ * device at this point we have the uref structure
-+ * prefilled with correct report type and id
-+ *
-+ */
-+
-+ switch (uref.report_id) {
-+ case 1: /* USB standard keyboard usage page */
-+ {
-+ /* This page reports cursor keys */
-+ LOGPRINTF(3, "Keyboard (standard)\n");
-+
-+ /* check for special codes */
-+ uref.field_index = 0;
-+ uref.usage_index = 1;
-+ /* fetch the usage code for given indexes */
-+ ioctl(fd_hidraw, HIDIOCGUCODE, &uref, sizeof(uref));
-+ /* fetch the value from report */
-+ ioctl(fd_hidraw, HIDIOCGUSAGE, &uref, sizeof(uref));
-+
-+ if (uref.value)
-+ shift = 1;
-+
-+ /* populate required field number */
-+ uref.field_index = 1;
-+ uref.usage_index = 0;
-+ /* fetch the usage code for given indexes */
-+ ioctl(fd_hidraw, HIDIOCGUCODE, &uref, sizeof(uref));
-+ /* fetch the value from report */
-+ ioctl(fd_hidraw, HIDIOCGUSAGE, &uref, sizeof(uref));
-+ /* now we have the key */
-+
-+ LOGPRINTF(3, "usage: %x value: %x shift: %d\n",uref.usage_code, uref.value, shift);
-+
-+ /* now we have the key */
-+ if (uref.value) {
-+ probe_code = (uref.usage_code | uref.value);
-+ if (shift)
-+ probe_code |= 0x10000000;
-+ LOGPRINTF(3, "Main code 1: %x\n", probe_code);
-+ return 1;
-+ }
-+ else {
-+ LOGPRINTF(3, "rel button\n");
-+ probe_code = release_code;
-+ return 2;
-+ }
-+ }
-+ break;
-+
-+ case 2:
-+ case 3: /* USB generic desktop usage page */
-+ case 4:
-+ {
-+ /* This page reports power key
-+ * (via SystemControl SLEEP)
-+ */
-+ LOGPRINTF(3, "Generic desktop (standard)\n");
-+
-+
-+ /* traverse report descriptor */
-+ rinfo.report_type = HID_REPORT_TYPE_INPUT;
-+ rinfo.report_id = HID_REPORT_ID_FIRST;
-+ rd = ioctl(fd_hidraw, HIDIOCGREPORTINFO, &rinfo);
-+
-+ unsigned int i,j;
-+ while (rd >= 0) {
-+ for (i = 0; i < rinfo.num_fields; i++) {
-+ finfo.report_type = rinfo.report_type;
-+ finfo.report_id = rinfo.report_id;
-+ finfo.field_index = i;
-+ ioctl(fd_hidraw, HIDIOCGFIELDINFO, &finfo);
-+ for (j = 0; j < finfo.maxusage; j++) {
-+ uref.field_index = i;
-+ uref.usage_index = j;
-+ ioctl(fd_hidraw, HIDIOCGUCODE, &uref);
-+ ioctl(fd_hidraw, HIDIOCGUSAGE, &uref);
-+
-+ if (uref.value != 0) {
-+ LOGPRINTF(3, "field: %d, idx: %d, usage: %x value: %x\n",i, j, uref.usage_code, uref.value);
-+ probe_code = uref.usage_code;
-+ return 1;
-+ }
-+ }
-+ }
-+ rinfo.report_id |= HID_REPORT_ID_NEXT;
-+ rd = ioctl(fd_hidraw, HIDIOCGREPORTINFO, &rinfo);
-+ }
-+ return 2;
-+ }
-+ break;
-+ default:
-+ /* Unknown/unsupported report id.
-+ * Should not happen because remaining reports
-+ * from report descriptor seem to be unused by remote.
-+ */
-+ logprintf(LOG_ERR, "Unexpected report id %d", uref.report_id);
-+ break;
-+ }
-+ }
-+ else {
-+ /* This page reports power key
-+ * (via SystemControl SLEEP)
-+ */
-+ LOGPRINTF(3, "Same Event ...\n");
-+
-+ /* traverse report descriptor */
-+ rinfo.report_type = HID_REPORT_TYPE_INPUT;
-+ rinfo.report_id = HID_REPORT_ID_FIRST;
-+ rd = ioctl(fd_hidraw, HIDIOCGREPORTINFO, &rinfo);
-+
-+ unsigned int i,j;
-+ while (rd >= 0) {
-+ for (i = 0; i < rinfo.num_fields; i++) {
-+ finfo.report_type = rinfo.report_type;
-+ finfo.report_id = rinfo.report_id;
-+ finfo.field_index = i;
-+ ioctl(fd_hidraw, HIDIOCGFIELDINFO, &finfo);
-+ for (j = 0; j < finfo.maxusage; j++) {
-+ uref.field_index = i;
-+ uref.usage_index = j;
-+ ioctl(fd_hidraw, HIDIOCGUCODE, &uref);
-+ ioctl(fd_hidraw, HIDIOCGUSAGE, &uref);
-+
-+ if (uref.value != 0) {
-+ LOGPRINTF(3, "usage: %x value: %x\n",uref.usage_code, uref.value);
-+ //probe_code = uref.usage_code;
-+ return 0;
-+ }
-+ }
-+ }
-+ rinfo.report_id |= HID_REPORT_ID_NEXT;
-+ rd = ioctl(fd_hidraw, HIDIOCGREPORTINFO, &rinfo);
-+ }
-+ return 2;
-+ }
-+ return 0;
-+}
-+
-+static int zotac_init()
-+{
-+ logprintf(LOG_INFO, "zotac initializing '%s'", hw.device);
-+ if ((fd_hidraw = open(hw.device, O_RDONLY)) < 0) {
-+ logprintf(LOG_ERR, "unable to open '%s'", hw.device);
-+ return 0;
-+ }
-+ int flags = HIDDEV_FLAG_UREF | HIDDEV_FLAG_REPORT;
-+ if (ioctl(fd_hidraw, HIDIOCSFLAG, &flags)) {
-+ return 0;
-+ }
-+ hw.fd = fd_hidraw;
-+
-+ /* Create pipe so that events sent by the repeat thread will
-+ trigger main thread */
-+ if (pipe(fd_pipe) != 0) {
-+ logperror(LOG_ERR, "couldn't open pipe");
-+ close(fd_hidraw);
-+ return 0;
-+ }
-+ hw.fd = fd_pipe[0];
-+ /* Create thread to simulate repetitions */
-+ if (pthread_create(&repeat_thread, NULL, zotac_repeat, NULL)) {
-+ logprintf(LOG_ERR, "Could not create \"repeat thread\"");
-+ return 0;
-+ }
-+ return 1;
-+}
-+
-+static int zotac_deinit()
-+{
-+ pthread_cancel(repeat_thread);
-+ if (fd_hidraw != -1) {
-+ // Close device if it is open
-+ logprintf(LOG_INFO, "closing '%s'", hw.device);
-+ close(fd_hidraw);
-+ fd_hidraw = -1;
-+ }
-+ // Close pipe input
-+ if (fd_pipe[1] >= 0) {
-+ close(fd_pipe[1]);
-+ fd_pipe[1] = -1;
-+ }
-+ // Close pipe output
-+ if (fd_pipe[0] >= 0) {
-+ close(fd_pipe[0]);
-+ fd_pipe[0] = -1;
-+ }
-+ hw.fd = -1;
-+ return 1;
-+}
-+
-+/**
-+ * Runtime that reads device, forwards codes to main thread
-+ * and simulates repetitions.
-+ */
-+static void *zotac_repeat()
-+{
-+ int repeat_count = 0;
-+ unsigned current_code;
-+ int ret;
-+ int sel;
-+ fd_set files;
-+ struct timeval delay;
-+ int pressed = 0;
-+ int fd = fd_pipe[1];
-+
-+ while (1) {
-+ // Initialize set to monitor device's events
-+ FD_ZERO(&files);
-+ FD_SET(fd_hidraw, &files);
-+ if (pressed) {
-+ sel = select(FD_SETSIZE, &files, NULL, NULL, &delay);
-+ } else {
-+ sel = select(FD_SETSIZE, &files, NULL, NULL, NULL);
-+ }
-+
-+ switch (sel) {
-+ case 1:
-+ // Data ready in device's file
-+ ret = zotac_getcode();
-+
-+ if (ret < 0) {
-+ // Error
-+ logprintf(LOG_ERR, "(%s) Could not read %s", __FUNCTION__, hw.device);
-+ goto exit_loop;
-+ }
-+ if (ret == 1) {
-+ // Key code : forward it to main thread
-+ pressed = 1;
-+ repeat_count = 0;
-+ delay.tv_sec = 0;
-+ delay.tv_usec = repeat_time1_us;
-+ current_code = probe_code;
-+ } else if (ret == 2) {
-+ // Release code : stop repetitions
-+ pressed = 0;
-+ current_code = release_code;
-+ } else if (ret == 0) {
-+ continue;
-+ }
-+ break;
-+ case 0:
-+ repeat_count++;
-+ if (repeat_count >= max_repeat_count) {
-+ // Too many repetitions, something must have gone wrong
-+ logprintf(LOG_ERR,"(%s) too many repetitions", __FUNCTION__);
-+ goto exit_loop;
-+ }
-+ // Timeout : send current_code again to main
-+ // thread to simulate repetition
-+ delay.tv_sec = 0;
-+ delay.tv_usec = repeat_time2_us;
-+ break;
-+ default:
-+ // Error
-+ logprintf(LOG_ERR, "(%s) select() failed", __FUNCTION__);
-+ goto exit_loop;
-+ }
-+ // Send code to main thread through pipe
-+ write(fd, &current_code, sizeof(current_code));
-+ }
-+exit_loop:
-+
-+ // Wake up main thread with special key code
-+ current_code = remove_code;
-+ write(fd, &current_code, sizeof(current_code));
-+ return NULL;
-+}
-+
-+/*
-+* Aureal Technology ATWF@83 cheap remote
-+* specific code.
-+*/
-+
-+static char *zotac_rec(struct ir_remote *remotes)
-+{
-+ unsigned ev;
-+ int rd;
-+ last = end;
-+ gettimeofday(&start, NULL);
-+ rd = read(hw.fd, &ev, sizeof(ev));
-+
-+ if (rd == -1) {
-+ // Error
-+ logprintf(LOG_ERR, "(%s) could not read pipe", __FUNCTION__);
-+ zotac_deinit();
-+ return 0;
-+ }
-+
-+ if (ev == release_code) {
-+ // Release code
-+ main_code = 0;
-+ return 0;
-+ } else if (ev == remove_code) {
-+ // Device has been removed
-+ zotac_deinit();
-+ return 0;
-+ }
-+
-+ LOGPRINTF(1, "zotac : %x", ev);
-+ // Record the code and check for repetition
-+ if (main_code == ev) {
-+ repeat_state = RPT_YES;
-+ } else {
-+ main_code = ev;
-+ repeat_state = RPT_NO;
-+ }
-+ gettimeofday(&end, NULL);
-+ return decode_all(remotes);
-+}
-diff -rupN base/remotes/zotac/lircd.conf.zotac mod/remotes/zotac/lircd.conf.zotac
---- base/remotes/zotac/lircd.conf.zotac 1970-01-01 01:00:00.000000000 +0100
-+++ mod/remotes/zotac/lircd.conf.zotac 2013-03-21 16:31:31.343367869 +0100
-@@ -0,0 +1,77 @@
-+
-+# Please make this file available to others
-+# by sending it to <lirc@bartelmus.de>
-+#
-+# this config file was automatically generated
-+# using lirc-0.9.1-git(zotac) on Mon Apr 2 14:10:29 2012
-+#
-+# contributed by
-+#
-+# brand: zotac.conf
-+# model no. of remote control:
-+# devices being controlled by this remote:
-+#
-+
-+begin remote
-+
-+ name zotac.conf
-+ bits 32
-+ eps 30
-+ aeps 100
-+
-+ one 0 0
-+ zero 0 0
-+ gap 100123
-+ min_repeat 9
-+# suppress_repeat 9
-+# uncomment to suppress unwanted repeats
-+# toggle_bit_mask 0x7004F
-+
-+ begin codes
-+ KEY_SLEEP 0x00010082
-+ KEY_WAKEUP 0x00010083
-+ KEY_RECORD 0x000C00B2
-+ KEY_PAUSE 0x000C00B1
-+ KEY_STOP 0x000C00B7
-+ KEY_REWIND 0x000C00B4
-+ KEY_PLAY 0x000C00B0
-+ KEY_FORWARD 0x000C00B3
-+ KEY_LEFTSHIFT 0x000C00B6
-+ KEY_RIGHTSHIFT 0x000C00B5
-+ KEY_BACK 0x000C0224
-+ KEY_INFO 0x000C0209
-+ KEY_MENU 0xFFBC000D
-+ KEY_UP 0x00070052
-+ KEY_LEFT 0x00070050
-+ KEY_RIGHT 0x0007004F
-+ KEY_DOWN 0x00070051
-+ KEY_OK 0x00070028
-+ KEY_VOLUMEUP 0x000C00E9
-+ KEY_VOLUMEDOWN 0x000C00EA
-+ KEY_MUTE 0x000C00E2
-+ KEY_CHANNELUP 0x000C009C
-+ KEY_CHANNELDOWN 0x000C009D
-+ KEY_1 0x0007001E
-+ KEY_2 0x0007001F
-+ KEY_3 0x00070020
-+ KEY_4 0x00070021
-+ KEY_5 0x00070022
-+ KEY_6 0x00070023
-+ KEY_7 0x00070024
-+ KEY_8 0x00070025
-+ KEY_9 0x00070026
-+ KEY_0 0x00070027
-+ KEY_NUMERIC_STAR 0x10070025
-+ KEY_NUMERIC_POUND 0x10070020
-+ KEY_CLEAR 0x00070029
-+ KEY_TEXT 0xFFBC005A
-+ KEY_TITLE 0x000C008D
-+ KEY_ENTER 0x00070028
-+ KEY_RED 0xFFBC005B
-+ KEY_GREEN 0xFFBC005C
-+ KEY_YELLOW 0xFFBC005D
-+ KEY_BLUE 0xFFBC005E
-+ end codes
-+
-+end remote
-+
-diff -rupN base/setup.data mod/setup.data
---- base/setup.data 2011-03-25 23:28:18.000000000 +0100
-+++ mod/setup.data 2013-03-21 16:28:11.433935463 +0100
-@@ -146,6 +146,7 @@ hw_menu_entry: @hw-usb
- usb_uirt_raw: "USB-UIRT"
- mplay: "VLSystem MPlay Blast"
- mplay: "VLSystem MPlay Mini"
-+ zotac: "Zotac USB IR Receiver"
-
- param_type: \
- act200l \
-@@ -260,7 +261,8 @@ param_type: \
- ttusbir \
- tvbox \
- udp \
-- wpc8769l
-+ wpc8769l \
-+ zotac
- none:
-
- default_param: \
-@@ -331,7 +333,8 @@ default_param: \
- ttusbir \
- tvbox \
- udp \
-- wpc8769l
-+ wpc8769l \
-+ zotac
- none:
-
- default_param: \
diff --git a/app-misc/lirc/files/lirc-0.9.0-atiusb_kfifo.patch b/app-misc/lirc/files/lirc-0.9.0-atiusb_kfifo.patch
deleted file mode 100644
index 32edb24..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-atiusb_kfifo.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/drivers/lirc_atiusb/lirc_atiusb.c 2012-07-17 16:04:39.000000000 -0400
-+++ b/drivers/lirc_atiusb/lirc_atiusb.c 2012-07-17 16:19:06.000000000 -0400
-@@ -1050,7 +1050,11 @@
- goto new_irctl_failure_check;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
- if (lirc_buffer_init(driver->rbuf, dclen, 1)) {
-+#else
-+ if (lirc_buffer_init(driver->rbuf, dclen, 2)) {
-+#endif
- mem_failure = 4;
- goto new_irctl_failure_check;
- }
diff --git a/app-misc/lirc/files/lirc-0.9.0-fixed-font.patch b/app-misc/lirc/files/lirc-0.9.0-fixed-font.patch
deleted file mode 100644
index fd122e7..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-fixed-font.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/tools/xmode2.c 2011-03-25 23:28:18.000000000 +0100
-+++ b/tools/xmode2.c 2012-07-29 19:36:34.972246587 +0200
-@@ -69,7 +69,7 @@
- Window w0, w1; /*w0 = root */
- char w1_wname[] = "xmode2";
- char w1_iname[] = "xmode2";
--char font1_name[] = "-*-Courier-medium-r-*-*-8-*-*-m-*-iso8859-1";
-+char font1_name[] = "fixed";
-
- int w1_x = 0, w1_y = 0;
- unsigned int w1_w = 640, w1_h = 480, w1_border = 0;
-@@ -201,7 +201,7 @@
- printf("coudn't allocate blue color\n");
- f1_str = XLoadQueryFont(d1, font1_name);
- if (f1_str == NULL) {
-- printf("could't load font\n");
-+ printf("couldn't load font\n");
- exit(EXIT_FAILURE);
- }
-
diff --git a/app-misc/lirc/files/lirc-0.9.0-kernel-2.6.39-fixes.patch b/app-misc/lirc/files/lirc-0.9.0-kernel-2.6.39-fixes.patch
deleted file mode 100644
index 6247370..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-kernel-2.6.39-fixes.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -u a/drivers/lirc_atiusb/lirc_atiusb.c b/drivers/lirc_atiusb/lirc_atiusb.c
---- a/drivers/lirc_atiusb/lirc_atiusb.c
-+++ b/drivers/lirc_atiusb/lirc_atiusb.c
-@@ -48,7 +48,9 @@
- #include <linux/slab.h>
- #include <linux/module.h>
- #include <linux/kmod.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
- #include <linux/smp_lock.h>
-+#endif
- #include <linux/completion.h>
- #include <linux/uaccess.h>
- #include <linux/usb.h>
-diff -u a/drivers/lirc_i2c/lirc_i2c.c b/drivers/lirc_i2c/lirc_i2c.c
---- a/drivers/lirc_i2c/lirc_i2c.c
-+++ b/drivers/lirc_i2c/lirc_i2c.c
-@@ -555,8 +555,8 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
- kfree(ir);
- return -EINVAL;
- }
-- printk(KERN_INFO "lirc_i2c: chip 0x%x found @ 0x%02x (%s)\n",
-- adap->id, addr, ir->c.name);
-+ printk(KERN_INFO "lirc_i2c: chip found @ 0x%02x (%s)\n",
-+ addr, ir->c.name);
-
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
- /* register device */
-diff -u a/drivers/lirc_wpc8769l/lirc_wpc8769l.c b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
---- a/drivers/lirc_wpc8769l/lirc_wpc8769l.c
-+++ b/drivers/lirc_wpc8769l/lirc_wpc8769l.c
-@@ -361,14 +361,22 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs)
- size = count << 3;
-
- ldata = (unsigned long *) data_buf;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
- next_one = generic_find_next_le_bit(ldata, size, 0);
-+#else
-+ next_one = find_next_zero_bit_le(ldata, size, 0);
-+#endif
-
- if (next_one > 0)
- put_pulse_bit(next_one
- * WPC8769L_USECS_PER_BIT);
-
- while (next_one < size) {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
- next_zero = generic_find_next_zero_le_bit(ldata,
-+#else
-+ next_zero = find_next_zero_bit_le(ldata,
-+#endif
- size, next_one + 1);
-
- put_space_bit(
-@@ -376,7 +384,11 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs)
- * WPC8769L_USECS_PER_BIT);
-
- if (next_zero < size) {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
- next_one = generic_find_next_le_bit(ldata,
-+#else
-+ next_one = find_next_bit_le(ldata,
-+#endif
- size, next_zero + 1);
-
- put_pulse_bit(
---
-1.7.5.4
diff --git a/app-misc/lirc/files/lirc-0.9.0-kernel-3.3.0-fixes.patch b/app-misc/lirc/files/lirc-0.9.0-kernel-3.3.0-fixes.patch
deleted file mode 100644
index 9b7d3ef..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-kernel-3.3.0-fixes.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -ur drivers/lirc_serial/lirc_serial.c drivers.new/lirc_serial/lirc_serial.c
---- drivers/lirc_serial/lirc_serial.c 2011-03-25 18:28:18.000000000 -0400
-+++ drivers.new/lirc_serial/lirc_serial.c 2012-10-24 14:32:14.000000000 -0400
-@@ -66,7 +66,12 @@
- #include <linux/poll.h>
- #include <linux/platform_device.h>
-
-+#include "drivers/kcompat.h"
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)
-+#include <asm/switch_to.h>
-+#else
- #include <asm/system.h>
-+#endif
- #include <linux/io.h>
- #include <linux/irq.h>
- #include <linux/fcntl.h>
-@@ -80,7 +85,6 @@
- #define UART_IE_IXP42X_UUE 0x40 /* IXP42X UART Unit enable */
- #define UART_IE_IXP42X_RTOIE 0x10 /* IXP42X Receiver Data Timeout int.enable */
-
--#include "drivers/kcompat.h"
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
- #include <media/lirc.h>
- #include <media/lirc_dev.h>
-diff -ur drivers/lirc_sir/lirc_sir.c drivers.new/lirc_sir/lirc_sir.c
---- drivers/lirc_sir/lirc_sir.c 2011-03-25 18:28:18.000000000 -0400
-+++ drivers.new/lirc_sir/lirc_sir.c 2012-10-24 14:32:46.000000000 -0400
-@@ -59,7 +59,14 @@
- #include <linux/mm.h>
- #include <linux/delay.h>
- #include <linux/poll.h>
-+
-+#include "drivers/kcompat.h"
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)
-+#include <asm/switch_to.h>
-+#else
- #include <asm/system.h>
-+#endif
-+
- #include <linux/io.h>
- #include <asm/irq.h>
- #include <linux/fcntl.h>
-@@ -74,7 +81,6 @@
-
- #include <linux/timer.h>
-
--#include "drivers/kcompat.h"
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
- #include <media/lirc.h>
- #include <media/lirc_dev.h>
diff --git a/app-misc/lirc/files/lirc-0.9.0-kernel-3.5-err-fix.patch b/app-misc/lirc/files/lirc-0.9.0-kernel-3.5-err-fix.patch
deleted file mode 100644
index b06d94e..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-kernel-3.5-err-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/drivers/kcompat.h 2011-03-25 18:28:18.000000000 -0400
-+++ b/drivers/kcompat.h 2012-11-27 13:37:55.000000000 -0500
-@@ -136,4 +136,9 @@
- )
- #endif
-
-+#ifndef err
-+#define err(format, arg...) \
-+ printk(KERN_ERR KBUILD_MODNAME ": " format "\n", ##arg)
-+#endif
-+
- #endif /* _KCOMPAT_H */
diff --git a/app-misc/lirc/files/lirc-0.9.0-kernel-3.8-fixes.patch b/app-misc/lirc/files/lirc-0.9.0-kernel-3.8-fixes.patch
deleted file mode 100644
index bd11b61..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-kernel-3.8-fixes.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -Naur lirc-0.9.0/drivers/lirc_serial/lirc_serial.c lirc-0.9.0.new/drivers/lirc_serial/lirc_serial.c
---- lirc-0.9.0/drivers/lirc_serial/lirc_serial.c 2013-05-24 11:58:31.017566567 -0400
-+++ lirc-0.9.0.new/drivers/lirc_serial/lirc_serial.c 2013-05-24 12:00:38.733568898 -0400
-@@ -1107,12 +1107,12 @@
-
- static struct platform_device *lirc_serial_dev;
-
--static int __devinit lirc_serial_probe(struct platform_device *dev)
-+static int lirc_serial_probe(struct platform_device *dev)
- {
- return 0;
- }
-
--static int __devexit lirc_serial_remove(struct platform_device *dev)
-+static int lirc_serial_remove(struct platform_device *dev)
- {
- return 0;
- }
-@@ -1163,7 +1163,7 @@
-
- static struct platform_driver lirc_serial_driver = {
- .probe = lirc_serial_probe,
-- .remove = __devexit_p(lirc_serial_remove),
-+ .remove = lirc_serial_remove,
- .suspend = lirc_serial_suspend,
- .resume = lirc_serial_resume,
- .driver = {
-diff -Naur lirc-0.9.0/drivers/lirc_sir/lirc_sir.c lirc-0.9.0.new/drivers/lirc_sir/lirc_sir.c
---- lirc-0.9.0/drivers/lirc_sir/lirc_sir.c 2013-05-24 11:58:31.017566567 -0400
-+++ lirc-0.9.0.new/drivers/lirc_sir/lirc_sir.c 2013-05-24 12:00:38.733568898 -0400
-@@ -1296,19 +1296,19 @@
- return 0;
- }
-
--static int __devinit lirc_sir_probe(struct platform_device *dev)
-+static int lirc_sir_probe(struct platform_device *dev)
- {
- return 0;
- }
-
--static int __devexit lirc_sir_remove(struct platform_device *dev)
-+static int lirc_sir_remove(struct platform_device *dev)
- {
- return 0;
- }
-
- static struct platform_driver lirc_sir_driver = {
- .probe = lirc_sir_probe,
-- .remove = __devexit_p(lirc_sir_remove),
-+ .remove = lirc_sir_remove,
- .driver = {
- .name = "lirc_sir",
- .owner = THIS_MODULE,
-diff -Naur lirc-0.9.0/drivers/lirc_wpc8769l/lirc_wpc8769l.c lirc-0.9.0.new/drivers/lirc_wpc8769l/lirc_wpc8769l.c
---- lirc-0.9.0/drivers/lirc_wpc8769l/lirc_wpc8769l.c 2013-05-24 11:58:30.974566567 -0400
-+++ lirc-0.9.0.new/drivers/lirc_wpc8769l/lirc_wpc8769l.c 2013-05-24 12:00:38.734568898 -0400
-@@ -942,12 +942,12 @@
- #ifdef MODULE
- static struct platform_device *lirc_wpc8769l_platform_dev;
-
--static int __devinit lirc_wpc8769l_probe(struct platform_device *dev)
-+static int lirc_wpc8769l_probe(struct platform_device *dev)
- {
- return 0;
- }
-
--static int __devexit lirc_wpc8769l_remove(struct platform_device *dev)
-+static int lirc_wpc8769l_remove(struct platform_device *dev)
- {
- return 0;
- }
-@@ -975,7 +975,7 @@
-
- static struct platform_driver lirc_wpc8769l_platform_driver = {
- .probe = lirc_wpc8769l_probe,
-- .remove = __devexit_p(lirc_wpc8769l_remove),
-+ .remove = lirc_wpc8769l_remove,
- .suspend = lirc_wpc8769l_suspend,
- .resume = lirc_wpc8769l_resume,
- .driver = {
diff --git a/app-misc/lirc/files/lirc-0.9.0-usb_irtoy.patch b/app-misc/lirc/files/lirc-0.9.0-usb_irtoy.patch
deleted file mode 100644
index d7c71a2..0000000
--- a/app-misc/lirc/files/lirc-0.9.0-usb_irtoy.patch
+++ /dev/null
@@ -1,772 +0,0 @@
-diff --git c/configure.ac w/configure.ac
-index 052908b..2cd46ff 100644
---- c/configure.ac
-+++ w/configure.ac
-@@ -154,6 +154,7 @@ possible_drivers="(none) \
- (uirt2) \
- (uirt2_raw) \
- (usb_uirt_raw) \
-+ (usb_irtoy) \
- (usbx) \
- (udp)"
-
-@@ -446,7 +447,7 @@ AC_ARG_WITH(driver,
- srm7500libusb, tekram,
- tekram_bt829, tira, tira_raw, ttusbir,
- tuxbox, tvbox, udp, uirt2, uirt2_raw,
-- usb_uirt_raw, usbx, wpc8769l, zotac],
-+ usb_uirt_raw, usb_irtoy, usbx, wpc8769l, zotac],
- driver=${withval},
- driver="unset"
- )
-@@ -680,6 +681,9 @@ if test "$driver" = "userspace" -o "$driver" = "all"; then
- uirt2_raw|usb_uirt_raw)
- hw_module="${hw_module} hw_uirt2_raw.o hw_uirt2_common.o serial.o receive.o transmit.o"
- ;;
-+ usb_irtoy)
-+ hw_module="${hw_module} hw_usbirtoy.o serial.o receive.o transmit.o"
-+ ;;
- usbx)
- hw_module="${hw_module} hw_usbx.o serial.o"
- ;;
-@@ -1391,6 +1395,11 @@ if test "$driver" = "uirt2_raw"; then
- hw_module="hw_uirt2_raw.o hw_uirt2_common.o serial.o receive.o transmit.o"
- HW_DEFAULT="hw_uirt2_raw"
- fi
-+if test "$driver" = "usb_irtoy"; then
-+ lirc_driver="none"
-+ hw_module="hw_usbirtoy.o serial.o receive.o transmit.o"
-+ HW_DEFAULT="hw_usbirtoy"
-+fi
- if test "$driver" = "usb_uirt_raw"; then
- lirc_driver="none"
- hw_module="hw_uirt2_raw.o hw_uirt2_common.o serial.o receive.o transmit.o"
-diff --git c/daemons/hw-types.c w/daemons/hw-types.c
-index 0536ea2..b11cbdf 100644
---- c/daemons/hw-types.c
-+++ w/daemons/hw-types.c
-@@ -58,6 +58,7 @@ extern struct hardware hw_udp;
- extern struct hardware hw_uirt2;
- extern struct hardware hw_uirt2_raw;
- extern struct hardware hw_usb_uirt_raw;
-+extern struct hardware hw_usbirtoy;
- extern struct hardware hw_usbx;
-
- #ifndef HW_DEFAULT
-diff --git c/daemons/hw_usbirtoy.c w/daemons/hw_usbirtoy.c
-new file mode 100644
-index 0000000..ed2df85
---- /dev/null
-+++ w/daemons/hw_usbirtoy.c
-@@ -0,0 +1,607 @@
-+/****************************************************************************
-+ ** hw_usbirtoy.c **********************************************************
-+ ****************************************************************************
-+ *
-+ * Routines for USB Infrared Toy receiver/transmitter in sampling mode
-+ *
-+ * Copyright (C) 2011 Peter Kooiman <pkooiman@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+ #include <config.h>
-+#endif
-+
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <limits.h>
-+#include <signal.h>
-+#include <sys/stat.h>
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+#include <errno.h>
-+
-+
-+#include "hardware.h"
-+#include "serial.h"
-+#include "ir_remote.h"
-+#include "lircd.h"
-+#include "receive.h"
-+#include "transmit.h"
-+
-+#define IRTOY_MINFWVERSION 20
-+
-+#define IRTOY_UNIT 21.3333
-+#define IRTOY_LONGSPACE 1000000
-+
-+
-+const unsigned char IRTOY_COMMAND_TXSTART[] = {0x24, 0x25, 0x26, 0x03};
-+#define IRTOY_COMMAND_RESET 0
-+#define IRTOY_COMMAND_SMODE_ENTER 's'
-+#define IRTOY_COMMAND_VERSION 'v'
-+
-+#define IRTOY_REPLY_XMITCOUNT 't'
-+#define IRTOY_REPLY_XMITSUCCESS 'C'
-+#define IRTOY_REPLY_VERSION 'V'
-+#define IRTOY_REPLY_SAMPLEMODEPROTO 'S'
-+
-+#define IRTOY_LEN_XMITRES 4
-+#define IRTOY_LEN_VERSION 4
-+#define IRTOY_LEN_SAMPLEMODEPROTO 3
-+
-+#define IRTOY_TIMEOUT_READYFORDATA 1000000
-+#define IRTOY_TIMEOUT_FLUSH 20000
-+#define IRTOY_TIMEOUT_SMODE_ENTER 500000
-+#define IRTOY_TIMEOUT_VERSION 500000
-+
-+
-+struct tag_irtoy_t {
-+ int hwVersion;
-+ int swVersion;
-+ int protoVersion;
-+ int fd;
-+ int awaitingNewSig;
-+ int pulse;
-+};
-+
-+typedef struct tag_irtoy_t irtoy_t;
-+
-+static irtoy_t *dev;
-+
-+unsigned char rawSB[WBUF_SIZE * 2 + 2];
-+
-+/* exported functions */
-+static int irtoy_init(void);
-+static int irtoy_deinit(void);
-+static int irtoy_send(struct ir_remote *remote, struct ir_ncode *code);
-+static char *irtoy_rec(struct ir_remote *remotes);
-+static int irtoy_decode(struct ir_remote *remote, ir_code * prep, ir_code * codep, ir_code * postp,
-+ int *repeat_flagp, lirc_t * min_remaining_gapp, lirc_t * max_remaining_gapp);
-+static lirc_t irtoy_readdata(lirc_t timeout);
-+
-+
-+struct hardware hw_usbirtoy = {
-+#ifndef LIRC_IRTTY
-+ "/dev/ttyACM0",
-+#else
-+ LIRC_IRTTY, /* default device */
-+#endif
-+ -1, /* fd */
-+ LIRC_CAN_REC_MODE2 | LIRC_CAN_SEND_PULSE, /* features */
-+ LIRC_MODE_PULSE, /* send_mode */
-+ LIRC_MODE_MODE2, /* rec_mode */
-+ 0, /* code_length */
-+ irtoy_init, /* init_func */
-+ irtoy_deinit, /* deinit_func */
-+ irtoy_send, /* send_func */
-+ irtoy_rec, /* rec_func */
-+ irtoy_decode, /* decode_func */
-+ NULL, /* ioctl_func */
-+ irtoy_readdata, /* readdata */
-+ "usb_irtoy"
-+};
-+
-+
-+static int irtoy_decode(struct ir_remote *remote, ir_code * prep, ir_code * codep, ir_code * postp,
-+ int *repeat_flagp, lirc_t * min_remaining_gapp, lirc_t * max_remaining_gapp)
-+{
-+ int res;
-+
-+ LOGPRINTF(1, "irtoy_decode: enter");
-+
-+ res = receive_decode(remote, prep, codep, postp, repeat_flagp, min_remaining_gapp, max_remaining_gapp);
-+
-+ LOGPRINTF(1, "irtoy_decode: %d", res);
-+
-+ return res;
-+}
-+
-+
-+
-+
-+static ssize_t read_with_timeout(int fd, void *buf, size_t count, long to_usec)
-+{
-+ ssize_t rc;
-+ size_t numread = 0;
-+ struct timeval timeout;
-+ fd_set fds;
-+
-+ timeout.tv_sec = 0;
-+ timeout.tv_usec = to_usec;
-+
-+ rc = read(fd, (char *) buf, count);
-+
-+ if (rc > 0) {
-+ numread += rc;
-+ }
-+
-+ while ((rc == -1 && errno == EAGAIN) || (rc >= 0 && numread < count)) {
-+ FD_ZERO(&fds);
-+ FD_SET(fd, &fds);
-+
-+ rc = select(fd + 1, &fds, NULL, NULL, &timeout);
-+
-+ if (rc == 0) {
-+ /* timeout */
-+ break;
-+ } else if (rc == -1) {
-+ /* continue for EAGAIN case */
-+ continue;
-+ }
-+
-+ rc = read(fd, ((char *)buf) + numread, count - numread);
-+
-+ if (rc > 0) {
-+ numread += rc;
-+ }
-+
-+ }
-+
-+ return(numread == 0) ? -1 : numread;
-+}
-+
-+
-+static int irtoy_readflush(irtoy_t * dev, long timeout)
-+{
-+ int res;
-+ char c;
-+
-+ while ((res = read_with_timeout(dev->fd, &c, 1, timeout)) == 1)
-+ ;
-+
-+ if (res != 0)
-+ return -1;
-+ else
-+ return 0;
-+}
-+
-+static lirc_t irtoy_read(irtoy_t * dev, lirc_t timeout)
-+{
-+
-+ lirc_t data;
-+ int res;
-+ unsigned char dur[2];
-+
-+ if (!waitfordata(timeout))
-+ return 0;
-+
-+ // lircd expects a space as start of the next transmission, not just at the end of the last one
-+ // irrecord however likes to see a space at the end of the signal
-+ // We remember if we saw the 0xFFFF timeout from the usbtoy and send a long space both after last signal and at start of next signal
-+ // From usb irtoy: <signal...><lastpulse> [usbtoy timeout duration] 0xFFFF [however long it takes before next signal] <firstpulse><signal..>
-+ // We return: <signal><lastpulse> [usbtoy timeout duration] LONGSPACE [however long it takes before next signal] LONGSPACE <firstpulse><signal>
-+ if (dev->awaitingNewSig) {
-+
-+ LOGPRINTF(1, "new signal after large space");
-+ dev->pulse = 1;
-+ dev->awaitingNewSig = 0;
-+ return IRTOY_LONGSPACE;
-+ }
-+
-+ res = read_with_timeout(dev->fd, dur, 2, 0);
-+
-+ if (res != 2) {
-+ logprintf(LOG_ERR, "irtoy_read: could not get 2 bytes");
-+ return 0;
-+ }
-+
-+
-+
-+ LOGPRINTF(3, "read_raw %02x%02x", dur[0], dur[1]);
-+
-+
-+ if (dur[0] == 0xff && dur[1] == 0xff) {
-+ dev->awaitingNewSig = 1;
-+ return IRTOY_LONGSPACE;
-+ }
-+
-+
-+ data = (lirc_t) (IRTOY_UNIT * (double) (256 * dur[0] + dur[1]));
-+
-+ LOGPRINTF(3, "read_raw %d", data);
-+
-+
-+ if (dev->pulse) {
-+ data = data | PULSE_BIT;
-+ }
-+
-+ dev->pulse = ! (dev->pulse);
-+
-+
-+ return data;
-+}
-+
-+static lirc_t irtoy_readdata(lirc_t timeout)
-+{
-+ lirc_t data = irtoy_read(dev, timeout);
-+
-+ if (data) {
-+ LOGPRINTF(1, "irtoy_readdata %d %d", !!(data & PULSE_BIT), data & PULSE_MASK);
-+
-+ }
-+
-+ return(data);
-+}
-+
-+static int irtoy_getversion(irtoy_t *dev)
-+{
-+ int res;
-+ unsigned char buf[16];
-+ int vNum;
-+
-+ irtoy_readflush(dev, IRTOY_TIMEOUT_FLUSH);
-+
-+
-+ buf[0] = IRTOY_COMMAND_VERSION;
-+ res = write(dev->fd, buf, 1);
-+
-+ if (res != 1) {
-+ logprintf(LOG_ERR, "irtoy_getversion: couldn't write command");
-+ return 0;
-+ }
-+
-+
-+ res = read_with_timeout(dev->fd, buf, IRTOY_LEN_VERSION, IRTOY_TIMEOUT_VERSION);
-+
-+ if (res != IRTOY_LEN_VERSION) {
-+ logprintf(LOG_ERR, "irtoy_getversion: couldn't read version");
-+ logprintf(LOG_ERR, "please make sure you are using firmware v20 or higher");
-+ return 0;
-+ }
-+
-+ buf[IRTOY_LEN_VERSION] = 0;
-+
-+ LOGPRINTF(1, "irtoy_getversion: Got version %s", buf);
-+
-+ if (buf[0] != IRTOY_REPLY_VERSION) {
-+ logprintf(LOG_ERR, "irtoy_getversion: invalid response %02X", buf[0]);
-+ logprintf(LOG_ERR, "please make sure you are using firmware v20 or higher");
-+ return 0;
-+ }
-+
-+ vNum = atoi(buf + 1);
-+ dev->hwVersion = vNum / 100;
-+ dev->swVersion = vNum % 100;
-+ return 1;
-+}
-+
-+static int irtoy_reset(irtoy_t *dev)
-+{
-+ int res;
-+ unsigned char buf[16];
-+
-+ buf[0] = IRTOY_COMMAND_RESET;
-+ res = write(dev->fd, buf, 1);
-+
-+ if (res != 1) {
-+ logprintf(LOG_ERR, "irtoy_reset: couldn't write command");
-+ return 0;
-+ }
-+
-+ irtoy_readflush(dev, IRTOY_TIMEOUT_FLUSH);
-+
-+ return 1;
-+}
-+
-+static int irtoy_enter_samplemode(irtoy_t *dev)
-+{
-+
-+ int res;
-+ unsigned char buf[16];
-+
-+ buf[0] = IRTOY_COMMAND_SMODE_ENTER;
-+ res = write(dev->fd, buf, 1);
-+
-+ if (res != 1) {
-+ logprintf(LOG_ERR, "irtoy_enter_samplemode: couldn't write command");
-+ return 0;
-+ }
-+
-+
-+ res = read_with_timeout(dev->fd, buf, IRTOY_LEN_SAMPLEMODEPROTO, IRTOY_TIMEOUT_SMODE_ENTER);
-+
-+ if (res != IRTOY_LEN_SAMPLEMODEPROTO) {
-+ logprintf(LOG_ERR, "irtoy_enter_samplemode: couldn't read command result");
-+ return 0;
-+ }
-+
-+ buf[IRTOY_LEN_SAMPLEMODEPROTO] = 0;
-+
-+ if (buf[0] != IRTOY_REPLY_SAMPLEMODEPROTO) {
-+ logprintf(LOG_ERR, "irtoy_enter_samplemode: invalid response %02X", buf[0]);
-+ return 0;
-+ }
-+
-+
-+ LOGPRINTF(1, "irtoy_reset: Got protocol %s", buf);
-+
-+ dev->protoVersion = atoi(buf + 1);
-+ return 1;
-+}
-+
-+
-+static irtoy_t *irtoy_hw_init(int fd)
-+{
-+
-+
-+ irtoy_t *dev = (irtoy_t *) malloc(sizeof(irtoy_t));
-+
-+ if (dev == NULL) {
-+ logprintf(LOG_ERR, "irtoy_init: out of memory");
-+ return NULL;
-+ }
-+
-+ memset(dev, 0, sizeof(irtoy_t));
-+
-+ dev->awaitingNewSig = 1;
-+ dev->fd = fd;
-+ dev->pulse = 1;
-+
-+ irtoy_readflush(dev, IRTOY_TIMEOUT_FLUSH);
-+
-+ if (!irtoy_reset(dev) || !irtoy_getversion(dev) || !irtoy_enter_samplemode(dev)) {
-+ free(dev);
-+ dev = NULL;
-+ return NULL;
-+ }
-+
-+ return dev;
-+}
-+
-+
-+
-+
-+static int irtoy_init(void)
-+{
-+
-+
-+
-+ if (!tty_create_lock(hw.device)) {
-+ logprintf(LOG_ERR, "usb_irtoy: could not create lock files");
-+ return(0);
-+ }
-+
-+ if ((hw.fd = open(hw.device, O_RDWR | O_NONBLOCK | O_NOCTTY)) < 0) {
-+ logprintf(LOG_ERR, "usb_irtoy: could not open %s", hw.device);
-+ tty_delete_lock();
-+ return(0);
-+ }
-+
-+ if (!tty_reset(hw.fd)) {
-+ logprintf(LOG_ERR, "usb_irtoy: could not reset tty");
-+ close(hw.fd);
-+ tty_delete_lock();
-+ return(0);
-+ }
-+
-+
-+ if (!tty_setbaud(hw.fd, 115200)) {
-+ logprintf(LOG_ERR, "usb_irtoy: could not set baud rate");
-+ close(hw.fd);
-+ tty_delete_lock();
-+ return(0);
-+ }
-+
-+ if (!tty_setcsize(hw.fd, 8)) {
-+ logprintf(LOG_ERR, "usb_irtoy: could not set csize");
-+ close(hw.fd);
-+ tty_delete_lock();
-+ return(0);
-+ }
-+
-+ if (!tty_setrtscts(hw.fd, 1)) {
-+ logprintf(LOG_ERR, "usb_irtoy: could not enable hardware flow");
-+ close(hw.fd);
-+ tty_delete_lock();
-+ return(0);
-+ }
-+
-+ if ((dev = irtoy_hw_init(hw.fd)) == NULL) {
-+ logprintf(LOG_ERR, "usb_irtoy: No USB Irtoy device found at %s", hw.device);
-+ close(hw.fd);
-+ tty_delete_lock();
-+ return(0);
-+ }
-+
-+ LOGPRINTF(1, "Version hw %d, sw %d, protocol %d\n", dev->hwVersion, dev->swVersion, dev->protoVersion);
-+
-+ if (dev->swVersion < IRTOY_MINFWVERSION) {
-+ logprintf(LOG_ERR, "usb_irtoy: Need firmware V%02d or higher, this firmware: %02d", IRTOY_MINFWVERSION, dev->swVersion);
-+ free(dev);
-+ return 0;
-+ }
-+
-+ init_rec_buffer();
-+ init_send_buffer();
-+
-+
-+
-+ return(1);
-+}
-+
-+static int irtoy_deinit(void)
-+{
-+
-+ // IMPORTANT do not remove this reset. it is vital to return the irtoy to IRMAN mode.
-+ // If we leave the irtoy in sample mode while no-one has the tty open, the linux cdc_acm driver will fail on the next open.
-+ // This is apparently due to data being sent while the tty is not open and fairly well known (google for "tty_port_close_start: tty->count = 1 port count = 0")
-+ // IRMAN mode will wait until a signal is actually read before sending the next one, while sample mode will keep streaming (and under fluorescent light it WILL stream..)
-+ // triggering the problem
-+ irtoy_reset(dev);
-+
-+ free(dev);
-+ dev = NULL;
-+
-+
-+ close(hw.fd);
-+ hw.fd = -1;
-+ tty_delete_lock();
-+ return 1;
-+}
-+
-+static char *irtoy_rec(struct ir_remote *remotes)
-+{
-+ LOGPRINTF(1, "irtoy_raw_rec");
-+
-+
-+ if (!clear_rec_buffer())
-+ return(NULL);
-+
-+ return decode_all(remotes);
-+
-+
-+}
-+
-+static int irtoy_send_double_buffered(unsigned char * signals, int length)
-+{
-+ int numToXmit = length;
-+ int numThisTime;
-+ int res;
-+ unsigned char irToyBufLen;
-+ unsigned char *txPtr;
-+ unsigned char reply[16];
-+ int irtoyXmit;
-+
-+
-+ res = write(dev->fd, IRTOY_COMMAND_TXSTART, sizeof(IRTOY_COMMAND_TXSTART));
-+
-+ if (res != sizeof(IRTOY_COMMAND_TXSTART)) {
-+ logprintf(LOG_ERR, "irtoy_send: couldn't write command");
-+ return 0;
-+ }
-+
-+ res = read_with_timeout(dev->fd, &irToyBufLen, 1, IRTOY_TIMEOUT_READYFORDATA);
-+
-+ if (res != 1) {
-+ logprintf(LOG_ERR, "irtoy_send: couldn't read command result");
-+ return -1;
-+ }
-+
-+ LOGPRINTF(1, "irtoy ready for %d bytes\n", irToyBufLen);
-+
-+ txPtr = signals;
-+
-+ while (numToXmit) {
-+ numThisTime = (numToXmit < irToyBufLen) ? numToXmit : irToyBufLen;
-+ res = write(dev->fd, txPtr, numThisTime);
-+
-+ if (res != numThisTime) {
-+ logprintf(LOG_ERR, "irtoy_send: couldn't write command");
-+ return 0;
-+ }
-+
-+ txPtr += numThisTime;
-+ numToXmit -= numThisTime;
-+
-+
-+ res = read_with_timeout(dev->fd, &irToyBufLen, 1, IRTOY_TIMEOUT_READYFORDATA);
-+
-+ if (res != 1) {
-+ logprintf(LOG_ERR, "irtoy_send: couldn't read command result");
-+ return -1;
-+ }
-+
-+ LOGPRINTF(1, "irtoy ready for %d bytes\n", irToyBufLen);
-+
-+
-+ }
-+
-+
-+ res = read_with_timeout(dev->fd, reply, IRTOY_LEN_XMITRES, IRTOY_TIMEOUT_READYFORDATA);
-+
-+ if (res != IRTOY_LEN_XMITRES) {
-+ logprintf(LOG_ERR, "irtoy_send: couldn't read command result");
-+ return -1;
-+ }
-+
-+ LOGPRINTF(1, "%c %02X %02X %c\n", reply[0], reply[1], reply[2], reply[3]);
-+
-+ if (reply[0] != IRTOY_REPLY_XMITCOUNT) {
-+ logprintf(LOG_ERR, "irtoy_send: invalid byte count indicator received: %02X", reply[0]);
-+ return 0;
-+ }
-+
-+ irtoyXmit = (reply[1] << 8) | reply[2];
-+ if (length != irtoyXmit) {
-+ logprintf(LOG_ERR, "irtoy_send: incorrect byte count received: %d expected: %d", irtoyXmit, length);
-+ return 0;
-+ }
-+
-+ if (reply[3] != IRTOY_REPLY_XMITSUCCESS) {
-+ logprintf(LOG_ERR, "irtoy_send: received error status %02X", reply[3]);
-+ return 0;
-+ }
-+
-+ return 1;
-+
-+}
-+
-+static int irtoy_send(struct ir_remote *remote, struct ir_ncode *code)
-+{
-+ int length;
-+ lirc_t *signals;
-+ int res = 0;
-+
-+ int numToXmit;
-+ int i;
-+ lirc_t val;
-+
-+
-+ if (!init_send(remote, code)) {
-+ return 0;
-+ }
-+
-+ length = send_buffer.wptr;
-+ signals = send_buffer.data;
-+
-+ for (i = 0; i < length; i++) {
-+ val = (lirc_t)(((double) signals[i]) / IRTOY_UNIT);
-+ rawSB[2*i] = val >> 8;
-+ rawSB[2*i + 1] = val & 0xFF;
-+ }
-+
-+ rawSB[2 * length] = 0xFF;
-+ rawSB[2 * length + 1] = 0xFF;
-+
-+ numToXmit = 2 * length + 2;
-+ return irtoy_send_double_buffered(rawSB, numToXmit);
-+}
-+
-+
-diff --git c/setup.data w/setup.data
-index 407d6b2..99be615 100644
---- c/setup.data
-+++ w/setup.data
-@@ -119,6 +119,7 @@ hw_menu_entry: @hw-usb
- awlibusb: "Awox RF/IR Remote (userspace)"
- sb0540: "Creative USB IR Receiver (SB0540)"
- commandir: "CommandIR Multi-IR Transceiver (userspace)"
-+ usb_irtoy: "Dangerous Prototypes USB Infrared Toy"
- dfclibusb: "DFC USB InfraRed Remote Control (userspace)"
- sasem: "Dign HV5 HTPC IR/VFD Module"
- dvico: "DViCO USB Remote"
-@@ -147,6 +148,7 @@ hw_menu_entry: @hw-usb
- mplay: "VLSystem MPlay Blast"
- mplay: "VLSystem MPlay Mini"
-
-+
- param_type: \
- act200l \
- act220l \
-@@ -190,6 +192,9 @@ param_type: \
- usbx
- ttyUSB:
-
-+param_type: usb_irtoy
-+ ttyACM:
-+
- param_type: \
- adaptec \
- alsa_usb \
-@@ -390,6 +395,10 @@ default_param: \
- usbx
- ttyUSB1:
-
-+default_param: usb_irtoy
-+ ttyACM1:
-+
-+
- remote: \
- hauppauge \
- hauppauge_dvb \
-@@ -424,6 +433,7 @@ remote: \
- ttusbir \
- uirt2_raw \
- udp \
-+ usb_irtoy \
- usb_uirt_raw \
- wpc8769l
- any:
-diff --git c/setup.sh w/setup.sh
-index 342f32d..a3546b5 100755
---- c/setup.sh
-+++ w/setup.sh
-@@ -65,6 +65,10 @@ GetSelectedDriver ()
- elif test "$DRIVER_PARAMETER" = "ttyUSB2"; then COM2="on"; IRTTY="/dev/ttyUSB1"; LIRC_PORT="none"; LIRC_IRQ="none"
- elif test "$DRIVER_PARAMETER" = "ttyUSB3"; then COM3="on"; IRTTY="/dev/ttyUSB2"; LIRC_PORT="none"; LIRC_IRQ="none"
- elif test "$DRIVER_PARAMETER" = "ttyUSB4"; then COM4="on"; IRTTY="/dev/ttyUSB3"; LIRC_PORT="none"; LIRC_IRQ="none"
-+ elif test "$DRIVER_PARAMETER" = "ttyACM1"; then COM1="on"; IRTTY="/dev/ttyACM0"; LIRC_PORT="none"; LIRC_IRQ="none"
-+ elif test "$DRIVER_PARAMETER" = "ttyACM2"; then COM2="on"; IRTTY="/dev/ttyACM1"; LIRC_PORT="none"; LIRC_IRQ="none"
-+ elif test "$DRIVER_PARAMETER" = "ttyACM3"; then COM3="on"; IRTTY="/dev/ttyACM2"; LIRC_PORT="none"; LIRC_IRQ="none"
-+ elif test "$DRIVER_PARAMETER" = "ttyACM4"; then COM4="on"; IRTTY="/dev/ttyACM3"; LIRC_PORT="none"; LIRC_IRQ="none"
- elif test "$DRIVER_PARAMETER" = "com1"; then COM1="on"; LIRC_PORT=$COM1_PORT; LIRC_IRQ=$COM1_IRQ
- elif test "$DRIVER_PARAMETER" = "com2"; then COM2="on"; LIRC_PORT=$COM2_PORT; LIRC_IRQ=$COM2_IRQ
- elif test "$DRIVER_PARAMETER" = "com3"; then COM3="on"; LIRC_PORT=$COM3_PORT; LIRC_IRQ=$COM3_IRQ
-@@ -207,6 +211,30 @@ SetPortAndIrq ()
- else
- return 1;
- fi
-+ elif test "$DRIVER_PARAM_TYPE" = "ttyACM"; then
-+ {
-+ dialog --clear --backtitle "$BACKTITLE" \
-+ --title "Select tty to use" \
-+ --radiolist "$SET_TTY_TEXT" 13 74 6 \
-+ 1 "/dev/ttyACM0" $COM1 \
-+ 2 "/dev/ttyACM1" $COM2 \
-+ 3 "/dev/ttyACM2" $COM3 \
-+ 4 "/dev/ttyACM3" $COM4 \
-+ 2> $TEMP
-+ }
-+ if test "$?" = "0"; then
-+ {
-+ set `cat $TEMP`
-+ if test "$1" = "1"; then DRIVER_PARAMETER="ttyACM1"
-+ elif test "$1" = "2"; then DRIVER_PARAMETER="ttyACM2"
-+ elif test "$1" = "3"; then DRIVER_PARAMETER="ttyACM3"
-+ elif test "$1" = "4"; then DRIVER_PARAMETER="ttyACM4"
-+ fi
-+ GetSelectedDriver
-+ }
-+ else
-+ return 1;
-+ fi
- fi
- return 0;
- }
-@@ -347,7 +375,7 @@ SaveConfig ()
- else echo "--without-timer \\" >>$START;
- fi
- }
-- elif test "$DRIVER_PARAM_TYPE" = "tty" -o "$DRIVER_PARAM_TYPE" = "ttyUSB" -o "$LIRC_DRIVER" = "bte"; then
-+ elif test "$DRIVER_PARAM_TYPE" = "tty" -o "$DRIVER_PARAM_TYPE" = "ttyUSB" -o "$DRIVER_PARAM_TYPE" = "ttyACM" -o "$LIRC_DRIVER" = "bte"; then
- {
- echo "--with-tty=$IRTTY \\" >>$START
- }
diff --git a/app-misc/lirc/files/lirc.service b/app-misc/lirc/files/lirc.service
deleted file mode 100644
index e184dfc..0000000
--- a/app-misc/lirc/files/lirc.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Linux Infrared Remote Control
-After=network.target
-
-[Service]
-RuntimeDirectory=lirc
-ExecStart=/usr/sbin/lircd --nodaemon --driver=default --device=/dev/lirc0
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/app-misc/lirc/files/lircd-0.8.3 b/app-misc/lirc/files/lircd-0.8.3
deleted file mode 100644
index 8cd7a0a..0000000
--- a/app-misc/lirc/files/lircd-0.8.3
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 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.3,v 1.1 2008/05/05 09:53:19 zzam Exp $
-
-PIDFILE=/var/run/${SVCNAME}.pid
-
-depend() {
- provide lirc
-}
-
-start() {
- ebegin "Starting lircd"
- start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd -- \
- -P "${PIDFILE}" ${LIRCD_OPTS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping lircd"
- start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd
- eend $?
-}
diff --git a/app-misc/lirc/files/lircd-0.8.6 b/app-misc/lirc/files/lircd-0.8.6
deleted file mode 100644
index dbf7a47..0000000
--- a/app-misc/lirc/files/lircd-0.8.6
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 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,v 1.2 2010/05/21 02:32:36 beandog 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"
- rm -f ${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 -f ${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-0.8.6-r2 b/app-misc/lirc/files/lircd-0.8.6-r2
deleted file mode 100644
index 17e45ea..0000000
--- a/app-misc/lirc/files/lircd-0.8.6-r2
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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 -qs 'lirc' /sys/class/rc/${retval}/protocols ; 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.2 b/app-misc/lirc/files/lircd.conf.2
deleted file mode 100644
index cfda2b8..0000000
--- a/app-misc/lirc/files/lircd.conf.2
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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*"
diff --git a/app-misc/lirc/files/lircd.conf.4 b/app-misc/lirc/files/lircd.conf.4
deleted file mode 100644
index f59c5f2..0000000
--- a/app-misc/lirc/files/lircd.conf.4
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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"
-
-# If running mulitple instances of lircd, the following
-# can be used to override the default socket path and
-# socket symlink
-#LIRCD_SOCKET="/var/run/lirc/lircd"
-#LIRCD_SYMLINKFILE="/dev/lircd"
-
diff --git a/app-misc/lirc/files/lircm.service b/app-misc/lirc/files/lircm.service
deleted file mode 100644
index cfd2c93..0000000
--- a/app-misc/lirc/files/lircm.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=LIRC Mouse
-Requires=lirc.service
-After=network.target lirc.service
-
-[Service]
-ExecStart=/usr/sbin/lircmd --nodaemon
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/app-misc/lirc/files/lircmd b/app-misc/lirc/files/lircmd
deleted file mode 100644
index ffd73a6..0000000
--- a/app-misc/lirc/files/lircmd
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-depend() {
- need lircd
-}
-
-start() {
- ebegin "Starting lircmd"
- start-stop-daemon --start --quiet --exec /usr/sbin/lircmd
- eend $?
-}
-
-stop() {
- ebegin "Stopping lircmd"
- start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
- eend $?
-}
diff --git a/app-misc/lirc/files/modprobed.lirc b/app-misc/lirc/files/modprobed.lirc
deleted file mode 100644
index 2ed9558..0000000
--- a/app-misc/lirc/files/modprobed.lirc
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# For first serial receivers:
-#
-#options lirc_serial irq=4 io=0x3f8
-#options lirc_sir irq=4 io=0x3f8
-
-#
-# Detach first serial port from serial-driver.
-# Use this when you have your serial-port-driver statically
-# compiled into your kernel, or as a module but loaded before
-# the lirc-module.
-#
-#install lirc_serial setserial /dev/ttyS0 uart none; modprobe --ignore-install lirc_serial
-#
-#install lirc_sir setserial /dev/ttyS0 uart none; modprobe --ignore-install lirc_sir
-
-
-#
-# For parallel receivers:
-#
-#options lirc_parallel irq=7 io=0x3bc
-
diff --git a/app-misc/lirc/files/modulesd.lirc b/app-misc/lirc/files/modulesd.lirc
deleted file mode 100644
index d1838c5..0000000
--- a/app-misc/lirc/files/modulesd.lirc
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# For first serial receivers:
-#
-#options lirc_serial irq=4 io=0x3f8
-#options lirc_sir irq=4 io=0x3f8
-
-#
-# Detach first serial port from serial-driver.
-# Use this when you have your serial-port-driver statically
-# compiled into your kernel, or as a module but loaded before
-# the lirc-module.
-#
-#pre-install lirc_serial setserial /dev/ttyS0 uart none
-#
-#pre-install lirc_sir setserial /dev/ttyS0 uart none
-
-
-#
-# For parallel receivers:
-#
-#options lirc_parallel irq=7 io=0x3bc
-
diff --git a/app-misc/lirc/lirc-0.9.0-r3.ebuild b/app-misc/lirc/lirc-0.9.0-r3.ebuild
deleted file mode 100644
index a938d98..0000000
--- a/app-misc/lirc/lirc-0.9.0-r3.ebuild
+++ /dev/null
@@ -1,424 +0,0 @@
-# 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-r2.ebuild,v 1.3 2012/09/15 15:08:36 ago Exp $
-
-EAPI=4
-
-inherit eutils linux-mod linux-info toolchain-funcs 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 hardware-carrier transmitter static-libs X"
-
-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_irtoy 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_irtoy 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 (confirmed valid for 0.9.0-r2)
- 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
-
- use lirc_devices_usb_irtoy && epatch "${FILESDIR}"/lirc-0.9.0-usb_irtoy.patch
-
- # Apply fixes for kernel-2.6.39 and above
- epatch "${FILESDIR}"/${P}-kernel-2.6.39-fixes.patch
- # Slightly massaged upstream patch to fix kfifo issues >=2.6.38
- # for bug 377033
- epatch "${FILESDIR}"/${P}-atiusb_kfifo.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_enable static-libs static) \
- $(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-r2 lircd
- newinitd "${FILESDIR}"/lircmd lircmd
- newconfd "${FILESDIR}"/lircd.conf.4 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
-
- use static-libs || rm "${D}/usr/$(get_libdir)/liblirc_client.la"
-}
-
-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"
-}
diff --git a/app-misc/lirc/lirc-0.9.0-r5.ebuild b/app-misc/lirc/lirc-0.9.0-r5.ebuild
deleted file mode 100644
index 807d5d8..0000000
--- a/app-misc/lirc/lirc-0.9.0-r5.ebuild
+++ /dev/null
@@ -1,437 +0,0 @@
-# Copyright 1999-2014 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-r5.ebuild,v 1.3 2014/03/05 15:18:20 ago Exp $
-
-EAPI=4
-
-inherit eutils linux-mod linux-info systemd toolchain-funcs 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 ~ppc64 ~x86"
-IUSE="debug doc hardware-carrier transmitter static-libs X"
-
-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_irtoy usb_uirt_raw usbx wpc8769l zotac"
-
-# 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_irtoy 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 zotac"
-
-#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
-}
-
-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
-
- use lirc_devices_usb_irtoy && epatch "${FILESDIR}"/lirc-0.9.0-usb_irtoy.patch
-
- # Apply fixes for kernel-2.6.39 and above
- epatch "${FILESDIR}"/${P}-kernel-2.6.39-fixes.patch
- # Slightly massaged upstream patch to fix kfifo issues >=2.6.38
- # for bug 377033
- epatch "${FILESDIR}"/${P}-atiusb_kfifo.patch
- # Apply fixes for kernel-3.3 and above (bug 439538)
- epatch "${FILESDIR}"/${P}-kernel-3.3.0-fixes.patch
- # Apply fix for missing err() in usb.h for kernel 3.5+ (bug 444736)
- epatch "${FILESDIR}"/${P}-kernel-3.5-err-fix.patch
- # Apply fix for missing __devinit __devexit defines in kernel 3.8+ (bug 461532)
- epatch "${FILESDIR}"/${P}-kernel-3.8-fixes.patch
- # Add support for zotac remote, bug 342848
- use lirc_devices_zotac && epatch "${FILESDIR}"/${P}-add-zotac-support.patch
- # Use fixed font
- epatch "${FILESDIR}"/${P}-fixed-font.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
-
- sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die # automake 1.13
- 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_enable static-libs static) \
- $(use_with X x) \
- ${MY_OPTS} \
- ABI="${KERNEL_ABI}" \
- ARCH="$(tc-arch-kernel)"
-}
-
-src_compile() {
- # force non-parallel make, Bug 196134 (confirmed valid for 0.9.0-r2)
- emake -j1
-
- 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-r2 lircd
- newinitd "${FILESDIR}"/lircmd lircmd
- newconfd "${FILESDIR}"/lircd.conf.4 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
-
- systemd_dounit "${FILESDIR}"/irexec.service
- systemd_dounit "${FILESDIR}"/lirc.service
- systemd_dounit "${FILESDIR}"/lircm.service
-
- 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
-
- use static-libs || rm "${D}/usr/$(get_libdir)/liblirc_client.la"
-}
-
-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"
-}
diff --git a/app-misc/lirc/lirc-0.9.0-r6.ebuild b/app-misc/lirc/lirc-0.9.0-r6.ebuild
deleted file mode 100644
index 3053d27..0000000
--- a/app-misc/lirc/lirc-0.9.0-r6.ebuild
+++ /dev/null
@@ -1,431 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-inherit eutils linux-mod linux-info systemd toolchain-funcs 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 ppc64 x86"
-IUSE="debug doc hardware-carrier transmitter static-libs X"
-
-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
-# https://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_irtoy usb_uirt_raw usbx wpc8769l zotac"
-
-# 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 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_irtoy 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 zotac"
-
-#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:0 )
- lirc_devices_all? ( dev-embedded/libftdi:0 )"
-
-# adding only run-time depends
-RDEPEND="${RDEPEND}
- 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 [[ "${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
-}
-
-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
-
- # Apply fixes for kernel-2.6.39 and above
- epatch "${FILESDIR}"/${P}-kernel-2.6.39-fixes.patch
- # Slightly massaged upstream patch to fix kfifo issues >=2.6.38
- # for bug 377033
- epatch "${FILESDIR}"/${P}-atiusb_kfifo.patch
- # Apply fixes for kernel-3.3 and above (bug 439538)
- epatch "${FILESDIR}"/${P}-kernel-3.3.0-fixes.patch
- # Apply fix for missing err() in usb.h for kernel 3.5+ (bug 444736)
- epatch "${FILESDIR}"/${P}-kernel-3.5-err-fix.patch
- # Apply fix for missing __devinit __devexit defines in kernel 3.8+ (bug 461532)
- epatch "${FILESDIR}"/${P}-kernel-3.8-fixes.patch
- # Add support for zotac remote, bug 342848
- epatch "${FILESDIR}"/${P}-add-zotac-support.patch
- # Use fixed font
- epatch "${FILESDIR}"/${P}-fixed-font.patch
-
- use lirc_devices_usb_irtoy && epatch "${FILESDIR}"/lirc-0.9.0-usb_irtoy.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
-
- sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die # automake 1.13
- 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_enable static-libs static) \
- $(use_with X x) \
- ${MY_OPTS} \
- ABI="${KERNEL_ABI}" \
- ARCH="$(tc-arch-kernel)"
-}
-
-src_compile() {
- # force non-parallel make, Bug 196134 (confirmed valid for 0.9.0-r2)
- emake -j1
-
- 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-r2 lircd
- newinitd "${FILESDIR}"/lircmd lircmd
- newconfd "${FILESDIR}"/lircd.conf.4 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
-
- systemd_dounit "${FILESDIR}"/irexec.service
- systemd_dounit "${FILESDIR}"/lirc.service
- systemd_dounit "${FILESDIR}"/lircm.service
-
- 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
-
- use static-libs || rm "${D}/usr/$(get_libdir)/liblirc_client.la"
-}
-
-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"
-}