--- /usr/portage/app-misc/lirc/lirc-0.8.7.ebuild 2010-11-05 10:05:29.000000000 -0400 +++ lirc-0.9.0_pre1.ebuild 2010-11-20 15:39:46.000000000 -0500 @@ -2,12 +2,12 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.7.ebuild,v 1.3 2010/11/05 13:42:47 hwoarang Exp $ -inherit eutils linux-mod flag-o-matic autotools +inherit eutils flag-o-matic autotools linux-info linux-mod DESCRIPTION="decode and send infra-red signals of many commonly used remote controls" HOMEPAGE="http://www.lirc.org/" -MY_P=${PN}-${PV/_/} +MY_P=${PN}-${PV/_/-} if [[ "${PV/_pre/}" = "${PV}" ]]; then SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2" @@ -17,7 +17,7 @@ LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~ppc x86" +KEYWORDS="~amd64 ~ppc ~x86" IUSE="debug doc X hardware-carrier transmitter" S="${WORKDIR}/${MY_P}" @@ -117,7 +117,10 @@ fi elog "Compiling support for ${desc}" - MY_OPTS="${MY_OPTS} --with-driver=${dev}" + + if kernel_is -lt 2 6 36; then + MY_OPTS="${MY_OPTS} --with-driver=${dev}" + fi } pkg_setup() { @@ -134,9 +137,25 @@ linux-mod_pkg_setup # set default configure options - MY_OPTS="" + + # check to see if kern >= 2.6.36, in which case build userspace components + # only with "--with-driver=userspace" + + if kernel_is -ge 2 6 36; then + MY_OPTS="--with-driver=userspace" + else + MY_OPTS="" + fi + LIRC_DRIVER_DEVICE="/dev/lirc0" + if !(linux_chkconfig_present LIRC_STAGING) && kernel_is -ge 2 6 36; then + ewarn "You have a kernel greater than or equal to 2.6.36, lirc modules" + ewarn "are now bundled with your kernel, please configure your kernel" + ewarn "to enable staging drivers and select the respective lirc devices" + die + fi + if use lirc_devices_all; then # compile in drivers for a lot of devices add_device all "a lot of devices"