diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2008-07-26 11:32:18 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2008-07-26 11:32:18 +0000 |
commit | 6e80feedd2bfeb873c87d12c3b5ae46f0d7bd178 (patch) | |
tree | c8d0391c19746b5244c21ad812020400e94ee75e /app-misc | |
parent | Version bump, #232915 (diff) | |
download | gentoo-2-6e80feedd2bfeb873c87d12c3b5ae46f0d7bd178.tar.gz gentoo-2-6e80feedd2bfeb873c87d12c3b5ae46f0d7bd178.tar.bz2 gentoo-2-6e80feedd2bfeb873c87d12c3b5ae46f0d7bd178.zip |
Make lirc compile against linux-2.6.26, thanks to enkil <enkil@cvmx.org> for the patch, Bug #231867.
(Portage version: 2.1.4.4)
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/lirc/ChangeLog | 7 | ||||
-rw-r--r-- | app-misc/lirc/files/lirc-0.8.3-kernel-2.6.26.diff | 122 | ||||
-rw-r--r-- | app-misc/lirc/lirc-0.8.3-r2.ebuild | 9 |
3 files changed, 135 insertions, 3 deletions
diff --git a/app-misc/lirc/ChangeLog b/app-misc/lirc/ChangeLog index 22578a38d7d7..b585ef7e0fd6 100644 --- a/app-misc/lirc/ChangeLog +++ b/app-misc/lirc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-misc/lirc # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.182 2008/07/17 09:59:20 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.183 2008/07/26 11:32:18 zzam Exp $ + + 26 Jul 2008; Matthias Schwarzott <zzam@gentoo.org> + +files/lirc-0.8.3-kernel-2.6.26.diff, lirc-0.8.3-r2.ebuild: + Make lirc compile against linux-2.6.26, thanks to enkil <enkil@cvmx.org> for + the patch, Bug #231867. 17 Jul 2008; Christian Faulhammer <opfer@gentoo.org> lirc-0.8.3-r2.ebuild: stable x86, bug 230792 diff --git a/app-misc/lirc/files/lirc-0.8.3-kernel-2.6.26.diff b/app-misc/lirc/files/lirc-0.8.3-kernel-2.6.26.diff new file mode 100644 index 000000000000..91f4db7dd1bb --- /dev/null +++ b/app-misc/lirc/files/lirc-0.8.3-kernel-2.6.26.diff @@ -0,0 +1,122 @@ +--- a/drivers/kcompat.h 2008-01-13 11:26:28.000000000 +0100 ++++ b/drivers/kcompat.h 2008-05-14 18:37:49.000000000 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: lirc-0.8.3-kernel-2.6.26.diff,v 1.1 2008/07/26 11:32:18 zzam Exp $ */ ++/* $Id: lirc-0.8.3-kernel-2.6.26.diff,v 1.1 2008/07/26 11:32:18 zzam Exp $ */ + + #ifndef _KCOMPAT_H + #define _KCOMPAT_H +@@ -36,10 +36,10 @@ + class_simple_destroy(cls); + } + +-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \ +- class_simple_device_add(cs, dev, device, fmt, ## args) ++#define lirc_device_create(cs, parent, dev, fmt, args...) \ ++ class_simple_device_add(cs, dev, parent, fmt, ## args) + +-static inline void class_device_destroy(lirc_class_t *cls, dev_t devt) ++static inline void lirc_device_destroy(lirc_class_t *cls, dev_t devt) + { + class_simple_device_remove(devt); + } +@@ -48,20 +48,40 @@ + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15) + +-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \ +- class_device_create(cs, dev, device, fmt, ## args) ++#define lirc_device_create(cs, parent, dev, fmt, args...) \ ++ class_device_create(cs, dev, parent, fmt, ## args) + + #else /* >= 2.6.15 */ + +-#define lirc_class_device_create class_device_create ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) ++ ++#define lirc_device_create(cs, parent, dev, fmt, args...) \ ++ class_device_create(cs, NULL, dev, parent, fmt, ## args) ++ ++#else /* >= 2.6.26 */ ++ ++#define lirc_device_create device_create ++ ++#endif /* >= 2.6.26 */ ++ + #define LIRC_DEVFS_PREFIX + +-#endif ++#endif /* >= 2.6.15 */ + + typedef struct class lirc_class_t; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) ++ ++#define lirc_device_destroy class_device_destroy ++ ++#else ++ ++#define lirc_device_destroy device_destroy ++ + #endif + ++#endif /* >= 2.6.13 */ ++ + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) + #define LIRC_HAVE_DEVFS + #define LIRC_HAVE_DEVFS_24 +@@ -133,8 +153,8 @@ + #ifndef LIRC_HAVE_SYSFS + #define class_destroy(x) do { } while (0) + #define class_create(x, y) NULL +-#define class_device_destroy(x, y) do { } while (0) +-#define lirc_class_device_create(x, y, z, xx, yy, zz) 0 ++#define lirc_class_destroy(x, y) do { } while (0) ++#define lirc_class_create(x, y, z, xx, yy, zz) 0 + #define IS_ERR(x) 0 + typedef struct class_simple + { +--- a/drivers/lirc_dev/lirc_dev.c 2008-01-13 11:45:02.000000000 +0100 ++++ b/drivers/lirc_dev/lirc_dev.c 2008-05-14 18:37:49.000000000 +0200 +@@ -17,7 +17,7 @@ + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * +- * $Id: lirc-0.8.3-kernel-2.6.26.diff,v 1.1 2008/07/26 11:32:18 zzam Exp $ ++ * $Id: lirc-0.8.3-kernel-2.6.26.diff,v 1.1 2008/07/26 11:32:18 zzam Exp $ + * + */ + +@@ -145,7 +145,8 @@ + #ifdef LIRC_HAVE_DEVFS_26 + devfs_remove(DEV_LIRC "/%u", ir->p.minor); + #endif +- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); ++ lirc_device_destroy(lirc_class, ++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); + + if (ir->buf != ir->p.rbuf) { + lirc_buffer_free(ir->buf); +@@ -400,9 +401,9 @@ + S_IFCHR|S_IRUSR|S_IWUSR, + DEV_LIRC "/%u", ir->p.minor); + #endif +- (void) lirc_class_device_create(lirc_class, NULL, +- MKDEV(IRCTL_DEV_MAJOR, ir->p.minor), +- ir->p.dev, "lirc%u", ir->p.minor); ++ (void) lirc_device_create(lirc_class, ir->p.dev, ++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor), ++ "lirc%u", ir->p.minor); + + if (p->sample_rate || p->get_queue) { + /* try to fire up polling thread */ +@@ -441,7 +442,8 @@ + return minor; + + out_sysfs: +- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); ++ lirc_device_destroy(lirc_class, ++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor)); + #ifdef LIRC_HAVE_DEVFS_24 + devfs_unregister(ir->devfs_handle); + #endif diff --git a/app-misc/lirc/lirc-0.8.3-r2.ebuild b/app-misc/lirc/lirc-0.8.3-r2.ebuild index 76732164d43b..76abce968559 100644 --- a/app-misc/lirc/lirc-0.8.3-r2.ebuild +++ b/app-misc/lirc/lirc-0.8.3-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 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-r2.ebuild,v 1.4 2008/07/17 09:59:20 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.3-r2.ebuild,v 1.5 2008/07/26 11:32:18 zzam Exp $ inherit eutils linux-mod flag-o-matic autotools @@ -240,6 +240,8 @@ src_unpack() { # Rip out dos CRLF edos2unix contrib/lirc.rules + epatch "${FILESDIR}/${P}-kernel-2.6.26.diff" + # Apply patches needed for some special device-types epatch "${FILESDIR}"/${P}-imon-pad2keys.patch use lirc_devices_remote_wonder_plus && epatch "${FILESDIR}"/lirc-0.8.3_pre1-remotewonderplus.patch @@ -259,7 +261,10 @@ src_unpack() { sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac # setting default device-node - sed -i -e '/#define LIRC_DRIVER_DEVICE/d' configure.ac acconfig.h + 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 if has_version "=media-libs/portaudio-19*"; then |