diff options
author | 2010-04-19 17:43:21 +0300 | |
---|---|---|
committer | 2010-04-19 17:43:21 +0300 | |
commit | 16b5a27351a2b9c2ef70dd10073bdf5cada30ba3 (patch) | |
tree | 29c2fd0bbc4e5a9ec322575edca36dcac3f157d1 | |
parent | liferea-1.7.4: removed lua support, added liferea-1.6.3 bump (diff) | |
download | wish-16b5a27351a2b9c2ef70dd10073bdf5cada30ba3.tar.gz wish-16b5a27351a2b9c2ef70dd10073bdf5cada30ba3.tar.bz2 wish-16b5a27351a2b9c2ef70dd10073bdf5cada30ba3.zip |
add wine-1.1.43, add lirc-0.8.6-r3 (compiles with kernel 2.6.33+)
-rw-r--r-- | app-dicts/kbgoffice/Manifest | 2 | ||||
-rw-r--r-- | app-dicts/kbgoffice/kbgoffice-1.8_p82.ebuild | 17 | ||||
-rw-r--r-- | app-emulation/wine/Manifest | 8 | ||||
-rw-r--r-- | app-emulation/wine/files/wine-1.1.15-winegcc.patch | 55 | ||||
-rw-r--r-- | app-emulation/wine/metadata.xml | 20 | ||||
-rw-r--r-- | app-emulation/wine/wine-1.1.43.ebuild | 178 | ||||
-rw-r--r-- | app-misc/lirc/Manifest | 12 | ||||
-rw-r--r-- | app-misc/lirc/files/irexec-confd | 9 | ||||
-rwxr-xr-x | app-misc/lirc/files/irexec-initd-0.8.6-r3 | 28 | ||||
-rw-r--r-- | app-misc/lirc/files/lirc-0.8.3_pre1-remotewonderplus.patch | 26 | ||||
-rw-r--r-- | app-misc/lirc/files/lirc-0.8.4-portaudio_check.patch | 18 | ||||
-rw-r--r-- | app-misc/lirc/files/lirc-0.8.6-kernel_2.6.33_fix.patch | 269 | ||||
-rw-r--r-- | app-misc/lirc/files/lirc_i2c_r1.70_to_r1.72.patch | 76 | ||||
-rw-r--r-- | app-misc/lirc/files/lircd-0.8.6 | 39 | ||||
-rw-r--r-- | app-misc/lirc/files/lircd.conf.2 | 10 | ||||
-rwxr-xr-x | app-misc/lirc/files/lircmd | 20 | ||||
-rw-r--r-- | app-misc/lirc/files/modprobed.lirc | 22 | ||||
-rw-r--r-- | app-misc/lirc/lirc-0.8.6-r3.ebuild | 365 |
18 files changed, 1174 insertions, 0 deletions
diff --git a/app-dicts/kbgoffice/Manifest b/app-dicts/kbgoffice/Manifest new file mode 100644 index 0000000..d2532a3 --- /dev/null +++ b/app-dicts/kbgoffice/Manifest @@ -0,0 +1,2 @@ +DIST kbgoffice-1.8_p82.tar.bz2 112457 RMD160 7f6e3b59b980cfeddeb33ab37009dec8a40aea2f SHA1 e69fb6a7360fc66e972cda70c3b5310518c4fafe SHA256 d5c3591d390f05f6e7ac5c0ca2a7c1cc3beb01d92a3019103d5b822cd75eaba6 +EBUILD kbgoffice-1.8_p82.ebuild 407 RMD160 b9ba92b7dad7d96bfff58ebc5851792fec82e7a7 SHA1 5868ab85dba05ba8d00b6a3954658f9a9fc92a96 SHA256 1c92a3c42f6e8b950eb9ba2375615516a36496cb1c9c99684211cdaf933affd9 diff --git a/app-dicts/kbgoffice/kbgoffice-1.8_p82.ebuild b/app-dicts/kbgoffice/kbgoffice-1.8_p82.ebuild new file mode 100644 index 0000000..68c9387 --- /dev/null +++ b/app-dicts/kbgoffice/kbgoffice-1.8_p82.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="2" +inherit cmake-utils + +DESCRIPTION="A very nice QT based Bulgarian <=> English dictionary" +HOMEPAGE="http://bgoffice.sourceforge.net" +SRC_URI="${P}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~amd64" +IUSE="kde" + +DEPEND=">=x11-libs/qt-gui-4.6.2 + >=app-dicts/bgoffice-dictfiles-1.0" diff --git a/app-emulation/wine/Manifest b/app-emulation/wine/Manifest new file mode 100644 index 0000000..836850a --- /dev/null +++ b/app-emulation/wine/Manifest @@ -0,0 +1,8 @@ +AUX wine-1.1.15-winegcc.patch 1550 RMD160 086fbdd7dbe5da98c3457f00cb30705150d58b1f SHA1 0aa5a9d0947e15af9fe103797a0c993cbb3eedab SHA256 fcf4a0578774d817b8de094abae85e370683a77805a59efe6c5f7b8b87935de9 +DIST wine-1.1.43.tar.bz2 16760374 RMD160 043e49e12e0892bd08b4c6ba6adee267f6e8d8d3 SHA1 2f77eab13f29b7942d5507ef925c40ff1ecfd3a5 SHA256 20656ac69a628341ecce55a72d02ee93e20e0c2a4bf6df94336738f1f1ff793a +DIST wine_gecko-1.0.0-x86.cab 8119486 RMD160 57618dbffa7b7226dcd44f86c3c569ab8a5ff938 SHA1 afa22c52bca4ca77dcb9edb3c9936eb23793de01 SHA256 7ddf697677506fb164c52771864e32dd69a359ed855b2efbc51340de2376c99c +DIST winepulse-0.34-winecfg.patch 13066 RMD160 7a05298f68bbdcc80596e931c47b178484ae9c5a SHA1 1a495dd6fd93573a274d525af8b74713f57a7d18 SHA256 a2925d4a02db57ed8961b45b80a0f966fed1f499120e094156a4c51086e47cdc +DIST winepulse-0.35-configure.ac.patch 2826 RMD160 e419d43667be01af9b24a0e46822c41572a6ff9d SHA1 4943381128fd9555280884e2bb5867be4a8731d9 SHA256 837bffaaddb6b7b0a474c7262a57f12e250e135cf6228dde1a22849f66de1250 +DIST winepulse-0.36.patch 101815 RMD160 9a20076436a7e49c317bc624dd71b61c93acddff SHA1 aa6a4c9d4619f8452aad8c457c879769cab8f8fc SHA256 7508b171bfecb461ecb464426cb4bcd9c3ff77645b787fcbf61e27dd34fe1b05 +EBUILD wine-1.1.43.ebuild 4929 RMD160 137952e182146400766d3fb76303436d9f7c5e9e SHA1 92e07587492d71dd85463864411f6f9b4ee2e417 SHA256 a84109de59cfbd7e1baa84770507bbc9653311aed072ed4075448cd5c3961a00 +MISC metadata.xml 1333 RMD160 fe0a0c8ec639987ff6c06f7a9e47a391defb5478 SHA1 421e3087a3f122fa15283d82429f1d315fba313a SHA256 edaaae36cc5924ea3be49d2d3628e5de555b87b2bee44685797efee72f599902 diff --git a/app-emulation/wine/files/wine-1.1.15-winegcc.patch b/app-emulation/wine/files/wine-1.1.15-winegcc.patch new file mode 100644 index 0000000..6e5bb22 --- /dev/null +++ b/app-emulation/wine/files/wine-1.1.15-winegcc.patch @@ -0,0 +1,55 @@ +http://bugs.gentoo.org/260726 + +--- wine-1.1.15/tools/winegcc/winegcc.c ++++ wine-1.1.15/tools/winegcc/winegcc.c +@@ -215,10 +215,13 @@ + strarray* files; + }; + ++#undef FORCE_POINTER_SIZE + #ifdef __i386__ + static const enum target_cpu build_cpu = CPU_x86; ++#define FORCE_POINTER_SIZE + #elif defined(__x86_64__) + static const enum target_cpu build_cpu = CPU_x86_64; ++#define FORCE_POINTER_SIZE + #elif defined(__sparc__) + static const enum target_cpu build_cpu = CPU_SPARC; + #elif defined(__ALPHA__) +@@ -968,6 +971,9 @@ + opts.linker_args = strarray_alloc(); + opts.compiler_args = strarray_alloc(); + opts.winebuild_args = strarray_alloc(); ++#ifdef FORCE_POINTER_SIZE ++ opts.force_pointer_size = sizeof(size_t); ++#endif + + /* determine the processor type */ + if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp; +--- wine-1.1.15/tools/winebuild/main.c ++++ wine-1.1.15/tools/winebuild/main.c +@@ -50,10 +50,13 @@ + int link_ext_symbols = 0; + int force_pointer_size = 0; + ++#undef FORCE_POINTER_SIZE + #ifdef __i386__ + enum target_cpu target_cpu = CPU_x86; ++#define FORCE_POINTER_SIZE + #elif defined(__x86_64__) + enum target_cpu target_cpu = CPU_x86_64; ++#define FORCE_POINTER_SIZE + #elif defined(__sparc__) + enum target_cpu target_cpu = CPU_SPARC; + #elif defined(__ALPHA__) +@@ -574,6 +577,10 @@ + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); + ++#ifdef FORCE_POINTER_SIZE ++ force_pointer_size = sizeof(size_t); ++#endif ++ + output_file = stdout; + argv = parse_options( argc, argv, spec ); + diff --git a/app-emulation/wine/metadata.xml b/app-emulation/wine/metadata.xml new file mode 100644 index 0000000..6b6db18 --- /dev/null +++ b/app-emulation/wine/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>wine</herd> +<longdescription> +Wine is an Open Source implementation of the Windows API on top of X and Unix. + +Think of Wine as a compatibility layer for running Windows programs. Wine does not require Microsoft Windows, as it is a completely free alternative implementation of the Windows API consisting of 100% non-Microsoft code, however Wine can optionally use native Windows DLLs if they are available. Wine provides both a development toolkit for porting Windows source code to Unix as well as a program loader, allowing many unmodified Windows programs to run on x86-based Unixes, including Linux, FreeBSD, and Solaris. +</longdescription> +<use> + <flag name='capi'>Enable ISDN support via CAPI</flag> + <flag name='custom-cflags'>Bypass strip-flags; use are your own peril</flag> + <flag name='gecko'>Add support for the Gecko engine when using iexplore</flag> + <flag name='perl'>Install helpers written in perl (winedump/winemaker)</flag> + <flag name='samba'>Add support for NTLM auth. see + http://wiki.winehq.org/NtlmAuthSetupGuide and + http://wiki.winehq.org/NtlmSigningAndSealing</flag> + <flag name='win64'>Build a 64bit version of Wine (won't run Win32 binaries)</flag> +</use> +</pkgmetadata> diff --git a/app-emulation/wine/wine-1.1.43.ebuild b/app-emulation/wine/wine-1.1.43.ebuild new file mode 100644 index 0000000..c96fde2 --- /dev/null +++ b/app-emulation/wine/wine-1.1.43.ebuild @@ -0,0 +1,178 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.1.42.ebuild,v 1.1 2010/04/10 20:01:12 vapier Exp $ + +EAPI="2" + +AUTOTOOLS_AUTO_DEPEND="no" +inherit eutils flag-o-matic multilib autotools + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://source.winehq.org/git/wine.git" + inherit git + SRC_URI="" + #KEYWORDS="" +else + MY_P="${PN}-${PV/_/-}" + SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" + S=${WORKDIR}/${MY_P} +fi + +pulse_patches() { echo "$1"/winepulse-{0.36,0.35-configure.ac,0.34-winecfg}.patch ; } +GV="1.0.0-x86" +DESCRIPTION="free implementation of Windows(tm) on Unix" +HOMEPAGE="http://www.winehq.org/" +SRC_URI="${SRC_URI} + gecko? ( mirror://sourceforge/wine/wine_gecko-${GV}.cab ) + pulseaudio? ( `pulse_patches http://art.ified.ca/downloads/winepulse` )" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="alsa capi cups custom-cflags dbus esd fontconfig +gecko gnutls gphoto2 gsm hal jack jpeg lcms ldap mp3 nas ncurses openal +opengl oss +perl png pulseaudio samba scanner ssl test +threads +truetype win64 +X xcomposite xinerama xml" +RESTRICT="test" #72375 + +RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts ) + perl? ( dev-lang/perl dev-perl/XML-Simple ) + capi? ( net-dialup/capi4k-utils ) + ncurses? ( >=sys-libs/ncurses-5.2 ) + fontconfig? ( media-libs/fontconfig ) + gphoto2? ( media-libs/libgphoto2 ) + jack? ( media-sound/jack-audio-connection-kit ) + openal? ( media-libs/openal ) + dbus? ( sys-apps/dbus ) + gnutls? ( net-libs/gnutls ) + hal? ( sys-apps/hal ) + X? ( + x11-libs/libXcursor + x11-libs/libXrandr + x11-libs/libXi + x11-libs/libXmu + x11-libs/libXxf86vm + x11-apps/xmessage + ) + xinerama? ( x11-libs/libXinerama ) + alsa? ( media-libs/alsa-lib ) + esd? ( media-sound/esound ) + nas? ( media-libs/nas ) + cups? ( net-print/cups ) + opengl? ( virtual/opengl ) + pulseaudio? ( media-sound/pulseaudio ${AUTOTOOLS_DEPEND} ) + gsm? ( media-sound/gsm ) + jpeg? ( media-libs/jpeg ) + ldap? ( net-nds/openldap ) + lcms? ( media-libs/lcms ) + mp3? ( >=media-sound/mpg123-1.5.0 ) + samba? ( >=net-fs/samba-3.0.25 ) + xml? ( dev-libs/libxml2 dev-libs/libxslt ) + scanner? ( media-gfx/sane-backends ) + ssl? ( dev-libs/openssl ) + png? ( media-libs/libpng ) + !win64? ( amd64? ( + truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 ) + X? ( + >=app-emulation/emul-linux-x86-xlibs-2.1 + >=app-emulation/emul-linux-x86-soundlibs-2.1 + ) + openal? ( app-emulation/emul-linux-x86-sdl ) + app-emulation/emul-linux-x86-baselibs + >=sys-kernel/linux-headers-2.6 + ) ) + xcomposite? ( x11-libs/libXcomposite ) " +DEPEND="${RDEPEND} + X? ( + x11-proto/inputproto + x11-proto/xextproto + x11-proto/xf86vidmodeproto + ) + xinerama? ( x11-proto/xineramaproto ) + sys-devel/bison + sys-devel/flex" + +src_unpack() { + if [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] ; then + use win64 && die "you need gcc-4.4+ to build 64bit wine" + fi + + if [[ ${PV} == "9999" ]] ; then + git_src_unpack + else + unpack ${MY_P}.tar.bz2 + fi +} + +src_prepare() { + if use pulseaudio ; then + EPATCH_OPTS=-p1 epatch `pulse_patches "${DISTDIR}"` + eautoreconf + fi + epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726 + epatch_user #282735 + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die + sed -i '/^MimeType/d' tools/wine.desktop || die #117785 +} + +src_configure() { + export LDCONFIG=/bin/true + + use custom-cflags || strip-flags + use amd64 && ! use win64 && multilib_toolchain_setup x86 + + econf \ + --sysconfdir=/etc/wine \ + $(use_with alsa) \ + $(use_with capi) \ + $(use_with lcms cms) \ + $(use_with cups) \ + $(use_with ncurses curses) \ + $(use_with esd) \ + $(use_with fontconfig) \ + $(use_with gnutls) \ + $(use_with gphoto2 gphoto) \ + $(use_with gsm) \ + $(! use dbus && echo --without-hal || use_with hal) \ + $(use_with jack) \ + $(use_with jpeg) \ + $(use_with ldap) \ + $(use_with mp3 mpg123) \ + $(use_with nas) \ + $(use_with openal) \ + $(use_with opengl) \ + $(use_with ssl openssl) \ + $(use_with oss) \ + $(use_with png) \ + $(use_with threads pthread) \ + $(use_with pulseaudio pulse) \ + $(use_with scanner sane) \ + $(use_enable test tests) \ + $(use_with truetype freetype) \ + $(use_enable win64) \ + $(use_with X x) \ + $(use_with xcomposite) \ + $(use_with xinerama) \ + $(use_with xml) \ + $(use_with xml xslt) \ + || die "configure failed" + + emake -j1 depend || die "depend" +} + +src_compile() { + emake all || die "all" +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc ANNOUNCE AUTHORS README + if use gecko ; then + insinto /usr/share/wine/gecko + doins "${DISTDIR}"/wine_gecko-${GV}.cab || die + fi + if ! use perl ; then + rm "${D}"/usr/bin/{wine{dump,maker},function_grep.pl} "${D}"/usr/share/man/man1/wine{dump,maker}.1 || die + fi +} + +pkg_postinst() { + paxctl -psmr "${ROOT}"/usr/bin/wine{,-preloader} 2>/dev/null #255055 +} diff --git a/app-misc/lirc/Manifest b/app-misc/lirc/Manifest new file mode 100644 index 0000000..11eea22 --- /dev/null +++ b/app-misc/lirc/Manifest @@ -0,0 +1,12 @@ +AUX irexec-confd 280 RMD160 f669c7c98b9d7cac2010284ab6068d29d47ec811 SHA1 c6decc19a273d98d451de137a2ffbe16d5df28ae SHA256 c404ad3b624004cab25bd3a89593cdeb0abbc25771d6e52caf2f37cb4f7b2b79 +AUX irexec-initd-0.8.6-r3 816 RMD160 e9969072ccbdcb284781a4224c9fa2afc72fecaf SHA1 ab066d769417e13c194112ba99f309bb1cb0d2e5 SHA256 5e5a31fbd93294a6e210499a880fcab371b23706824c9d60d827b0187d7bade4 +AUX lirc-0.8.3_pre1-remotewonderplus.patch 943 RMD160 05a0696d51ff01c7d9644ad3ff4d56fef20be439 SHA1 971ad8b27d57c31439a1f7fb87dac2dc39d6c1e8 SHA256 547efbfa30f282ba9100495044e3b720c8f74c44f9a4e34db934d2ac7976fe29 +AUX lirc-0.8.4-portaudio_check.patch 769 RMD160 d83b1a167da5b0c4e09ef716a4fc80f7261f7665 SHA1 81537dc12f897756d24fcf2cf4d178dc8169e360 SHA256 01e2034aaa6a7eb039e5c0e6c3b4a6ed38860614d3d0b0005d99a4aac2b3827e +AUX lirc-0.8.6-kernel_2.6.33_fix.patch 7138 RMD160 6aec1dd049a745a707fdd53be7433cb564155900 SHA1 e6b1f6ad314e25ddea27c65f7291506cb1b9e794 SHA256 0744775f0c5ed37ae97d7cc998296700e4535312b9dba0abc97d9b7c9ce5b1d0 +AUX lirc_i2c_r1.70_to_r1.72.patch 2285 RMD160 1fca70f5ec15fddc7bb7167e0d4531b99b40fe95 SHA1 c6e802110e584a1f2bac8297e19428d79ec33c94 SHA256 c5836be6ef0be4f6ee1afff779b778b6fa61437f81339d79a640b241cc1f2806 +AUX lircd-0.8.6 941 RMD160 e26898ef4660b2a23cad190e224270181900181a SHA1 ee2f5422f259b4ee486baa1ae88019948fed5a40 SHA256 753957bc06a851388c71b6c98ec3463e61a26308c8643ed8c0257cb1757efdae +AUX lircd.conf.2 314 RMD160 895fd43ce98f478e6ef8d3375c2be86f7b22f0dd SHA1 4edb23d7f14c8d92bc19d59734f8f3ebe9f30e75 SHA256 bf62f0985e97b4bd8828d609bb0daa543b7c158f457d597712752d50e2265adb +AUX lircmd 466 RMD160 32f2b2411afc60522944f5c3dff9f53aac242a9c SHA1 79939de790d20704009643bd810e3186090d0e36 SHA256 d47f22a33a83c14a4a0c333d6a445c40e550c491899fb0c6d323e23fe1eac7b7 +AUX modprobed.lirc 549 RMD160 89edfd587932959df9e521d146cef7c67cf97b18 SHA1 f59d8f031859eb6b6dccd1faf15d7ed2251288b1 SHA256 b4951252321ea326d3ec401e5ff1112716c5aaf5b2ca94d9f5e187e22ad35c44 +DIST lirc-0.8.6.tar.bz2 730341 RMD160 c4301b1ac966be48c856b606ae0fedd366cb608d SHA1 199aad7381e785945e4634f9a002e5ac35bf8930 SHA256 0a82e73b1bbf1712cff9d757739f9a2083be246d1b1d071f8808b5e6cca4d1a1 +EBUILD lirc-0.8.6-r3.ebuild 10207 RMD160 38da056e2d9a56f1a05339795eb77a8c81394633 SHA1 0edb17d272dd872e1f80dfd85e3417c4618ec8c3 SHA256 175cf83e7689390a69c1463efe36b3c13af23a2d190cbc8386662bf2dbbba3c1 diff --git a/app-misc/lirc/files/irexec-confd b/app-misc/lirc/files/irexec-confd new file mode 100644 index 0000000..48eb8dd --- /dev/null +++ b/app-misc/lirc/files/irexec-confd @@ -0,0 +1,9 @@ +# 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-0.8.6-r3 b/app-misc/lirc/files/irexec-initd-0.8.6-r3 new file mode 100755 index 0000000..567322a --- /dev/null +++ b/app-misc/lirc/files/irexec-initd-0.8.6-r3 @@ -0,0 +1,28 @@ +#!/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-0.8.6-r2,v 1.1 2009/11/15 10:04:21 zzam Exp $ + +: ${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/lirc-0.8.3_pre1-remotewonderplus.patch b/app-misc/lirc/files/lirc-0.8.3_pre1-remotewonderplus.patch new file mode 100644 index 0000000..66527bc --- /dev/null +++ b/app-misc/lirc/files/lirc-0.8.3_pre1-remotewonderplus.patch @@ -0,0 +1,26 @@ +--- 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 new file mode 100644 index 0000000..36f5f36 --- /dev/null +++ b/app-misc/lirc/files/lirc-0.8.4-portaudio_check.patch @@ -0,0 +1,18 @@ +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.8.6-kernel_2.6.33_fix.patch b/app-misc/lirc/files/lirc-0.8.6-kernel_2.6.33_fix.patch new file mode 100644 index 0000000..e933e64 --- /dev/null +++ b/app-misc/lirc/files/lirc-0.8.6-kernel_2.6.33_fix.patch @@ -0,0 +1,269 @@ +--- drivers/lirc_dev/lirc_dev.h 2009/03/15 09:34:00 1.37 ++++ drivers/lirc_dev/lirc_dev.h 2010/01/23 16:28:07 1.39 +@@ -4,7 +4,7 @@ + * (L) by Artur Lipowski <alipowski@interia.pl> + * This code is licensed under GNU GPL + * +- * $Id: lirc_dev.h,v 1.37 2009/03/15 09:34:00 lirc Exp $ ++ * $Id: lirc_dev.h,v 1.39 2010/01/23 16:28:07 lirc Exp $ + * + */ + +@@ -30,14 +30,19 @@ + + struct lirc_buffer { + wait_queue_head_t wait_poll; +- spinlock_t lock; ++ spinlock_t fifo_lock; + unsigned int chunk_size; + unsigned int size; /* in chunks */ + /* Using chunks instead of bytes pretends to simplify boundary checking + * And should allow for some performance fine tunning later */ + #ifdef LIRC_HAVE_KFIFO ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) + struct kfifo *fifo; + #else ++ struct kfifo fifo; ++ u8 fifo_initialized; ++#endif ++#else + unsigned int fill; /* in chunks */ + int head, tail; /* in chunks */ + unsigned char *data; +@@ -47,12 +52,12 @@ + static inline void lirc_buffer_lock(struct lirc_buffer *buf, + unsigned long *flags) + { +- spin_lock_irqsave(&buf->lock, *flags); ++ spin_lock_irqsave(&buf->fifo_lock, *flags); + } + static inline void lirc_buffer_unlock(struct lirc_buffer *buf, + unsigned long *flags) + { +- spin_unlock_irqrestore(&buf->lock, *flags); ++ spin_unlock_irqrestore(&buf->fifo_lock, *flags); + } + static inline void _lirc_buffer_clear(struct lirc_buffer *buf) + { +@@ -64,10 +69,21 @@ + static inline void lirc_buffer_clear(struct lirc_buffer *buf) + { + #ifdef LIRC_HAVE_KFIFO ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) + if (buf->fifo) + kfifo_reset(buf->fifo); + #else + unsigned long flags; ++ ++ if (buf->fifo_initialized) { ++ spin_lock_irqsave(&buf->fifo_lock, flags); ++ kfifo_reset(&buf->fifo); ++ spin_unlock_irqrestore(&buf->fifo_lock, flags); ++ } ++#endif ++#else ++ unsigned long flags; ++ + lirc_buffer_lock(buf, &flags); + _lirc_buffer_clear(buf); + lirc_buffer_unlock(buf, &flags); +@@ -77,31 +93,47 @@ + unsigned int chunk_size, + unsigned int size) + { ++ int ret = 0; ++ + init_waitqueue_head(&buf->wait_poll); +- spin_lock_init(&buf->lock); ++ spin_lock_init(&buf->fifo_lock); + #ifndef LIRC_HAVE_KFIFO + _lirc_buffer_clear(buf); + #endif + buf->chunk_size = chunk_size; + buf->size = size; + #ifdef LIRC_HAVE_KFIFO +- buf->fifo = kfifo_alloc(size*chunk_size, GFP_KERNEL, &buf->lock); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ buf->fifo = kfifo_alloc(size*chunk_size, GFP_KERNEL, &buf->fifo_lock); + if (!buf->fifo) + return -ENOMEM; + #else ++ ret = kfifo_alloc(&buf->fifo, size * chunk_size, GFP_KERNEL); ++ if (ret == 0) ++ buf->fifo_initialized = 1; ++#endif ++#else + buf->data = kmalloc(size*chunk_size, GFP_KERNEL); + if (buf->data == NULL) + return -ENOMEM; + memset(buf->data, 0, size*chunk_size); + #endif +- return 0; ++ ++ return ret; + } + static inline void lirc_buffer_free(struct lirc_buffer *buf) + { + #ifdef LIRC_HAVE_KFIFO ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) + if (buf->fifo) + kfifo_free(buf->fifo); + #else ++ if (buf->fifo_initialized) { ++ kfifo_free(&buf->fifo); ++ buf->fifo_initialized = 0; ++ } ++#endif ++#else + kfree(buf->data); + buf->data = NULL; + buf->head = 0; +@@ -111,6 +143,25 @@ + buf->size = 0; + #endif + } ++ ++#ifdef LIRC_HAVE_KFIFO ++static inline int lirc_buffer_len(struct lirc_buffer *buf) ++{ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ return kfifo_len(buf->fifo); ++#else ++ int len; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&buf->fifo_lock, flags); ++ len = kfifo_len(&buf->fifo); ++ spin_unlock_irqrestore(&buf->fifo_lock, flags); ++ ++ return len; ++#endif ++} ++#endif ++ + #ifndef LIRC_HAVE_KFIFO + static inline int _lirc_buffer_full(struct lirc_buffer *buf) + { +@@ -120,7 +171,7 @@ + static inline int lirc_buffer_full(struct lirc_buffer *buf) + { + #ifdef LIRC_HAVE_KFIFO +- return kfifo_len(buf->fifo) == buf->size * buf->chunk_size; ++ return lirc_buffer_len(buf) == buf->size * buf->chunk_size; + #else + unsigned long flags; + int ret; +@@ -139,7 +190,7 @@ + static inline int lirc_buffer_empty(struct lirc_buffer *buf) + { + #ifdef LIRC_HAVE_KFIFO +- return !kfifo_len(buf->fifo); ++ return !lirc_buffer_len(buf); + #else + unsigned long flags; + int ret; +@@ -158,7 +209,7 @@ + static inline int lirc_buffer_available(struct lirc_buffer *buf) + { + #ifdef LIRC_HAVE_KFIFO +- return buf->size - (kfifo_len(buf->fifo) / buf->chunk_size); ++ return buf->size - (lirc_buffer_len(buf) / buf->chunk_size); + #else + unsigned long flags; + int ret; +@@ -177,21 +228,30 @@ + buf->fill -= 1; + } + #endif +-static inline void lirc_buffer_read(struct lirc_buffer *buf, +- unsigned char *dest) ++static inline unsigned int lirc_buffer_read(struct lirc_buffer *buf, ++ unsigned char *dest) + { ++ unsigned int ret = 0; ++ + #ifdef LIRC_HAVE_KFIFO +- if (kfifo_len(buf->fifo) >= buf->chunk_size) +- kfifo_get(buf->fifo, dest, buf->chunk_size); ++ if (lirc_buffer_len(buf) >= buf->chunk_size) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ ret = kfifo_get(buf->fifo, dest, buf->chunk_size); ++#else ++ ret = kfifo_out_locked(&buf->fifo, dest, buf->chunk_size, ++ &buf->fifo_lock); ++#endif + #else + unsigned long flags; + lirc_buffer_lock(buf, &flags); + _lirc_buffer_read_1(buf, dest); + lirc_buffer_unlock(buf, &flags); + #endif ++ ++ return ret; + } + #ifndef LIRC_HAVE_KFIFO +-static inline void _lirc_buffer_write_1(struct lirc_buffer *buf, ++static inline _lirc_buffer_write_1(struct lirc_buffer *buf, + unsigned char *orig) + { + memcpy(&buf->data[buf->tail*buf->chunk_size], orig, buf->chunk_size); +@@ -199,17 +259,26 @@ + buf->fill++; + } + #endif +-static inline void lirc_buffer_write(struct lirc_buffer *buf, +- unsigned char *orig) ++static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, ++ unsigned char *orig) + { ++ unsigned int ret = 0; ++ + #ifdef LIRC_HAVE_KFIFO +- kfifo_put(buf->fifo, orig, buf->chunk_size); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ ret = kfifo_put(buf->fifo, orig, buf->chunk_size); ++#else ++ ret = kfifo_in_locked(&buf->fifo, orig, buf->chunk_size, ++ &buf->fifo_lock); ++#endif + #else + unsigned long flags; + lirc_buffer_lock(buf, &flags); + _lirc_buffer_write_1(buf, orig); + lirc_buffer_unlock(buf, &flags); + #endif ++ ++ return ret; + } + #ifndef LIRC_HAVE_KFIFO + static inline void _lirc_buffer_write_n(struct lirc_buffer *buf, +@@ -234,17 +303,26 @@ + buf->fill += count; + } + #endif +-static inline void lirc_buffer_write_n(struct lirc_buffer *buf, +- unsigned char *orig, int count) ++static inline unsigned int lirc_buffer_write_n(struct lirc_buffer *buf, ++ unsigned char *orig, int count) + { ++ unsigned int ret = 0; ++ + #ifdef LIRC_HAVE_KFIFO +- kfifo_put(buf->fifo, orig, count * buf->chunk_size); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ ret = kfifo_put(buf->fifo, orig, count * buf->chunk_size); ++#else ++ ret = kfifo_in_locked(&buf->fifo, orig, count * buf->chunk_size, ++ &buf->fifo_lock); ++#endif + #else + unsigned long flags; + lirc_buffer_lock(buf, &flags); + _lirc_buffer_write_n(buf, orig, count); + lirc_buffer_unlock(buf, &flags); + #endif ++ ++ return ret; + } + + struct lirc_driver { diff --git a/app-misc/lirc/files/lirc_i2c_r1.70_to_r1.72.patch b/app-misc/lirc/files/lirc_i2c_r1.70_to_r1.72.patch new file mode 100644 index 0000000..7dc7cd5 --- /dev/null +++ b/app-misc/lirc/files/lirc_i2c_r1.70_to_r1.72.patch @@ -0,0 +1,76 @@ +--- drivers/lirc_i2c/lirc_i2c.c 2009/08/30 16:59:53 1.70 ++++ drivers/lirc_i2c/lirc_i2c.c 2009/12/28 15:29:03 1.72 +@@ -1,4 +1,4 @@ +-/* $Id: lirc_i2c.c,v 1.70 2009/08/30 16:59:53 jarodwilson Exp $ */ ++/* $Id: lirc_i2c.c,v 1.72 2009/12/28 15:29:03 jarodwilson Exp $ */ + + /* + * lirc_i2c.c +@@ -399,8 +399,8 @@ + .name = "i2c ir driver", + }, + #endif +- .id = I2C_DRIVERID_EXP3, /* FIXME */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) ++ .id = I2C_DRIVERID_EXP3, /* FIXME */ + .attach_adapter = ir_probe, + .detach_client = ir_remove, + #else +@@ -492,20 +492,23 @@ + ir->l.add_to_buf = add_to_buf_pv951; + break; + case 0x71: +-#ifdef I2C_HW_B_CX2341X +- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) || +- adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) { +-#else +- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) { ++ ++ ++ ++#ifdef I2C_HW_B_CX2388x ++ /* Leadtek Winfast PVR2000 or Hauppauge HVR-1300 */ ++ if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) ++ strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE); ++ else + #endif ++ { + /* + * The PVR150 IR receiver uses the same protocol as + * other Hauppauge cards, but the data flow is + * different, so we need to deal with it by its own. + */ + strlcpy(ir->c.name, "Hauppauge PVR150", I2C_NAME_SIZE); +- } else /* I2C_HW_B_CX2388x */ +- strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE); ++ } + ir->l.code_length = 13; + ir->l.add_to_buf = add_to_buf_haup_pvr150; + break; +@@ -516,19 +519,18 @@ + break; + case 0x18: + case 0x1a: +-#ifdef I2C_HW_B_CX2341X +- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) || +- adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) { ++#ifdef I2C_HW_B_CX2388x ++ if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) { ++ strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE); ++ ir->l.code_length = 8; ++ ir->l.add_to_buf = add_to_buf_pvr2000; ++ } else { + #else +- if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) { ++ { + #endif + strlcpy(ir->c.name, "Hauppauge IR", I2C_NAME_SIZE); + ir->l.code_length = 13; + ir->l.add_to_buf = add_to_buf_haup; +- } else { /* I2C_HW_B_CX2388x */ +- strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE); +- ir->l.code_length = 8; +- ir->l.add_to_buf = add_to_buf_pvr2000; + } + break; + case 0x30: diff --git a/app-misc/lirc/files/lircd-0.8.6 b/app-misc/lirc/files/lircd-0.8.6 new file mode 100644 index 0000000..0a775a5 --- /dev/null +++ b/app-misc/lirc/files/lircd-0.8.6 @@ -0,0 +1,39 @@ +#!/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.1 2009/10/04 18:48:29 fauli Exp $ + +PIDFILE=/var/run/lirc/${SVCNAME}.pid +LIRCD_SYMLINKFILE=/dev/lircd +LIRCD_SOCKET=/var/run/lirc/lircd + +depend() { + 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.conf.2 b/app-misc/lirc/files/lircd.conf.2 new file mode 100644 index 0000000..191db37 --- /dev/null +++ b/app-misc/lirc/files/lircd.conf.2 @@ -0,0 +1,10 @@ +# 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 name=*DVB*" diff --git a/app-misc/lirc/files/lircmd b/app-misc/lirc/files/lircmd new file mode 100755 index 0000000..d383778 --- /dev/null +++ b/app-misc/lirc/files/lircmd @@ -0,0 +1,20 @@ +#!/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/lircmd,v 1.2 2004/09/28 00:22:15 swegener Exp $ + +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 new file mode 100644 index 0000000..2ed9558 --- /dev/null +++ b/app-misc/lirc/files/modprobed.lirc @@ -0,0 +1,22 @@ +# +# 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/lirc-0.8.6-r3.ebuild b/app-misc/lirc/lirc-0.8.6-r3.ebuild new file mode 100644 index 0000000..1a27711 --- /dev/null +++ b/app-misc/lirc/lirc-0.8.6-r3.ebuild @@ -0,0 +1,365 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +inherit eutils linux-mod 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 X hardware-carrier transmitter" + +S="${WORKDIR}/${MY_P}" + +RDEPEND=" + X? ( + x11-libs/libX11 + x11-libs/libSM + x11-libs/libICE + ) + lirc_devices_alsa_usb? ( media-libs/alsa-lib ) + lirc_devices_audio? ( >media-libs/portaudio-18 ) + lirc_devices_irman? ( media-libs/libirman )" + +# 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 mceusb + mediafocusI mouseremote + mouseremote_ps2 mp3anywhere mplay nslu2 + packard_bell parallel pcmak pcmak_usb + pctv pixelview_bt878 pixelview_pak + pixelview_pro provideo realmagic + remotemaster sa1100 samsung sasem sb0540 serial + silitek sir slinke streamzap tekram + tekram_bt829 tira ttusbir tuxbox tvbox udp uirt2 + uirt2_raw usb_uirt_raw usbx wpc8769l" + +# drivers that need special handling and +# must have another name specified for +# parameter --with-driver=NAME +IUSE_LIRC_DEVICES_SPECIAL=" + serial_igor_cesko + remote_wonder_plus xboxusb usbirboy inputlirc" + +IUSE_LIRC_DEVICES="${IUSE_LIRC_DEVICES_DIRECT} ${IUSE_LIRC_DEVICES_SPECIAL}" + +#device-driver which use libusb +LIBUSB_USED_BY_DEV=" + all atilibusb awlibusb sasem igorplugusb imon imon_lcd imon_pad + imon_rsc streamzap mceusb xboxusb irlink commandir" + +for dev in ${LIBUSB_USED_BY_DEV}; do + DEPEND="${DEPEND} lirc_devices_${dev}? ( dev-libs/libusb )" +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 +for dev in ${IUSE_LIRC_DEVICES}; do + IUSE="${IUSE} lirc_devices_${dev}" +done + +add_device() { + : ${lirc_device_count:=0} + ((lirc_device_count++)) + + if [[ ${lirc_device_count} -eq 2 ]]; then + ewarn + ewarn "When selecting multiple devices for lirc to be supported," + ewarn "it can not be guaranteed that the drivers play nice together." + ewarn + ewarn "If this is not intended, then abort emerge now with Ctrl-C," + ewarn "Set LIRC_DEVICES and restart emerge." + ewarn + epause + fi + + local dev="${1}" + local desc="device ${dev}" + if [[ -n "${2}" ]]; then + desc="${2}" + fi + + elog "Compiling support for ${desc}" + MY_OPTS="${MY_OPTS} --with-driver=${dev}" +} + +pkg_setup() { + + if use lirc_devices_mceusb2 + then + ewarn "The mceusb2 driver has been merged into the mceusb." + ewarn "Please only use the latter now." + fi + + ewarn "If your LIRC device requires modules, you'll need MODULE_UNLOAD" + ewarn "support in your kernel." + + 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" + + 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 + ewarn "These options are no longer allowed to be set" + ewarn "with LIRC_OPTS: ${unsupported_opts}" + die "LIRC_OPTS is no longer recommended." + fi + fi + + # Setup parameter for linux-mod.eclass + MODULE_NAMES="lirc(misc:${S})" + BUILD_TARGETS="all" + + ECONF_PARAMS=" --localstatedir=/var + --with-syslog=LOG_DAEMON + --enable-sandboxed + --with-kerneldir=${KV_DIR} + --with-moduledir=/lib/modules/${KV_FULL}/misc + $(use_enable debug) + $(use_with X x) + ${MY_OPTS}" + + einfo + einfo "lirc-configure-opts: ${MY_OPTS}" + elog "Setting default lirc-device to ${LIRC_DRIVER_DEVICE}" + + filter-flags -Wl,-O1 + + # force non-parallel make, Bug 196134 + MAKEOPTS="${MAKEOPTS} -j1" +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # 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 + + # 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 + if 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 + + # correct autoconf.h location if 2.6.33 + if kernel_is ge 2 6 33 ; then + epatch "${FILESDIR}"/lirc-0.8.6-kernel_2.6.33_fix.patch + sed -i 's/linux\/autoconf.h/generated\/autoconf.h/g' drivers/*/*.c + 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_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + newinitd "${FILESDIR}"/lircd-0.8.6 lircd + newinitd "${FILESDIR}"/lircmd lircmd + newconfd "${FILESDIR}"/lircd.conf.2 lircd + + insinto /etc/modprobe.d/ + newins "${FILESDIR}"/modprobed.lirc lirc.conf + + newinitd "${FILESDIR}"/irexec-initd-0.8.6-r3 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 /var/run/lirc /etc/lirc + if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then + newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example + fi +} + +pkg_preinst() { + linux-mod_pkg_preinst + + local dir="${ROOT}/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 "${ROOT}"/etc/lirc/lircd.conf ]]; then + cp "${ROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf + elif [[ -f "${ROOT}"/etc/lircd.conf ]]; then + cp "${ROOT}"/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 "${ROOT}"/etc/lirc/lircd.conf + if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then + elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf" + rm -f "${ROOT}"/etc/lircd.conf + fi + fi + + ewarn + ewarn "The lirc_gpio driver will not work with Kernels 2.6.22+" + ewarn "You need to switch over to /dev/input/event? if you need gpio" + ewarn "This device can than then be used via lirc's dev/input driver." + ewarn + ewarn "The new default location for lircd.conf is inside of" + ewarn "/etc/lirc/ directory" + +} |