summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Bornkessel <hd_brummy@gentoo.org>2007-12-26 19:29:29 +0000
committerJörg Bornkessel <hd_brummy@gentoo.org>2007-12-26 19:29:29 +0000
commit1b36a2d54034ade715f8a03a255bfe5c9f2479b0 (patch)
tree174cd48545a9d60cf06900d2f3832a536701c2b6
parentRemoved negative USE flags, added 'vim-syntax' USE, and fixed bugs #199437, #... (diff)
downloadgentoo-2-1b36a2d54034ade715f8a03a255bfe5c9f2479b0.tar.gz
gentoo-2-1b36a2d54034ade715f8a03a255bfe5c9f2479b0.tar.bz2
gentoo-2-1b36a2d54034ade715f8a03a255bfe5c9f2479b0.zip
bug 200508 fixed; thanks to A.Stirling M.Marte T.Kost
(Portage version: 2.1.3.19)
-rw-r--r--app-misc/lirc/ChangeLog6
-rw-r--r--app-misc/lirc/files/lirc-0.8.3_pre1-kernel-2.6.24.diff86
-rw-r--r--app-misc/lirc/lirc-0.8.3_pre1.ebuild7
3 files changed, 97 insertions, 2 deletions
diff --git a/app-misc/lirc/ChangeLog b/app-misc/lirc/ChangeLog
index 269cc8819f51..0cb39d83dcf2 100644
--- a/app-misc/lirc/ChangeLog
+++ b/app-misc/lirc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-misc/lirc
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.165 2007/12/02 13:08:36 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.166 2007/12/26 19:29:28 hd_brummy Exp $
+
+ 26 Dec 2007; Joerg Bornkessel <hd_brummy@gentoo.org>
+ +files/lirc-0.8.3_pre1-kernel-2.6.24.diff, lirc-0.8.3_pre1.ebuild:
+ bug 200508 fixed; thanks to A.Stirling M.Marte T.Kost
02 Dec 2007; Markus Rothe <corsair@gentoo.org> lirc-0.8.2-r2.ebuild:
Stable on ppc64; bug #197768
diff --git a/app-misc/lirc/files/lirc-0.8.3_pre1-kernel-2.6.24.diff b/app-misc/lirc/files/lirc-0.8.3_pre1-kernel-2.6.24.diff
new file mode 100644
index 000000000000..5b9150bdeece
--- /dev/null
+++ b/app-misc/lirc/files/lirc-0.8.3_pre1-kernel-2.6.24.diff
@@ -0,0 +1,86 @@
+#bug 200508
+
+--- /var/tmp/portage/app-misc/lirc-0.8.3_pre1/work/lirc-0.8.3pre1/drivers/lirc_dev/lirc_dev.c 2007-09-27 15:47:20.000000000 -0400
++++ lirc-0.8.3pre1/drivers/lirc_dev/lirc_dev.c 2007-11-27 11:06:41.000000000 -0500
+@@ -41,6 +41,7 @@
+ #include <linux/fs.h>
+ #include <linux/poll.h>
+ #include <linux/smp_lock.h>
++#include <linux/completion.h>
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
+ #include <linux/uaccess.h>
+ #include <linux/errno.h>
+@@ -86,8 +87,8 @@
+ struct lirc_buffer *buf;
+
+ int tpid;
+- struct semaphore *t_notify;
+- struct semaphore *t_notify2;
++ struct completion *t_notify;
++ struct completion *t_notify2;
+ int shutdown;
+ long jiffies_to_wait;
+
+@@ -193,7 +194,7 @@
+ daemonize("lirc_dev");
+
+ if (ir->t_notify != NULL)
+- up(ir->t_notify);
++ complete(ir->t_notify);
+
+ dprintk(LOGHEAD "poll thread started\n", ir->p.name, ir->p.minor);
+
+@@ -218,11 +219,11 @@
+ } while (!ir->shutdown);
+
+ if (ir->t_notify2 != NULL)
+- down(ir->t_notify2);
++ wait_for_completion(ir->t_notify2);
+
+ ir->tpid = -1;
+ if (ir->t_notify != NULL)
+- up(ir->t_notify);
++ complete(ir->t_notify);
+
+ dprintk(LOGHEAD "poll thread ended\n", ir->p.name, ir->p.minor);
+
+@@ -238,7 +239,7 @@
+ #ifdef LIRC_HAVE_DEVFS_24
+ char name[16];
+ #endif
+- DECLARE_MUTEX_LOCKED(tn);
++ DECLARE_COMPLETION(tn);
+
+ if (!p) {
+ printk(KERN_ERR "lirc_dev: lirc_register_plugin: "
+@@ -389,7 +390,7 @@
+ err = -ECHILD;
+ goto out_sysfs;
+ }
+- down(&tn);
++ wait_for_completion(&tn);
+ ir->t_notify = NULL;
+ }
+ ir->attached = 1;
+@@ -425,8 +426,8 @@
+ int lirc_unregister_plugin(int minor)
+ {
+ struct irctl *ir;
+- DECLARE_MUTEX_LOCKED(tn);
+- DECLARE_MUTEX_LOCKED(tn2);
++ DECLARE_COMPLETION(tn);
++ DECLARE_COMPLETION(tn2);
+
+ if (minor < 0 || minor >= MAX_IRCTL_DEVICES) {
+ printk(KERN_ERR "lirc_dev: lirc_unregister_plugin: "
+@@ -462,8 +463,8 @@
+ /* 2.2.x does not export wake_up_process() */
+ wake_up_interruptible(ir->p.get_queue(ir->p.data));
+ #endif
+- up(&tn2);
+- down(&tn);
++ complete(&tn2);
++ wait_for_completion(&tn);
+ ir->t_notify = NULL;
+ ir->t_notify2 = NULL;
+ }
diff --git a/app-misc/lirc/lirc-0.8.3_pre1.ebuild b/app-misc/lirc/lirc-0.8.3_pre1.ebuild
index 1d3f172375da..b5a73f762e4c 100644
--- a/app-misc/lirc/lirc-0.8.3_pre1.ebuild
+++ b/app-misc/lirc/lirc-0.8.3_pre1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.3_pre1.ebuild,v 1.7 2007/11/12 20:15:23 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.3_pre1.ebuild,v 1.8 2007/12/26 19:29:28 hd_brummy Exp $
inherit eutils linux-mod flag-o-matic autotools
@@ -252,6 +252,11 @@ src_unpack() {
sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am
fi
+ # Bug #200508
+ if kernel_is ge 2 6 24 ; then
+ epatch "${FILESDIR}"/${P}-kernel-2.6.24.patch
+ fi
+
# respect CFLAGS
sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac