diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-10-31 21:20:51 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-10-31 21:20:51 +0000 |
commit | 7d0752370057e5873a9a2812b90612e4f401b12c (patch) | |
tree | b4446e622e5d01c5bbee1343ceb2fc72d4df3315 /sys-apps/kbd | |
parent | Add '--tty' switch to setfont, thanks to Krzysztof Kotlenga (diff) | |
download | gentoo-2-7d0752370057e5873a9a2812b90612e4f401b12c.tar.gz gentoo-2-7d0752370057e5873a9a2812b90612e4f401b12c.tar.bz2 gentoo-2-7d0752370057e5873a9a2812b90612e4f401b12c.zip |
Add '--tty' switch to setfont, thanks to Krzysztof Kotlenga
<pocek@polbrokers.ods.org>, bug #32279. Also add a few patches from Redhat,
and update our Sparc patch with a more simple one.
Diffstat (limited to 'sys-apps/kbd')
-rw-r--r-- | sys-apps/kbd/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/kbd/Manifest | 7 | ||||
-rw-r--r-- | sys-apps/kbd/files/digest-kbd-1.08-r4 | 1 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.06-othervt.patch | 55 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.08-nowarn.patch | 11 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.08-sparc.patch | 73 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.08-terminal.patch | 31 | ||||
-rw-r--r-- | sys-apps/kbd/kbd-1.08-r4.ebuild | 75 |
8 files changed, 259 insertions, 5 deletions
diff --git a/sys-apps/kbd/ChangeLog b/sys-apps/kbd/ChangeLog index 2259f91f72c1..7ad7dcf6688f 100644 --- a/sys-apps/kbd/ChangeLog +++ b/sys-apps/kbd/ChangeLog @@ -1,6 +1,15 @@ # 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.19 2003/09/23 23:43:09 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kbd/ChangeLog,v 1.20 2003/10/31 21:20:40 azarah Exp $ + +*kbd-1.08-r4 (31 Oct 2003) + + 31 Oct 2003; Martin Schlemmer <azarah@gentoo.org> kbd-1.08-r4.ebuild, + files/kbd-1.06-othervt.patch, files/kbd-1.08-nowarn.patch, + files/kbd-1.08-sparc.patch, files/kbd-1.08-terminal.patch: + Add '--tty' switch to setfont, thanks to Krzysztof Kotlenga + <pocek@polbrokers.ods.org>, bug #32279. Also add a few patches from Redhat, + and update our Sparc patch with a more simple one. *kbd-1.08-r3 (24 Sep 2003) diff --git a/sys-apps/kbd/Manifest b/sys-apps/kbd/Manifest index cc3995d2d894..6af076da9be4 100644 --- a/sys-apps/kbd/Manifest +++ b/sys-apps/kbd/Manifest @@ -1,9 +1,8 @@ MD5 4d1107e85a92f48d767d57651efeee83 kbd-1.08-r2.ebuild 1550 MD5 5554e78210a3583186e0b3fbe4f1a8f3 kbd-1.08-r3.ebuild 1707 -MD5 6fe1f61923c24600e78247ff9a456a05 ChangeLog 3363 -MD5 e56787f47de99e663b25c17fd6eaeb1c kbd-1.08-r4.ebuild 1879 +MD5 a19ec47a7defb23be89266d4a7e99537 ChangeLog 3779 +MD5 367c3e6608b45c33b43c7ff56d27e161 kbd-1.08-r4.ebuild 1921 MD5 4cc908e158d84eddfb6e9a67133938e7 kbd-1.08-r1.ebuild 1549 -MD5 a3f841b1555cdcf0931eb0a2283e8d4a .kbd-1.08-r4.ebuild.swp 12288 MD5 17b0176ba7f61c6ee4b2aa69e47580d3 kbd-1.06-r1.ebuild 1122 MD5 9dde9067630b0fb27bd8224753741463 files/kbd-1.08-sparc-fixes.patch 2375 MD5 f6af43f3979cc9d66a938d22c1727388 files/digest-kbd-1.08-r2 60 @@ -12,7 +11,7 @@ MD5 5b55b831e2ba400e09936d649e78a065 files/kbd-1.08-po-install-locations.patch 4 MD5 f6af43f3979cc9d66a938d22c1727388 files/digest-kbd-1.08-r3 60 MD5 bae0fb2144b6ea25fbaacf1e36452f48 files/kbd-1.08-nowarn.patch 341 MD5 756f158177d250477cb5e2426fa5b477 files/kbd-1.08-kbd_repeat.patch 4136 -MD5 a5964318d133c9754d20884d27458033 files/kbd-1.06-othervt.patch 1153 +MD5 86535adb8da923e0df3c58d9caa35ae6 files/kbd-1.06-othervt.patch 1605 MD5 6e007f04a80358ea81b27c80498a4808 files/kbd-1.08-terminal.patch 925 MD5 720c6652e5f463d18b20e53a03495723 files/kbd-1.08-sparc.patch 2083 MD5 f6af43f3979cc9d66a938d22c1727388 files/digest-kbd-1.08-r4 60 diff --git a/sys-apps/kbd/files/digest-kbd-1.08-r4 b/sys-apps/kbd/files/digest-kbd-1.08-r4 new file mode 100644 index 000000000000..9b77d0dd0db3 --- /dev/null +++ b/sys-apps/kbd/files/digest-kbd-1.08-r4 @@ -0,0 +1 @@ +MD5 924e6a05e52715dc0f96385b35f2f680 kbd-1.08.tar.gz 819924 diff --git a/sys-apps/kbd/files/kbd-1.06-othervt.patch b/sys-apps/kbd/files/kbd-1.06-othervt.patch new file mode 100644 index 000000000000..5a4d69eaa7d0 --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.06-othervt.patch @@ -0,0 +1,55 @@ +--- kbd-1.06/src/setfont.c.p4 Mon Feb 12 11:17:59 2001 ++++ kbd-1.06/src/setfont.c Wed Jul 18 18:06:38 2001 +@@ -84,6 +84,7 @@ + " setfont -{8|14|16} codepage.cp[.gz] Load 8x<N> font from codepage.cp\n" + "Explicitly (with -m or -u) or implicitly (in the fontfile) given mappings\n" + "will be loaded and, in the case of consolemaps, activated.\n" ++" --tty=device Use `device' as console device for ioctls.\n" + " -h<N> (no space) Override font height.\n" + " -m <fn> Load console screen map.\n" + " -u <fn> Load font unicode map.\n" +@@ -101,7 +101,7 @@ + int + main(int argc, char *argv[]) { + char *ifiles[MAXIFILES]; +- char *mfil, *ufil, *Ofil, *ofil, *omfil, *oufil; ++ char *mfil, *ufil, *Ofil, *ofil, *omfil, *oufil, *tty; + int ifilct = 0, fd, i, iunit, hwunit, no_m, no_u; + int restore = 0; + +@@ -111,9 +111,7 @@ + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + +- fd = getfd(); +- +- ifiles[0] = mfil = ufil = Ofil = ofil = omfil = oufil = 0; ++ ifiles[0] = mfil = ufil = Ofil = ofil = omfil = oufil = tty = NULL; + iunit = hwunit = 0; + no_m = no_u = 0; + +@@ -160,6 +158,8 @@ + hwunit = atoi(argv[i]+2); + if (hwunit <= 0 || hwunit > 32) + usage(); ++ } else if (!strncmp(argv[i], "--tty", 5)) { ++ tty = argv[i] + 6; + } else if (argv[i][0] == '-') { + iunit = atoi(argv[i]+1); + if(iunit <= 0 || iunit > 32) +@@ -171,6 +171,15 @@ + } + ifiles[ifilct++] = argv[i]; + } ++ } ++ ++ if (tty) { ++ if ((fd = open(tty, O_RDWR)) == -1) { ++ perror("open"); ++ exit(EX_OSERR); ++ } ++ } else { ++ fd = getfd(); + } + + if (ifilct && restore) { diff --git a/sys-apps/kbd/files/kbd-1.08-nowarn.patch b/sys-apps/kbd/files/kbd-1.08-nowarn.patch new file mode 100644 index 000000000000..7b0f87960292 --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.08-nowarn.patch @@ -0,0 +1,11 @@ +--- kbd-1.08/src/ksyms.c.orig 2003-07-31 15:08:42.000000000 -0400 ++++ kbd-1.08/src/ksyms.c 2003-07-31 15:10:32.000000000 -0400 +@@ -1811,6 +1811,8 @@ + sprintf(buf, "0x%04x", code); + p = buf; + } ++#if 0 /* keep from whining about capslock in unicode mode */ + fprintf(stderr, _("plus before %s ignored\n"), p); ++#endif + return code; + } diff --git a/sys-apps/kbd/files/kbd-1.08-sparc.patch b/sys-apps/kbd/files/kbd-1.08-sparc.patch new file mode 100644 index 000000000000..72d84605ed7d --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.08-sparc.patch @@ -0,0 +1,73 @@ +Don't try unimplemented ioctls on SPARC, even if they +are defined in headers -- that way lies madness. + +--- kbd-1.08/man/man8/kbdrate.8 2002-10-11 07:08:58.000000000 -0400 ++++ kbd-1.08/man/man8/kbdrate.8 2002-11-22 17:28:15.000000000 -0500 +@@ -22,7 +22,7 @@ + without any options will reset the repeat rate to 10.9 characters per second (cps) + and the delay to 250 milliseconds (ms) for Intel- and M68K-based systems. + These are the IBM defaults. On SPARC-based systems it will reset the repeat rate +-to 5 cps and the delay to 200 ms. ++to 20 cps and the delay to 200 ms. + + .SH OPTIONS + .TP +@@ -69,3 +69,5 @@ + .I /etc/rc.local + .br + .I /dev/port ++.br ++.I /dev/kbd +--- kbd-1.08/src/kbdrate.c 2002-10-11 07:09:01.000000000 -0400 ++++ kbd-1.08/src/kbdrate.c 2002-11-22 17:34:48.000000000 -0500 +@@ -104,8 +104,11 @@ + + static int + KDKBDREP_ioctl_ok(double rate, int delay, int silent) { ++#if defined(KDKBDREP) && !defined(__sparc__) + /* This ioctl is defined in <linux/kd.h> but is not +- implemented anywhere - must be in some m68k patches. */ ++ implemented anywhere - must be in some m68k patches. ++ We cannot blindly try unimplemented ioctls on sparc64 - ++ the 32<->64bit transition layer does not like it. */ + struct kbd_repeat kbdrep_s; + + /* don't change, just test */ +@@ -150,6 +153,9 @@ + rate, kbdrep_s.delay ); + + return 1; /* success! */ ++#else /* no KDKBDREP or __sparc__ */ ++ return 0; ++#endif /* KDKBDREP */ + } + + static int +@@ -188,7 +194,7 @@ + int + main( int argc, char **argv ) { + #ifdef __sparc__ +- double rate = 5.0; /* Default rate */ ++ double rate = 20.0; /* Default rate */ + int delay = 200; /* Default delay */ + #else + double rate = 10.9; /* Default rate */ +@@ -238,8 +244,9 @@ + return 0; + + +- /* The ioport way */ ++ /* The ioport way - will crash on sparc */ + ++#ifndef __sparc__ + for (i = 0; i < RATE_COUNT; i++) + if (rate * 10 >= valid_rates[i]) { + value &= 0x60; +@@ -285,5 +292,7 @@ + valid_rates[value & 0x1f] / 10.0, + valid_delays[ (value & 0x60) >> 5 ] ); + ++#endif ++ + return 0; + } diff --git a/sys-apps/kbd/files/kbd-1.08-terminal.patch b/sys-apps/kbd/files/kbd-1.08-terminal.patch new file mode 100644 index 000000000000..13aeeec11512 --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.08-terminal.patch @@ -0,0 +1,31 @@ +Output terminal control sequences only when output is a terminal. + +--- kbd-1.08/src/unicode_start 2002-11-22 19:23:00.000000000 -0500 ++++ kbd-1.08/src/unicode_start 2002-11-22 19:24:34.000000000 -0500 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # Enables Unicode processing in the current console. + # + # 1. The input side: the keyboard driver. +@@ -25,7 +25,9 @@ + # Tell the console output driver that the bytes arriving are UTF-8 + # encoded multibyte sequences. + +-echo -n -e '\033%G' ++if test -t 1 -a -t 2 ; then ++ echo -n -e '\033%G' ++fi + + # Tell the graphics card how to display Unicode characters not + # contained in the IBM 437 character set (on PCs). The font should +--- kbd-1.08/src/unicode_stop 2002-11-22 19:23:30.000000000 -0500 ++++ kbd-1.08/src/unicode_stop 2002-11-22 19:24:15.000000000 -0500 +@@ -1,4 +1,6 @@ + #!/bin/sh + # stop unicode + kbd_mode -a +-echo -n -e '\033%@' ++if test -t ; then ++ echo -n -e '\033%@' ++fi diff --git a/sys-apps/kbd/kbd-1.08-r4.ebuild b/sys-apps/kbd/kbd-1.08-r4.ebuild new file mode 100644 index 000000000000..133d96500e77 --- /dev/null +++ b/sys-apps/kbd/kbd-1.08-r4.ebuild @@ -0,0 +1,75 @@ +# 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-r4.ebuild,v 1.1 2003/10/31 21:20:40 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 + ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/utils/kbd/${P}.tar.gz" +HOMEPAGE="http://freshmeat.net/projects/kbd/" + +KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~alpha ~mips ~hppa ~arm ~ia64" +SLOT="0" +LICENSE="GPL-2" + +DEPEND="virtual/glibc nls? ( sys-devel/gettext )" +PROVIDE="sys-apps/console-tools" + +src_unpack() { + unpack ${A} + + 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}-kbd_repeat.patch + epatch ${FILESDIR}/${P}-sparc.patch + + # Add the --tty switch + epatch ${FILESDIR}/${PN}-1.06-othervt.patch + + # Other patches from RH + epatch ${FILESDIR}/${P}-nowarn.patch + epatch ${FILESDIR}/${P}-terminal.patch + + # Locales do not use DATADIR corretly, and thus install to /share, and + # not /usr/share, bug #26384. + epatch ${FILESDIR}/${P}-po-install-locations.patch +} + +src_compile() { + local myconf= + + # Non-standard configure script; --disable-nls to + # disable NLS, nothing to enable it. + use nls || myconf="--disable-nls" + + # We should not add the prefix to mandir and datadir + ./configure --prefix=/usr \ + --mandir=/share/man \ + --datadir=/share \ + ${myconf} || die + + make || die +} + +src_install() { + make \ + DESTDIR=${D} \ + DATADIR=${D}/usr/share \ + MANDIR=${D}/usr/share/man \ + install || die + + dodir /usr/bin + dosym ../../bin/setfont /usr/bin/setfont + + dodoc CHANGES CREDITS COPYING README + dodir /usr/share/doc/${PF}/html + cp -dR doc/* ${D}/usr/share/doc/${PF}/html/ +} + |