summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2012-07-17 20:14:21 +0000
committerIan Stakenvicius <axs@gentoo.org>2012-07-17 20:14:21 +0000
commit518a4126c3ff6fd46eac3559669ff68db5cb00cc (patch)
tree039a2fa1ec550e8a5bada45763fd3a5c5e1c2f2c /app-misc
parentPython is always needed now, useflag makes no sense. Bug 419577 (diff)
downloadgentoo-2-518a4126c3ff6fd46eac3559669ff68db5cb00cc.tar.gz
gentoo-2-518a4126c3ff6fd46eac3559669ff68db5cb00cc.tar.bz2
gentoo-2-518a4126c3ff6fd46eac3559669ff68db5cb00cc.zip
fixed compilation issues for some drivers against kernel >=2.6.39 for bug 369179 , using patch from amielke overlay as the basis
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/lirc/ChangeLog7
-rw-r--r--app-misc/lirc/files/lirc-0.9.0-kernel-2.6.39-fixes.patch67
-rw-r--r--app-misc/lirc/lirc-0.9.0-r1.ebuild5
3 files changed, 77 insertions, 2 deletions
diff --git a/app-misc/lirc/ChangeLog b/app-misc/lirc/ChangeLog
index 1324d66c69ed..79e9f5ee6460 100644
--- a/app-misc/lirc/ChangeLog
+++ b/app-misc/lirc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-misc/lirc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.226 2012/07/17 19:18:25 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.227 2012/07/17 20:14:21 axs Exp $
+
+ 17 Jul 2012; Ian Stakenvicius <axs@gentoo.org> lirc-0.9.0-r1.ebuild,
+ +files/lirc-0.9.0-kernel-2.6.39-fixes.patch:
+ fixed compilation issues for some drivers against kernel >=2.6.39 for bug
+ 369179 , using patch from amielke overlay as the basis
*lirc-0.9.0-r1 (17 Jul 2012)
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
new file mode 100644
index 000000000000..624737090bbe
--- /dev/null
+++ b/app-misc/lirc/files/lirc-0.9.0-kernel-2.6.39-fixes.patch
@@ -0,0 +1,67 @@
+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/lirc-0.9.0-r1.ebuild b/app-misc/lirc/lirc-0.9.0-r1.ebuild
index 9e0ab247335d..fdc604ae29e8 100644
--- a/app-misc/lirc/lirc-0.9.0-r1.ebuild
+++ b/app-misc/lirc/lirc-0.9.0-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r1.ebuild,v 1.1 2012/07/17 19:18:25 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r1.ebuild,v 1.2 2012/07/17 20:14:21 axs Exp $
EAPI=4
@@ -291,6 +291,9 @@ src_prepare() {
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
+
# Do not build drivers from the top-level Makefile
sed -i -e 's:\(SUBDIRS =\) drivers\(.*\):\1\2:' Makefile.am