diff options
author | Samuli Suominen <drac@gentoo.org> | 2008-07-30 13:13:25 +0000 |
---|---|---|
committer | Samuli Suominen <drac@gentoo.org> | 2008-07-30 13:13:25 +0000 |
commit | 016c99b5104fb6e3d1768b47b85567be1bafbeee (patch) | |
tree | 1baa9d27733252c0734ed956d7a7b1071eac3d33 /x11-drivers/synaptics | |
parent | Removing mask for non-existing unicode-date-5.2.0 (diff) | |
download | gentoo-2-016c99b5104fb6e3d1768b47b85567be1bafbeee.tar.gz gentoo-2-016c99b5104fb6e3d1768b47b85567be1bafbeee.tar.bz2 gentoo-2-016c99b5104fb6e3d1768b47b85567be1bafbeee.zip |
Apply configurable polling interval patch from Novell so that syndaemon doesn't wake up CPU so often. Bug 216679, thanks to Roland Tapken, Thomas Kirchner and Krister Bäckman.
(Portage version: 2.2_rc3/cvs/Linux 2.6.26-rc3 x86_64)
Diffstat (limited to 'x11-drivers/synaptics')
-rw-r--r-- | x11-drivers/synaptics/ChangeLog | 11 | ||||
-rw-r--r-- | x11-drivers/synaptics/files/synaptics-0.14.6-configurable_polling_interval.patch | 58 | ||||
-rw-r--r-- | x11-drivers/synaptics/synaptics-0.14.6-r3.ebuild | 100 |
3 files changed, 168 insertions, 1 deletions
diff --git a/x11-drivers/synaptics/ChangeLog b/x11-drivers/synaptics/ChangeLog index a1f5e8371223..7c4df65436cc 100644 --- a/x11-drivers/synaptics/ChangeLog +++ b/x11-drivers/synaptics/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-drivers/synaptics # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/synaptics/ChangeLog,v 1.36 2008/04/07 15:17:56 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/synaptics/ChangeLog,v 1.37 2008/07/30 13:13:24 drac Exp $ + +*synaptics-0.14.6-r3 (30 Jul 2008) + + 30 Jul 2008; Samuli Suominen <drac@gentoo.org> + +files/synaptics-0.14.6-configurable_polling_interval.patch, + +synaptics-0.14.6-r3.ebuild: + Apply configurable polling interval patch from Novell so that syndaemon + doesn't wake up CPU so often. Bug 216679, thanks to Roland Tapken, Thomas + Kirchner and Krister Bäckman. 07 Apr 2008; Doug Goldstein <cardoe@gentoo.org> synaptics-0.14.6.ebuild, synaptics-0.14.6-r1.ebuild, synaptics-0.14.6-r2.ebuild: diff --git a/x11-drivers/synaptics/files/synaptics-0.14.6-configurable_polling_interval.patch b/x11-drivers/synaptics/files/synaptics-0.14.6-configurable_polling_interval.patch new file mode 100644 index 000000000000..8c6ea279d140 --- /dev/null +++ b/x11-drivers/synaptics/files/synaptics-0.14.6-configurable_polling_interval.patch @@ -0,0 +1,58 @@ +--- ./syndaemon.c 2006-04-16 21:31:43.000000000 +0200 ++++ ./syndaemon.c 2007-10-16 13:40:02.000000000 +0200 +@@ -43,9 +43,11 @@ + static void + usage() + { +- fprintf(stderr, "Usage: syndaemon [-i idle-time] [-d] [-t] [-k]\n"); ++ fprintf(stderr, "Usage: syndaemon [-i idle-time] [-m poll-delay] [-d] [-t] [-k]\n"); + fprintf(stderr, " -i How many seconds to wait after the last key press before\n"); + fprintf(stderr, " enabling the touchpad. (default is 2.0s)\n"); ++ fprintf(stderr, " -m How many milli-seconds to wait until next poll.\n"); ++ fprintf(stderr, " (default is 20ms)\n"); + fprintf(stderr, " -d Start as a daemon, ie in the background.\n"); + fprintf(stderr, " -p Create a pid file with the specified name.\n"); + fprintf(stderr, " -t Only disable tapping and scrolling, not mouse movements.\n"); +@@ -159,9 +161,8 @@ + } + + static void +-main_loop(Display *display, double idle_time) ++main_loop(Display *display, double idle_time, int poll_delay) + { +- const int poll_delay = 20000; /* 20 ms */ + double last_activity = 0.0; + double current_time; + +@@ -228,17 +229,21 @@ + main(int argc, char *argv[]) + { + double idle_time = 2.0; ++ int poll_delay = 20000; /* 20 ms */ + Display *display; + int c; + int shmid; + int ignore_modifier_keys = 0; + + /* Parse command line parameters */ +- while ((c = getopt(argc, argv, "i:dtp:kK?")) != EOF) { ++ while ((c = getopt(argc, argv, "i:m:dtp:kK?")) != EOF) { + switch(c) { + case 'i': + idle_time = atof(optarg); + break; ++ case 'm': ++ poll_delay = atoi(optarg) * 1000; ++ break; + case 'd': + background = 1; + break; +@@ -314,7 +319,7 @@ + setup_keyboard_mask(display, ignore_modifier_keys); + + /* Run the main loop */ +- main_loop(display, idle_time); ++ main_loop(display, idle_time, poll_delay); + + return 0; + } diff --git a/x11-drivers/synaptics/synaptics-0.14.6-r3.ebuild b/x11-drivers/synaptics/synaptics-0.14.6-r3.ebuild new file mode 100644 index 000000000000..fbd416b70f97 --- /dev/null +++ b/x11-drivers/synaptics/synaptics-0.14.6-r3.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/synaptics/synaptics-0.14.6-r3.ebuild,v 1.1 2008/07/30 13:13:24 drac Exp $ + +inherit toolchain-funcs eutils linux-info + +IUSE="hal" + +DESCRIPTION="Driver for Synaptics touchpads" +HOMEPAGE="http://w1.894.telia.com/~u89404340/touchpad/" +SRC_URI="http://w1.894.telia.com/~u89404340/touchpad/files/${P}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +RDEPEND="x11-libs/libXext + hal? ( sys-apps/hal )" +DEPEND="${RDEPEND} + x11-base/xorg-server + x11-proto/inputproto + >=sys-apps/sed-4" + +evdev-input_check() { + # Check kernel config for required event interface support (either + # built-in or as a module. Bug #134309. + + ebegin "Checking kernel config for event device support" + linux_chkconfig_present INPUT_EVDEV + eend $? + + if [[ $? -ne 0 ]] ; then + ewarn "Synaptics driver requires event interface support." + ewarn "Please enable the event interface in your kernel config." + ewarn "The option can be found at:" + ewarn + ewarn " Device Drivers" + ewarn " Input device support" + ewarn " -*- Generic input layer" + ewarn " <*> Event interface" + ewarn + ewarn "Then rebuild the kernel or install the module." + epause 5 + fi +} + +pkg_setup() { + linux-info_pkg_setup + evdev-input_check +} + +src_unpack() { + unpack ${A} ; cd "${S}" + + # Switch up the CC and CFLAGS stuff. + sed -i \ + -e "s:CC = gcc:CC = $(tc-getCC):g" \ + -e "s:CDEBUGFLAGS = -O2:CDEBUGFLAGS = ${CFLAGS}:g" \ + "${S}"/Makefile + + # Fix grabbing of event devices so it will not stop working together with + # packages which grab their devices at their own like sys-apps/inputd does. + epatch "${FILESDIR}"/synaptics-fixeventgrab.diff + + epatch "${FILESDIR}"/synaptics_input_api.diff + + # Patch the Makefile to install the library as executable. Bug #215323. + epatch "${FILESDIR}"/synaptics-install-so-exec.patch + + # Fix to handle multiple screens through Xinerama properly. Bug #206614. + epatch "${FILESDIR}"/synaptics-fix-xinerama.patch + + # Adds configurable polling interval. Patch from Novell. Bug #216679. + epatch "${FILESDIR}"/${P}-configurable_polling_interval.patch +} + +src_compile() { + emake || die +} + +src_install() { + make \ + DESTDIR="${D}" \ + PREFIX=/usr \ + MANDIR="${D}"/usr/share/man \ + install || die + + dodoc script/usbmouse script/usbhid alps.patch trouble-shooting.txt + dodoc COMPATIBILITY FILES INSTALL* NEWS TODO README* + + # Stupid new daemon, didn't work for me because of shm issues + newinitd "${FILESDIR}"/rc.init syndaemon + newconfd "${FILESDIR}"/rc.conf syndaemon + + if use hal ; then + # Have HAL assign this driver to supported touchpads. + insinto /usr/share/hal/fdi/policy/10osvendor + doins "${FILESDIR}"/11-x11-synaptics.fdi + fi +} |