diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-07-31 04:30:42 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-07-31 04:30:42 +0000 |
commit | 5c00fdc64e8da1b6663a35e85027ca7eb09632d4 (patch) | |
tree | 6b0a33c63708fdc7b52a12a8c4532ee52c6c13c6 /sys-apps/kbd | |
parent | new version + some fixes (diff) | |
download | historical-5c00fdc64e8da1b6663a35e85027ca7eb09632d4.tar.gz historical-5c00fdc64e8da1b6663a35e85027ca7eb09632d4.tar.bz2 historical-5c00fdc64e8da1b6663a35e85027ca7eb09632d4.zip |
Fix struct kbd_rate not being fixed for sparc to use 'period' and not 'rate' (bug #25517)
Diffstat (limited to 'sys-apps/kbd')
-rw-r--r-- | sys-apps/kbd/ChangeLog | 6 | ||||
-rw-r--r-- | sys-apps/kbd/Manifest | 5 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.08-sparc-fixes.patch | 93 | ||||
-rw-r--r-- | sys-apps/kbd/kbd-1.08-r1.ebuild | 7 |
4 files changed, 107 insertions, 4 deletions
diff --git a/sys-apps/kbd/ChangeLog b/sys-apps/kbd/ChangeLog index cb8cac3e46e6..7f8fc3506116 100644 --- a/sys-apps/kbd/ChangeLog +++ b/sys-apps/kbd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/kbd # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kbd/ChangeLog,v 1.12 2003/07/29 17:51:40 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kbd/ChangeLog,v 1.13 2003/07/31 04:29:58 azarah Exp $ + + 31 Jul 2003; Martin Schlemmer <azarah@gentoo.org> kbd-1.08-r1.ebuild: + Fix struct kbd_rate not being fixed for sparc to use 'period' and not 'rate', + bug #25517. *kbd-1.08-r1 (29 Jul 2003) diff --git a/sys-apps/kbd/Manifest b/sys-apps/kbd/Manifest index 9bb46f1d4c59..ca3c18d49996 100644 --- a/sys-apps/kbd/Manifest +++ b/sys-apps/kbd/Manifest @@ -1,5 +1,6 @@ -MD5 1af3d8bf1de0b49a0a1bee490399d63b ChangeLog 2133 +MD5 a19d97a0b5a7ce03e0e2350315cb02fe ChangeLog 2300 MD5 f03b668fce4d663f9cc584d09e6150f6 kbd-1.06-r1.ebuild 1125 -MD5 d74bc64848f3ac83afdd5ee444227600 kbd-1.08-r1.ebuild 1414 +MD5 a2519d48c55d482a0d4893754bec966c kbd-1.08-r1.ebuild 1550 MD5 b1f1dbd569840cc0e1c97a7431466964 files/digest-kbd-1.06-r1 60 MD5 f6af43f3979cc9d66a938d22c1727388 files/digest-kbd-1.08-r1 60 +MD5 a7c268380c7d5fcd23f4d7b9e128765d files/kbd-1.08-sparc-fixes.patch 2055 diff --git a/sys-apps/kbd/files/kbd-1.08-sparc-fixes.patch b/sys-apps/kbd/files/kbd-1.08-sparc-fixes.patch new file mode 100644 index 000000000000..d12ed2012c0a --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.08-sparc-fixes.patch @@ -0,0 +1,93 @@ +--- kbd-1.08/src/kbdrate.c.orig 2003-07-30 23:05:29.000000000 +0200 ++++ kbd-1.08/src/kbdrate.c 2003-07-30 23:14:24.000000000 +0200 +@@ -109,7 +109,11 @@ + struct kbd_repeat kbdrep_s; + + /* don't change, just test */ ++#ifdef __sparc__ ++ kbdrep_s.rate = -1; ++#else + kbdrep_s.period = -1; ++#endif + kbdrep_s.delay = -1; + if (ioctl( 0, KDKBDREP, &kbdrep_s )) { + if (errno == EINVAL) +@@ -125,11 +129,27 @@ + + /* do the change */ + if (rate == 0) /* switch repeat off */ ++#ifdef __sparc__ ++ kbdrep_s.rate = 0; ++#else + kbdrep_s.period = 0; ++#endif + else ++#ifdef __sparc__ ++ kbdrep_s.rate = 1000.0 / rate; /* convert cps to msec */ ++#else + kbdrep_s.period = 1000.0 / rate; /* convert cps to msec */ ++#endif ++#ifdef __sparc__ ++ if (kbdrep_s.rate < 1) ++#else + if (kbdrep_s.period < 1) ++#endif ++#ifdef __sparc__ ++ kbdrep_s.rate = 1; ++#else + kbdrep_s.period = 1; ++#endif + kbdrep_s.delay = delay; + if (kbdrep_s.delay < 1) + kbdrep_s.delay = 1; +@@ -140,10 +160,18 @@ + } + + /* report */ ++#ifdef __sparc__ ++ if (kbdrep_s.rate == 0) ++#else + if (kbdrep_s.period == 0) ++#endif + rate = 0; + else ++#ifdef __sparc__ ++ rate = 1000.0 / (double) kbdrep_s.rate; ++#else + rate = 1000.0 / (double) kbdrep_s.period; ++#endif + + if (!silent) + printf( _("Typematic Rate set to %.1f cps (delay = %d ms)\n"), +@@ -164,10 +192,19 @@ + exit( 1 ); + } + ++#ifdef __sparc__ ++ kbdrate_s.rate = (int) (rate + 0.5); /* round up */ ++#else + kbdrate_s.period = (int) (rate + 0.5); /* round up */ ++#endif + kbdrate_s.delay = delay * HZ / 1000; /* convert ms to Hz */ ++#ifdef __sparc__ ++ if (kbdrate_s.rate > 50) ++ kbdrate_s.rate = 50; ++#else + if (kbdrate_s.period > 50) + kbdrate_s.period = 50; ++#endif + + if (ioctl( fd, KIOCSRATE, &kbdrate_s )) { + perror( "ioctl(KIOCSRATE)" ); +@@ -177,7 +214,11 @@ + + if (!silent) + printf( "Typematic Rate set to %d cps (delay = %d ms)\n", ++#ifdef __sparc__ ++ kbdrate_s.rate, kbdrate_s.delay * 1000 / HZ ); ++#else + kbdrate_s.period, kbdrate_s.delay * 1000 / HZ ); ++#endif + + return 1; + #else /* no KIOCSRATE */ diff --git a/sys-apps/kbd/kbd-1.08-r1.ebuild b/sys-apps/kbd/kbd-1.08-r1.ebuild index 6b2e708e97eb..c025d1b1615d 100644 --- a/sys-apps/kbd/kbd-1.08-r1.ebuild +++ b/sys-apps/kbd/kbd-1.08-r1.ebuild @@ -1,9 +1,11 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kbd/kbd-1.08-r1.ebuild,v 1.1 2003/07/29 17:51:40 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kbd/kbd-1.08-r1.ebuild,v 1.2 2003/07/31 04:29:58 azarah Exp $ IUSE="nls" +inherit eutils + S="${WORKDIR}/${P}" DESCRIPTION="Keyboard and console utilities" SRC_URI="ftp://ftp.cwi.nl/pub/aeb/kbd/${P}.tar.gz @@ -23,6 +25,9 @@ src_unpack() { cd ${S} # Fixes makefile so that it uses the CFLAGS from portage (bug #21320). sed -i -e "s:-O2:${CFLAGS}:g" src/Makefile.in + + # Sparc have not yet fixed struct kbd_rate to use 'period' and not 'rate'. + epatch ${FILESDIR}/${P}-sparc-fixes.patch } src_compile() { |