diff options
author | Joseph Jezak <josejx@gentoo.org> | 2008-12-28 02:14:13 +0000 |
---|---|---|
committer | Joseph Jezak <josejx@gentoo.org> | 2008-12-28 02:14:13 +0000 |
commit | 421161446e2bb7f1a8428c98ce6f8bed8c11ff1b (patch) | |
tree | 99ecdeaea71fe27ea37fcaeaf7aa6125313328b9 /app-laptop | |
parent | Fixed static issue, bug #183518. Replaced autoconf to eautoreconf, bug #22641... (diff) | |
download | gentoo-2-421161446e2bb7f1a8428c98ce6f8bed8c11ff1b.tar.gz gentoo-2-421161446e2bb7f1a8428c98ce6f8bed8c11ff1b.tar.bz2 gentoo-2-421161446e2bb7f1a8428c98ce6f8bed8c11ff1b.zip |
Add patch to fix fnmode with kernel 2.6.28.
(Portage version: 2.1.4.5)
Diffstat (limited to 'app-laptop')
-rw-r--r-- | app-laptop/pbbuttonsd/ChangeLog | 8 | ||||
-rw-r--r-- | app-laptop/pbbuttonsd/files/fnmode.patch | 23 | ||||
-rw-r--r-- | app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r2.ebuild | 4 | ||||
-rw-r--r-- | app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild | 125 |
4 files changed, 157 insertions, 3 deletions
diff --git a/app-laptop/pbbuttonsd/ChangeLog b/app-laptop/pbbuttonsd/ChangeLog index 3c328916a102..9104c2786401 100644 --- a/app-laptop/pbbuttonsd/ChangeLog +++ b/app-laptop/pbbuttonsd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-laptop/pbbuttonsd # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/pbbuttonsd/ChangeLog,v 1.75 2008/08/24 13:31:37 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-laptop/pbbuttonsd/ChangeLog,v 1.76 2008/12/28 02:14:12 josejx Exp $ + +*pbbuttonsd-0.8.1-r3 (28 Dec 2008) + + 28 Dec 2008; Joseph Jezak <josejx@gentoo.org> +files/fnmode.patch, + pbbuttonsd-0.8.1-r2.ebuild, +pbbuttonsd-0.8.1-r3.ebuild: + Add patch to fix fnmode with kernel 2.6.28. 24 Aug 2008; Markus Meier <maekke@gentoo.org> pbbuttonsd-0.8.1-r2.ebuild: add ~amd64, bug #167011 diff --git a/app-laptop/pbbuttonsd/files/fnmode.patch b/app-laptop/pbbuttonsd/files/fnmode.patch new file mode 100644 index 000000000000..e33019a43694 --- /dev/null +++ b/app-laptop/pbbuttonsd/files/fnmode.patch @@ -0,0 +1,23 @@ +--- src/module_pmac.c 2007-07-01 07:05:17.000000000 -0400 ++++ src/module_pmac.kbdfix.c 2008-12-27 11:46:36.000000000 -0500 +@@ -990,7 +990,9 @@ + } + } else { + if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_RDONLY)) < 0) +- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY); ++ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY)) < 0) ++ fd = open("/sys/module/hid_apple/parameters/fnmode", O_RDONLY); ++ + + if (fd >= 0) { + if ((n = read (fd, ADBBuffer, ADB_BUFSIZE-1)) > 0) { +@@ -1025,7 +1027,8 @@ + } + } else { + if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_WRONLY)) < 0) +- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY); ++ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY)) < 0) ++ fd = open ("/sys/module/hid_apple/parameters/fnmode", O_WRONLY); + + if (fd >= 0) { + sprintf ((char*)ADBBuffer, "%d", config); diff --git a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r2.ebuild b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r2.ebuild index 2ce04ddbff87..ff443ebfdf77 100644 --- a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r2.ebuild +++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-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-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r2.ebuild,v 1.5 2008/08/24 13:31:37 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r2.ebuild,v 1.6 2008/12/28 02:14:12 josejx Exp $ inherit autotools flag-o-matic eutils @@ -23,7 +23,7 @@ RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0 ) >=dev-libs/glib-2.6" src_unpack() { - unpack "${A}" + unpack ${A} cd "${S}" epatch "${FILESDIR}/pmcs.patch" diff --git a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild new file mode 100644 index 000000000000..d23ac202b3d5 --- /dev/null +++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1-r3.ebuild,v 1.1 2008/12/28 02:14:12 josejx Exp $ + +inherit autotools flag-o-matic eutils + +DESCRIPTION="Handles power management and special keys on laptops." +HOMEPAGE="http://pbbuttons.berlios.de" +SRC_URI="mirror://sourceforge/pbbuttons/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="acpi alsa debug doc ibam macbook oss" + +DEPEND="macbook? ( + sys-libs/libsmbios + sys-apps/pciutils + ) + >=dev-libs/glib-2.6 + doc? ( app-doc/doxygen )" +RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0 ) + >=dev-libs/glib-2.6" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/pmcs.patch" + ### Don't link with g++ if we don't use ibam + if ! use ibam; then + epatch "${FILESDIR}/g++.patch" + fi + ### Fix macbook -lz issue + epatch "${FILESDIR}/lz.patch" + epatch "${FILESDIR}/lm.patch" + ### Fix new apple hid fnmode issue + epatch "${FILESDIR}/fnmode.patch" + eautoconf +} + +src_compile() { + # Fix crash bug on some systems + replace-flags -O? -O1 + + if use macbook; then + laptop=macbook + elif use x86 || use amd64; then + if use acpi; then + laptop=acpi + else + laptop=i386 + fi + # Default to PowerBook + else + laptop=powerbook + fi + + econf laptop=$laptop \ + $(use_enable debug) \ + $(use_with doc doxygen_docs) \ + $(use_with alsa) \ + $(use_with oss) \ + $(use_with ibam) \ + || die "Sorry, failed to configure pbbuttonsd" + + # Thanks to Stefan Bruda for this workaround + # Using -j1 fixes a parallel build issue with the docs + if use doc; then + emake -j1 || die "Sorry, failed to compile pbbuttonsd" + else + emake || die "Sorry, failed to compile pbbuttonsd" + fi +} + +src_install() { + dodir /etc/power + use ibam && dodir /var/lib/ibam + make DESTDIR="${D}" install || die "failed to install" + newinitd "${FILESDIR}/pbbuttonsd.rc6" pbbuttonsd + dodoc README + use doc && dohtml -r doc/* + + dodir /etc/power/resume.d + dodir /etc/power/suspend.d + dodir /etc/power/scripts.d + exeinto "/etc/power/scripts.d" + doexe "${FILESDIR}/wireless" + ln -s "${D}/etc/power/scripts.d/wireless" "${D}/etc/power/resume.d/wireless" +} + +pkg_postinst() { + if [ -e /etc/pbbuttonsd.conf ]; then + ewarn "The pbbuttonsd.cnf file replaces /etc/pbuttonsd.conf with a new" + ewarn "file (/etc/pbbuttonsd.conf) and a new format. Please check the" + ewarn "manual page with 'man pbbuttonsd.cnf' for details." + ewarn + fi + + if use macbook; then + ewarn "Macbook and Macbook Pro users should make sure to have applesmc" + ewarn "loaded before starting pbbuttonsdm otherwise auto-adjustments" + ewarn "will not work and pbbuttonsd may segfault." + fi + + ewarn "Ensure that the evdev kernel module is loaded otherwise" + ewarn "pbbuttonsd won't work. SysV IPC is also required." + ewarn + ewarn "If you need extra security, you can tell pbbuttonsd to only accept" + ewarn "input from one user. You can set the userallowed option in" + ewarn "/etc/pbbuttonsd.cnf to limit access." + ewarn + + if use ibam; then + elog "To properly initialize the IBaM battery database, you will" + elog "need to perform a full discharge/charge cycle. For more" + elog "details, please see the pbbuttonsd man page." + elog + fi + + elog "A script is now available to reset your wirless connection on resume." + elog "Simply uncomment the commented command and set the correct device to" + elog "use it. You can find the script in /etc/power/resume.d/wireless" + +} |