diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2010-03-29 15:44:37 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2010-03-29 15:44:37 +0000 |
commit | 553681d11067ee373d3afaa576a958f68ec8a8ca (patch) | |
tree | 522e3949f88a0d1834a00dceb99312b1923be49c /app-laptop | |
parent | Taking its maintainership. Quote some variables. (diff) | |
download | gentoo-2-553681d11067ee373d3afaa576a958f68ec8a8ca.tar.gz gentoo-2-553681d11067ee373d3afaa576a958f68ec8a8ca.tar.bz2 gentoo-2-553681d11067ee373d3afaa576a958f68ec8a8ca.zip |
Patch which fixes backlight compilation with kernels>=2.6.34. Fixes bug #311621
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'app-laptop')
-rw-r--r-- | app-laptop/omnibook/ChangeLog | 12 | ||||
-rw-r--r-- | app-laptop/omnibook/files/backlight-2.6.34-omnibook-20090628.patch | 32 | ||||
-rw-r--r-- | app-laptop/omnibook/omnibook-20090628-r1.ebuild | 38 |
3 files changed, 80 insertions, 2 deletions
diff --git a/app-laptop/omnibook/ChangeLog b/app-laptop/omnibook/ChangeLog index 93359d1bc475..f556f5043579 100644 --- a/app-laptop/omnibook/ChangeLog +++ b/app-laptop/omnibook/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-laptop/omnibook -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/omnibook/ChangeLog,v 1.26 2009/11/01 16:30:24 hwoarang Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/omnibook/ChangeLog,v 1.27 2010/03/29 15:44:37 hwoarang Exp $ + +*omnibook-20090628-r1 (29 Mar 2010) + + 29 Mar 2010; Markos Chandras <hwoarang@gentoo.org> + +files/backlight-2.6.34-omnibook-20090628.patch, + +omnibook-20090628-r1.ebuild: + Patch which fixes backlight compilation with kernels>=2.6.34. Thanks to + Tiago Batista <a19944@gmail.com> for the patch. Fixes bug #311621 01 Nov 2009; Markos Chandras <hwoarang@gentoo.org> -omnibook-20080125.ebuild: diff --git a/app-laptop/omnibook/files/backlight-2.6.34-omnibook-20090628.patch b/app-laptop/omnibook/files/backlight-2.6.34-omnibook-20090628.patch new file mode 100644 index 000000000000..933d9b7f4921 --- /dev/null +++ b/app-laptop/omnibook/files/backlight-2.6.34-omnibook-20090628.patch @@ -0,0 +1,32 @@ +diff -ur omnibook-20090628/lcd.c omnibook-20090628-mod/lcd.c +--- omnibook-20090628/lcd.c 2009-06-28 13:24:21.000000000 +0100 ++++ omnibook-20090628-mod/lcd.c 2010-03-27 13:09:16.540833150 +0000 +@@ -146,8 +146,14 @@ + } + + #ifdef CONFIG_OMNIBOOK_BACKLIGHT +- +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) ++ struct backlight_properties props; ++ memset (&props, 0, sizeof(struct backlight_properties)); ++ props.max_brightness = omnibook_max_brightness; ++ omnibook_backlight_device = ++ backlight_device_register(OMNIBOOK_MODULE_NAME, NULL, (void *)io_op, ++ &omnibookbl_ops, &props); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) + omnibook_backlight_device = + backlight_device_register(OMNIBOOK_MODULE_NAME, NULL, (void *)io_op, &omnibookbl_ops); + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) +@@ -161,8 +167,9 @@ + printk(O_ERR "Unable to register as backlight device.\n"); + return -ENODEV; + } +- +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) ++ backend_byte_read(io_op, (u8*) &omnibook_backlight_device->props.brightness); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) + omnibook_backlight_device->props.max_brightness = omnibook_max_brightness; + backend_byte_read(io_op, (u8*) &omnibook_backlight_device->props.brightness); + #else /* < 2.6.21 */ diff --git a/app-laptop/omnibook/omnibook-20090628-r1.ebuild b/app-laptop/omnibook/omnibook-20090628-r1.ebuild new file mode 100644 index 000000000000..b87ae54fe08b --- /dev/null +++ b/app-laptop/omnibook/omnibook-20090628-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/omnibook/omnibook-20090628-r1.ebuild,v 1.1 2010/03/29 15:44:37 hwoarang Exp $ + +EAPI="2" + +inherit eutils linux-mod + +DESCRIPTION="Linux kernel module for (but not limited to) HP Omnibook support" +HOMEPAGE="http://www.sourceforge.net/projects/omnibook" +# Revision 280 from upstream SVN repository +SRC_URI="mirror://gentoo/${P}.tar.gz" +LICENSE="GPL-2" +KEYWORDS="~amd64 -ppc ~x86" +IUSE="" + +MODULE_NAMES="omnibook(char:)" +BUILD_TARGETS=" " + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="KERNEL=${KV_MAJOR}.${KV_MINOR} KSRC=${KV_DIR}" +} + +src_prepare() { + epatch "${FILESDIR}/remove_owner.patch" + epatch "${FILESDIR}/backlight-2.6.34-${P}.patch" +} + +src_install() { + dodoc doc/* + docinto misc + dodoc misc/*.patch misc/*.txt + docinto hotkeys + dodoc misc/hotkeys/* + + linux-mod_src_install +} |