summaryrefslogtreecommitdiffstats
path: root/sys-apps/kbd/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/kbd/files')
-rw-r--r--sys-apps/kbd/files/alias-console-tools.sh23
-rw-r--r--sys-apps/kbd/files/alias-console-tools2.sh23
-rw-r--r--sys-apps/kbd/files/console-tools-ds-bin.tar.bz2bin0 -> 748 bytes
-rwxr-xr-xsys-apps/kbd/files/consolechars22
-rw-r--r--sys-apps/kbd/files/controlkeys26
-rwxr-xr-xsys-apps/kbd/files/dynamicvc21
-rw-r--r--sys-apps/kbd/files/kbd-1.08-terminal.patch31
-rw-r--r--sys-apps/kbd/files/kbd-1.12-Meta_utf8.patch11
-rw-r--r--sys-apps/kbd/files/kbd-1.12-alias.patch47
-rw-r--r--sys-apps/kbd/files/kbd-1.12-configure-LANG.patch27
-rw-r--r--sys-apps/kbd/files/kbd-1.12-cz-qwerty-map.patch101
-rw-r--r--sys-apps/kbd/files/kbd-1.12-debian.patch86
-rw-r--r--sys-apps/kbd/files/kbd-1.12-find-map-fix.patch37
-rw-r--r--sys-apps/kbd/files/kbd-1.12-it-euro-map.patch18
-rw-r--r--sys-apps/kbd/files/kbd-1.12-jp-escape.patch16
-rw-r--r--sys-apps/kbd/files/kbd-1.12-kbd_repeat-v2.patch27
-rw-r--r--sys-apps/kbd/files/kbd-1.12-kbio.patch25
-rw-r--r--sys-apps/kbd/files/kbd-1.12-setfont-man.patch14
-rw-r--r--sys-apps/kbd/files/kbd-1.12-unimap.patch16
-rw-r--r--sys-apps/kbd/files/kbd-1.12-xcompile.patch21
-rw-r--r--sys-apps/kbd/files/kbd-1.13-dont-use-error.patch17
-rw-r--r--sys-apps/kbd/files/kbd-1.14-ds-nohost.patch12
-rw-r--r--sys-apps/kbd/files/kbd-1.14-ds-unicode.patch59
-rw-r--r--sys-apps/kbd/files/kbd-1.14.1-missing-configure.patch15
-rw-r--r--sys-apps/kbd/files/kbd-1.15.1-ds-nohost.patch12
-rw-r--r--sys-apps/kbd/files/kbd-ds-nohost.patch12
-rw-r--r--sys-apps/kbd/files/keymaps.tar.bz2bin0 -> 15065 bytes
27 files changed, 719 insertions, 0 deletions
diff --git a/sys-apps/kbd/files/alias-console-tools.sh b/sys-apps/kbd/files/alias-console-tools.sh
new file mode 100644
index 0000000..b9ecfa2
--- /dev/null
+++ b/sys-apps/kbd/files/alias-console-tools.sh
@@ -0,0 +1,23 @@
+alias koif="consolechars -f Cyr_a8x16 -m koi8-r &>/dev/null"
+alias altf="consolechars -f Cyr_a8x16 -m cp866 &>/dev/null"
+alias winf="consolechars -f Cyr_a8x16 -m cp1251 &>/dev/null"
+alias isof="consolechars -f Cyr_a8x16 -m iso8859-5 &>/setdev/null"
+alias macf="consolechars -f Cyr_a8x16 -m MacCyrillic &>/dev/null"
+#unicode_start & unicode_stop for unicode
+
+alias seteng="loadkeys us.map &>/dev/null"
+alias setalt="loadkeys alt.map &>/dev/null"
+alias setkoi="loadkeys koi8.map &>/dev/null"
+alias setiso="loadkeys iso.map &>/dev/null"
+alias setwin="loadkeys win.map &>/dev/null"
+alias setuni="loadkeys ru4.uni.kmap &>/dev/null"
+
+alias locale-koi="export LC_CTYPE=ru_RU.KOI8-R; export LC_COLLATE=ru_RU.KOI8-R";
+alias locale-win="export LC_CTYPE=ru_RU.CP1251; export LC_COLLATE=ru_RU.CP1251";
+alias locale-alt="export LC_CTYPE=ru_RU.CP866; export LC_COLLATE=ru_RU.CP866";
+alias locale-utf="export LC_CTYPE=ru_RU.UTF-8; export LC_COLLATE=ru_RU.UTF-8";
+
+alias xterm-koi="LC_CTYPE=ru_RU.KOI8-R LC_COLLATE=ru_RU.KOI8-R xterm";
+alias xterm-win="LC_CTYPE=ru_RU.CP1251 LC_COLLATE=ru_RU.CP1251 xterm";
+alias xterm-alt="LC_CTYPE=ru_RU.CP866 LC_COLLATE=ru_RU.CP866 xterm";
+alias xterm-utf="LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8 xterm";
diff --git a/sys-apps/kbd/files/alias-console-tools2.sh b/sys-apps/kbd/files/alias-console-tools2.sh
new file mode 100644
index 0000000..e015595
--- /dev/null
+++ b/sys-apps/kbd/files/alias-console-tools2.sh
@@ -0,0 +1,23 @@
+alias koif="setfont -m koi8-r Cyr_a8x16 &>/dev/null"
+alias altf="setfont -m cp866 Cyr_a8x16 &>/dev/null"
+alias winf="setfont -m cp1251 Cyr_a8x16 &>/dev/null"
+alias isof="setfont -m iso8859-5 Cyr_a8x16 &>/setdev/null"
+alias macf="setfont -m MacCyrillic Cyr_a8x16 &>/dev/null"
+#unicode_start & unicode_stop for unicode
+
+alias seteng="loadkeys us.map &>/dev/null"
+alias setalt="loadkeys alt.map &>/dev/null"
+alias setkoi="loadkeys koi8.map &>/dev/null"
+alias setiso="loadkeys iso.map &>/dev/null"
+alias setwin="loadkeys win.map &>/dev/null"
+alias setuni="loadkeys ru4.uni.kmap &>/dev/null"
+
+alias locale-koi="export LC_CTYPE=ru_RU.KOI8-R; export LC_COLLATE=ru_RU.KOI8-R";
+alias locale-win="export LC_CTYPE=ru_RU.CP1251; export LC_COLLATE=ru_RU.CP1251";
+alias locale-alt="export LC_CTYPE=ru_RU.CP866; export LC_COLLATE=ru_RU.CP866";
+alias locale-utf="export LC_CTYPE=ru_RU.UTF-8; export LC_COLLATE=ru_RU.UTF-8";
+
+alias xterm-koi="LC_CTYPE=ru_RU.KOI8-R LC_COLLATE=ru_RU.KOI8-R xterm";
+alias xterm-win="LC_CTYPE=ru_RU.CP1251 LC_COLLATE=ru_RU.CP1251 xterm";
+alias xterm-alt="LC_CTYPE=ru_RU.CP866 LC_COLLATE=ru_RU.CP866 xterm";
+alias xterm-utf="LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8 xterm";
diff --git a/sys-apps/kbd/files/console-tools-ds-bin.tar.bz2 b/sys-apps/kbd/files/console-tools-ds-bin.tar.bz2
new file mode 100644
index 0000000..57d00bb
--- /dev/null
+++ b/sys-apps/kbd/files/console-tools-ds-bin.tar.bz2
Binary files differ
diff --git a/sys-apps/kbd/files/consolechars b/sys-apps/kbd/files/consolechars
new file mode 100755
index 0000000..810829f
--- /dev/null
+++ b/sys-apps/kbd/files/consolechars
@@ -0,0 +1,22 @@
+#! /bin/bash
+
+setfont=0
+setmap=0
+
+for name in $@; do
+ if [ $setfont -eq 1 ]; then
+ setfont $name
+ setfont=0
+ fi
+
+ if [ $setmap -eq 1 ]; then
+ mapscrn $name
+ setmap=0
+ fi
+
+ if [ $name = "-f" ]; then
+ setfont=1
+ elif [ $name = "-m" ]; then
+ setmap=1
+ fi
+done
diff --git a/sys-apps/kbd/files/controlkeys b/sys-apps/kbd/files/controlkeys
new file mode 100644
index 0000000..3d2aa1c
--- /dev/null
+++ b/sys-apps/kbd/files/controlkeys
@@ -0,0 +1,26 @@
+ alt keycode 103 = Spawn_Console
+ alt keycode 108 = Last_Console
+ altgr keycode 59 = Console_13
+ altgr keycode 60 = Console_14
+ altgr keycode 61 = Console_15
+ altgr keycode 62 = Console_16
+ altgr keycode 63 = Console_17
+ altgr keycode 64 = Console_18
+ altgr keycode 65 = Console_19
+ altgr keycode 66 = Console_20
+ altgr keycode 67 = Console_21
+ altgr keycode 68 = Console_22
+ altgr keycode 87 = Console_23
+ altgr keycode 88 = Console_24
+ control altgr keycode 59 = Console_13
+ control altgr keycode 60 = Console_14
+ control altgr keycode 61 = Console_15
+ control altgr keycode 62 = Console_16
+ control altgr keycode 63 = Console_17
+ control altgr keycode 64 = Console_18
+ control altgr keycode 65 = Console_19
+ control altgr keycode 66 = Console_20
+ control altgr keycode 67 = Console_21
+ control altgr keycode 68 = Console_22
+ control altgr keycode 87 = Console_23
+ control altgr keycode 88 = Console_24
diff --git a/sys-apps/kbd/files/dynamicvc b/sys-apps/kbd/files/dynamicvc
new file mode 100755
index 0000000..e50792f
--- /dev/null
+++ b/sys-apps/kbd/files/dynamicvc
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+depend() {
+ need consolefont
+}
+
+start() {
+ ebegin "Starting dynamic-vc"
+ loadkeys < /etc/conf.d/controlkeys
+ start-stop-daemon --start --quiet --background --exec /usr/bin/spawn_login
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dynamic-vc"
+ start-stop-daemon --stop --quiet --exec /usr/bin/spawn_login
+ eend $?
+}
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 0000000..13aeeec
--- /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/files/kbd-1.12-Meta_utf8.patch b/sys-apps/kbd/files/kbd-1.12-Meta_utf8.patch
new file mode 100644
index 0000000..9bc68b6
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-Meta_utf8.patch
@@ -0,0 +1,11 @@
+--- kbd-1.12/src/ksyms.c.org 2005-01-11 16:38:32.000000000 +0100
++++ kbd-1.12/src/ksyms.c 2005-01-11 16:46:19.000000000 +0100
+@@ -1710,6 +1710,8 @@
+ keycode = ksymtocode(s+5);
+ if (KTYP(keycode) == KT_LATIN)
+ return K(KT_META, KVAL(keycode));
++ else if(prefer_unicode)
++ return (0);
+ /* fall through to error printf */
+ }
+
diff --git a/sys-apps/kbd/files/kbd-1.12-alias.patch b/sys-apps/kbd/files/kbd-1.12-alias.patch
new file mode 100644
index 0000000..30be4fa
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-alias.patch
@@ -0,0 +1,47 @@
+diff -u kbd-1.12/src/psffontop.c kbd-1.12/src/psffontop.c
+--- kbd-1.12/src/psffontop.c 2005-03-12 00:48:30.075310872 +0100
++++ kbd-1.12/src/psffontop.c 2005-05-14 10:49:59.000000000 +0900
+@@ -59,7 +59,6 @@
+
+ static unsigned int
+ assemble_ucs2(char **inptr, int cnt) {
+- unsigned char **in = (unsigned char **) inptr;
+ unsigned int u1, u2;
+
+ if (cnt < 2) {
+@@ -68,8 +67,8 @@
+ exit(EX_DATAERR);
+ }
+
+- u1 = *(*in)++;
+- u2 = *(*in)++;
++ u1 = (unsigned char)*(*inptr)++;
++ u2 = (unsigned char)*(*inptr)++;
+ return (u1 | (u2 << 8));
+ }
+
+@@ -110,7 +109,6 @@
+ */
+ static void
+ get_uni_entry(char **inptr, char **endptr, struct unicode_list *up, int utf8) {
+- unsigned char **in = (unsigned char **) inptr;
+ unsigned char uc;
+ unicode unichar;
+ int inseq = 0;
+@@ -126,14 +124,14 @@
+ exit(EX_DATAERR);
+ }
+ if (utf8) {
+- uc = *(*in)++;
++ uc = *(*inptr)++;
+ if (uc == PSF2_SEPARATOR)
+ break;
+ if (uc == PSF2_STARTSEQ) {
+ inseq = 1;
+ continue;
+ }
+- --(*in);
++ --(*inptr);
+ unichar = assemble_utf8(inptr, *endptr - *inptr);
+ } else {
+ unichar = assemble_ucs2(inptr, *endptr - *inptr);
diff --git a/sys-apps/kbd/files/kbd-1.12-configure-LANG.patch b/sys-apps/kbd/files/kbd-1.12-configure-LANG.patch
new file mode 100644
index 0000000..554c4f3
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-configure-LANG.patch
@@ -0,0 +1,27 @@
+The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
+option parsing, it may break.
+
+http://bugs.gentoo.org/128253
+
+--- configure
++++ configure
+@@ -8,6 +8,19 @@
+ # New default: /usr/share/kbd
+ #
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ unset $as_var
++ fi
++done
++
+ prefix=
+ datadir=
+ mandir=
diff --git a/sys-apps/kbd/files/kbd-1.12-cz-qwerty-map.patch b/sys-apps/kbd/files/kbd-1.12-cz-qwerty-map.patch
new file mode 100644
index 0000000..a27c88a
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-cz-qwerty-map.patch
@@ -0,0 +1,101 @@
+kavol@email.cz writes:
+
+I wanted to use the keymap file /usr/share/keymaps/i386/qwerty/cz.map.gz,
+but I have found this to be qwertz so I think it should be placed in
+/usr/share/keymaps/i386/qwertz/ (or, much better, converted to qwerty -
+I don't understand the masochists who use us-qwerty and cz-qwertz together :-)
+
+http://bugs.gentoo.org/show_bug.cgi?id=19010
+
+Gentoo notes:
+We copy the qwerty/cz.map to qwertz/cz.map and then apply this patch ...
+that way we end up with both a qwerty and qwertz version of the cz.map
+
+--- data/keymaps/i386/qwerty/cz.map.old 2004-06-21 00:03:22.000000000 +0200
++++ data/keymaps/i386/qwerty/cz.map 2004-10-24 16:04:44.471056808 +0200
+@@ -1,6 +1,9 @@
++# *** toto neni originalni verze souboru:
++# *** upraveno z puvodni QWERTZ na QWERTY + opraveno par preklepu
++#
+ # Tato keymapa NENI urcena pro jadro "opatchovane" programem "patch-capslock"
+ #
+-# klavesova mapa kompatibilni s windows QWERTZ
++# klavesova mapa kompatibilni s windows QWERTY
+ #
+ # Vytvoril: Richard S~puta, Richard.Sputa@os3.os.ds.mfcr.cz
+ #
+@@ -11,7 +14,7 @@
+ # Links: ftp://ftp.penguin.cz/pub/cestina/klavesnice/console/
+ # - primary ftp archiv
+ # http://www.debian.cz/proj/czkbd/index.php3
+-# - czech keyboard standarts
++# - czech keyboard standards
+ #
+ #
+ # POZOR: Tato klavesova mapa obsahuje ve skutecnosti 2 (dve) klavesnice
+@@ -27,7 +30,7 @@
+ # Navic klavesa "PrintScreen" funguje jako carka a hacek
+ #
+ #
+-# Rozsireni oproti standartni_CESKE_unikodove_klavesnici
++# Rozsireni oproti standardni_CESKE_unikodove_klavesnici
+ # (zde jsou popsany pouze kombinace, jejichz umisteni je diskutabilni)
+ # (popis ostatnich rozsireni je v souboru "readme.txt")
+ # 1) AltGr-SPACE => znak "nobreakspace" (neoddelitelna mezera kod 0xa0)
+@@ -148,7 +151,7 @@
+ # Linefeed (primarni) => Control_j
+ #
+ # vzdalenost mezi zacatky symbolu:
+-# 12 znaku (standartne) vyhovuje 80% symbolickych nazvu
++# 12 znaku (standardne) vyhovuje 80% symbolickych nazvu
+ # 25 znaku ma symbolicky nazev Meta_Control_bracketright
+ # 123456789012 123456789012 123456789012 123456789012 123456789012
+ keycode 1 = Escape Escape VoidSymbol VoidSymbol VoidSymbol \
+@@ -383,15 +386,15 @@
+ VoidSymbol VoidSymbol +T t VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_T Meta_t \
+ VoidSymbol
+-keycode 21 = +z Z VoidSymbol VoidSymbol Control_z \
+- Control_z VoidSymbol VoidSymbol Meta_z Meta_Z \
+- VoidSymbol VoidSymbol +Z z VoidSymbol \
+- VoidSymbol VoidSymbol VoidSymbol Meta_Z Meta_z \
++keycode 21 = +y Y VoidSymbol VoidSymbol Control_y \
++ Control_y VoidSymbol VoidSymbol Meta_y Meta_Y \
++ VoidSymbol VoidSymbol +Y y VoidSymbol \
++ VoidSymbol VoidSymbol VoidSymbol Meta_Z Meta_y \
+ VoidSymbol \
+- +z Z VoidSymbol VoidSymbol Control_z \
+- Control_z VoidSymbol VoidSymbol Meta_z Meta_Z \
+- VoidSymbol VoidSymbol +Z z VoidSymbol \
+- VoidSymbol VoidSymbol VoidSymbol Meta_Z Meta_z \
++ +y Y VoidSymbol VoidSymbol Control_y \
++ Control_y VoidSymbol VoidSymbol Meta_y Meta_Y \
++ VoidSymbol VoidSymbol +Y y VoidSymbol \
++ VoidSymbol VoidSymbol VoidSymbol Meta_Y Meta_y \
+ VoidSymbol
+ keycode 22 = +u U VoidSymbol VoidSymbol Control_u \
+ Control_u VoidSymbol VoidSymbol Meta_u Meta_U \
+@@ -601,15 +604,15 @@
+ Meta_Control_backslash bar bar VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_bar Meta_bar \
+ VoidSymbol
+-keycode 44 = +y Y degree degree Control_y \
+- Control_y VoidSymbol VoidSymbol Meta_y Meta_Y \
+- VoidSymbol VoidSymbol +Y y VoidSymbol \
+- VoidSymbol VoidSymbol VoidSymbol Meta_Y Meta_y \
++keycode 44 = +z Z degree degree Control_z \
++ Control_z VoidSymbol VoidSymbol Meta_z Meta_Z \
++ VoidSymbol VoidSymbol +Z z VoidSymbol \
++ VoidSymbol VoidSymbol VoidSymbol Meta_Z Meta_z \
+ VoidSymbol \
+- +y Y degree degree Control_y \
+- Control_y VoidSymbol VoidSymbol Meta_y Meta_Y \
+- VoidSymbol VoidSymbol +Y y VoidSymbol \
+- VoidSymbol VoidSymbol VoidSymbol Meta_Y Meta_y \
++ +z Z degree degree Control_z \
++ Control_z VoidSymbol VoidSymbol Meta_z Meta_Z \
++ VoidSymbol VoidSymbol +Z z VoidSymbol \
++ VoidSymbol VoidSymbol VoidSymbol Meta_Z Meta_z \
+ VoidSymbol
+ keycode 45 = +x X numbersign numbersign Control_x \
+ Control_x VoidSymbol VoidSymbol Meta_x Meta_X \
diff --git a/sys-apps/kbd/files/kbd-1.12-debian.patch b/sys-apps/kbd/files/kbd-1.12-debian.patch
new file mode 100644
index 0000000..de1e402
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-debian.patch
@@ -0,0 +1,86 @@
+diff -urNad /home/wart/Projects/debian/kbd/new/kbd-1.12/src/loadkeys.y kbd-1.12/src/loadkeys.y
+--- /home/wart/Projects/debian/kbd/new/kbd-1.12/src/loadkeys.y 2004-01-27 14:25:50.000000000 +0300
++++ kbd-1.12/src/loadkeys.y 2004-01-27 14:37:01.000000000 +0300
+@@ -566,7 +566,7 @@
+ }
+
+ char *dirpath[] = { "", DATADIR "/" KEYMAPDIR "/**", KERNDIR "/", 0 };
+-char *suffixes[] = { "", ".map", 0 };
++char *suffixes[] = { "", ".kmap", ".map", 0 };
+ extern FILE *findfile(char *fnam, char **dirpath, char **suffixes);
+
+ #undef yywrap
+diff -urNad /opt/tmp/kbd-1.12/src/loadunimap.c kbd-1.12/src/loadunimap.c
+--- /opt/tmp/kbd-1.12/src/loadunimap.c 2004-08-02 22:57:25.000000000 +0200
++++ kbd-1.12/src/loadunimap.c 2004-08-02 22:57:44.000000000 +0200
+@@ -28,8 +28,8 @@
+ extern char *progname;
+ extern int force;
+
+-static char *unidirpath[] = { "", DATADIR "/" UNIMAPDIR "/", 0 };
+-static char *unisuffixes[] = { "", ".uni", 0 };
++static char *unidirpath[] = { "", DATADIR "/" TRANSDIR "/", 0 };
++static char *unisuffixes[] = { "", ".sfm", ".uni", 0 };
+
+ #ifdef MAIN
+ #include "version.h"
+diff -urNad /opt/tmp/kbd-1.12/src/getunimap.c kbd-1.12/src/getunimap.c
+--- /opt/tmp/kbd-1.12/src/getunimap.c 2004-08-01 20:33:38.000000000 +0200
++++ kbd-1.12/src/getunimap.c 2004-08-02 22:45:30.000000000 +0200
+@@ -62,7 +62,7 @@
+ }
+ }
+
+- if (argc != 1)
++ if (optind < argc)
+ usage();
+
+ fd = getfd(console);
+diff -urNad /opt/tmp/kbd-1.12/src/loadunimap.c kbd-1.12/src/loadunimap.c
+--- /opt/tmp/kbd-1.12/src/loadunimap.c 2004-08-02 22:45:06.000000000 +0200
++++ kbd-1.12/src/loadunimap.c 2004-08-02 22:46:39.000000000 +0200
+@@ -73,18 +73,18 @@
+ }
+ }
+
+- if (argc > 2 || (argc == 1 && !outfnam))
++ if (argc > optind+1 || (argc == optind && !outfnam))
+ usage();
+
+ fd = getfd(console);
+
+ if (outfnam) {
+ saveunicodemap(fd, outfnam);
+- if (argc == 1)
++ if (argc == optind)
+ exit(0);
+ }
+
+- if (argc == 2)
++ if (argc == optind+1)
+ infnam = argv[optind];
+ loadunicodemap(fd, infnam);
+ exit(0);
+diff -urNad /opt/tmp/kbd-1.12/src/showconsolefont.c kbd-1.12/src/showconsolefont.c
+--- /opt/tmp/kbd-1.12/src/showconsolefont.c 2004-08-02 22:44:30.000000000 +0200
++++ kbd-1.12/src/showconsolefont.c 2004-08-02 22:47:07.000000000 +0200
+@@ -135,7 +135,7 @@
+ }
+ }
+
+- if (argc != 1)
++ if (optind < argc)
+ usage();
+
+ fd = getfd(console);
+--- kbd-1.12.orig/src/kbdrate.c
++++ kbd-1.12/src/kbdrate.c
+@@ -112,7 +112,7 @@
+ kbdrep_s.period = -1;
+ kbdrep_s.delay = -1;
+ if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+- if (errno == EINVAL)
++ if (errno == EINVAL || errno == ENOTTY)
+ return 0;
+ perror( "ioctl(KDKBDREP)" );
+ exit( 1 );
diff --git a/sys-apps/kbd/files/kbd-1.12-find-map-fix.patch b/sys-apps/kbd/files/kbd-1.12-find-map-fix.patch
new file mode 100644
index 0000000..ca24703
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-find-map-fix.patch
@@ -0,0 +1,37 @@
+Oh, but I fixed it already. Patch below.
+
+Andries
+
+--- kbd-1.12.orig/src/findfile.c Fri Jan 16 20:45:31 2004
++++ kbd-1.12/src/findfile.c Wed Jan 28 23:29:35 2004
+@@ -70,6 +70,7 @@
+ FILE *fp = NULL;
+ DIR *d;
+ struct dirent *de;
++ struct stat statbuf;
+ char *ff, *fdir, *p, *q, **sp;
+ struct decompressor *dc;
+ int secondpass = 0;
+@@ -104,7 +105,6 @@
+ okdir = (ff && strcmp(de->d_name, fdir) == 0);
+
+ if ((secondpass && recdepth) || okdir) {
+- struct stat statbuf;
+ char *a;
+
+ a = xmalloc(strlen(dir) + strlen(de->d_name) + 2);
+@@ -137,6 +137,11 @@
+
+ sprintf(pathname, "%s/%s", dir, de->d_name);
+
++ /* Is this a regular file? */
++ if (stat(pathname, &statbuf) != 0 ||
++ !S_ISREG(statbuf.st_mode))
++ continue;
++
+ /* Does tail consist of a known suffix and possibly
+ a compression suffix? */
+ for(sp = suf; *sp; sp++) {
+
+
+[pasted and cut from another window, so with whitespace damage]
diff --git a/sys-apps/kbd/files/kbd-1.12-it-euro-map.patch b/sys-apps/kbd/files/kbd-1.12-it-euro-map.patch
new file mode 100644
index 0000000..bf42651
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-it-euro-map.patch
@@ -0,0 +1,18 @@
+Tupone Alfredo writes:
+
+To make euro key work at console (not X) I had to modify the
+it.map.gz to include euro.
+
+http://bugs.gentoo.org/show_bug.cgi?id=75970
+
+--- data/keymaps/i386/qwerty/it.map.orig 2004-12-29 15:31:59.269844456 -0500
++++ data/keymaps/i386/qwerty/it.map 2004-12-29 15:32:49.049276832 -0500
+@@ -86,7 +86,7 @@
+ alt keycode 15 = Meta_Tab
+ keycode 16 = q
+ keycode 17 = w
+-keycode 18 = e
++keycode 18 = e E euro
+ keycode 19 = r
+ keycode 20 = t
+ keycode 21 = y
diff --git a/sys-apps/kbd/files/kbd-1.12-jp-escape.patch b/sys-apps/kbd/files/kbd-1.12-jp-escape.patch
new file mode 100644
index 0000000..f413f00
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-jp-escape.patch
@@ -0,0 +1,16 @@
+Recognize Ctrl-[ as Escape.
+
+Patch by OKUMURA N. Shin-ya.
+
+http://bugs.gentoo.org/71870
+
+--- data/keymaps/i386/qwerty/jp106.map
++++ data/keymaps/i386/qwerty/jp106.map
+@@ -35,6 +35,7 @@
+ keycode 26 = at grave
+ control keycode 26 = nul
+ keycode 27 = bracketleft braceleft
++ control keycode 27 = Escape
+ keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+ keycode 29 = Control
diff --git a/sys-apps/kbd/files/kbd-1.12-kbd_repeat-v2.patch b/sys-apps/kbd/files/kbd-1.12-kbd_repeat-v2.patch
new file mode 100644
index 0000000..3e7f11d
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-kbd_repeat-v2.patch
@@ -0,0 +1,27 @@
+Linux is nice and changes around core structures :)
+
+--- kbd-1.12/src/kbdrate.c Fri Jan 16 20:45:31 2004
++++ kbd-1.12.kbdrate/src/kbdrate.c Sun Feb 8 14:52:04 2004
+@@ -164,10 +169,10 @@
+ exit( 1 );
+ }
+
+- kbdrate_s.period = (int) (rate + 0.5); /* round up */
++ kbdrate_s.rate = (int) (rate + 0.5); /* round up */
+ kbdrate_s.delay = delay * HZ / 1000; /* convert ms to Hz */
+- if (kbdrate_s.period > 50)
+- kbdrate_s.period = 50;
++ if (kbdrate_s.rate > 50)
++ kbdrate_s.rate = 50;
+
+ if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
+ perror( "ioctl(KIOCSRATE)" );
+@@ -177,7 +182,7 @@
+
+ if (!silent)
+ printf( "Typematic Rate set to %d cps (delay = %d ms)\n",
+- kbdrate_s.period, kbdrate_s.delay * 1000 / HZ );
++ kbdrate_s.rate, kbdrate_s.delay * 1000 / HZ );
+
+ return 1;
+ #else /* no KIOCSRATE */
diff --git a/sys-apps/kbd/files/kbd-1.12-kbio.patch b/sys-apps/kbd/files/kbd-1.12-kbio.patch
new file mode 100644
index 0000000..b2a80d9
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-kbio.patch
@@ -0,0 +1,25 @@
+diff -Nura kbd-1.12/src/kbdrate.c kbd-1.12.nokbio/src/kbdrate.c
+--- kbd-1.12/src/kbdrate.c 2004-01-16 16:45:31.000000000 -0300
++++ kbd-1.12.nokbio/src/kbdrate.c 2006-10-23 11:30:11.000000000 -0300
+@@ -77,7 +77,6 @@
+
+ #ifdef __sparc__
+ #include <asm/param.h>
+-#include <asm/kbio.h>
+ #endif
+
+ #ifndef KDKBDREP
+diff -Nura kbd-1.12/src/setleds.c kbd-1.12.nokbio/src/setleds.c
+--- kbd-1.12/src/setleds.c 2004-01-16 16:45:31.000000000 -0300
++++ kbd-1.12.nokbio/src/setleds.c 2006-10-23 11:30:20.000000000 -0300
+@@ -14,10 +14,6 @@
+ #include "nls.h"
+ #include "version.h"
+
+-#ifdef __sparc__
+-#include <asm/kbio.h>
+-#endif
+-
+ static void
+ usage(void)
+ {
diff --git a/sys-apps/kbd/files/kbd-1.12-setfont-man.patch b/sys-apps/kbd/files/kbd-1.12-setfont-man.patch
new file mode 100644
index 0000000..73cce39
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-setfont-man.patch
@@ -0,0 +1,14 @@
+diff -Nrbu kbd-1.12/man/man8/setfont.8.in kbd-1.12-OK/man/man8/setfont.8.in
+--- kbd-1.12/man/man8/setfont.8.in 2004-01-03 07:15:59.000000000 +0300
++++ kbd-1.12-OK/man/man8/setfont.8.in 2004-11-26 19:20:15.000000000 +0300
+@@ -50,6 +50,10 @@
+ Load a given font (here a 512-glyph font combining several
+ character sets) and indicate that one's local character set
+ is ISO 8859-2.
++.LP
++Note: if a font has more than 256 glyphs, only 8 out of 16 colors
++can be used simultaneously. It can make console perception worse
++(loss of intensity and even some colors).
+
+ .SH "FONT FORMATS"
+ The standard Linux font format is the PSF font.
diff --git a/sys-apps/kbd/files/kbd-1.12-unimap.patch b/sys-apps/kbd/files/kbd-1.12-unimap.patch
new file mode 100644
index 0000000..c7ea73c
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-unimap.patch
@@ -0,0 +1,16 @@
+That silly Debian patch changes the default dir to TRANSDIR.
+This patch corrects that oversight so both work if we ever
+use console-data, also by Debian.
+
+--- kbd-1.12/src/loadunimap.c.orig 2006-08-24 13:48:11.000000000 +0100
++++ kbd-1.12/src/loadunimap.c 2006-08-24 13:49:07.000000000 +0100
+@@ -28,7 +28,7 @@
+ extern char *progname;
+ extern int force;
+
+-static char *unidirpath[] = { "", DATADIR "/" TRANSDIR "/", 0 };
+-static char *unisuffixes[] = { "", ".sfm", ".uni", 0 };
++static char *unidirpath[] = { "", DATADIR "/" UNIMAPDIR "/", DATADIR "/" TRANSDIR "/", 0 };
++static char *unisuffixes[] = { "", ".uni", ".sfm", 0 };
+
+ #ifdef MAIN
diff --git a/sys-apps/kbd/files/kbd-1.12-xcompile.patch b/sys-apps/kbd/files/kbd-1.12-xcompile.patch
new file mode 100644
index 0000000..985dbad
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-xcompile.patch
@@ -0,0 +1,21 @@
+this shit is wrong, but so was original ... this needs to be
+rewritten so that $HOST_ARCH/$TARGET_ARCH aren't even needed ...
+
+--- configure
++++ configure
+@@ -129,8 +129,13 @@
+ #
+ # 0. Figure out architecture (one of i386, alpha, sparc, arm, m68k, mips)
+ #
+-ARCH=`uname -m | sed s/i.86/i386/`
+-echo "ARCH=$ARCH" >> make_include
++HOST_ARCH=`uname -m`
++TARGET_ARCH=`$CC -dumpmachine | awk -F- '{print $1}'`
++# Don't allow ARCH="sparc" for sparc64 targets with 32-bit userland
++if (test "$HOST_ARCH" = "sparc64" && test "$TARGET_ARCH" = "sparc") ; then
++ TARGET_ARCH="sparc64"
++fi
++echo "ARCH=${TARGET_ARCH}" | sed -e 's:i.86:i386:' >> make_include
+
+ #
+ # 1. Do we have <locale.h>?
diff --git a/sys-apps/kbd/files/kbd-1.13-dont-use-error.patch b/sys-apps/kbd/files/kbd-1.13-dont-use-error.patch
new file mode 100644
index 0000000..d8e0bb1
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.13-dont-use-error.patch
@@ -0,0 +1,17 @@
+dont use GNU-specific function error()
+
+--- openvt/openvt.c
++++ openvt/openvt.c
+@@ -107,8 +107,10 @@
+
+ for (i=0; i<3; i++) {
+ struct stat st;
+- if (fstat(i, &st) == -1 && open("/dev/null", O_RDWR) == -1)
+- error(EXIT_FAILURE, errno, "open");
++ if (fstat(i, &st) == -1 && open("/dev/null", O_RDWR) == -1) {
++ perror("open(/dev/null/) failed");
++ return EXIT_FAILURE;
++ }
+ }
+
+ consfd = getfd(NULL);
diff --git a/sys-apps/kbd/files/kbd-1.14-ds-nohost.patch b/sys-apps/kbd/files/kbd-1.14-ds-nohost.patch
new file mode 100644
index 0000000..2ee1df0
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.14-ds-nohost.patch
@@ -0,0 +1,12 @@
+diff -dPNur kbd-1.14.1/src/spawn_login.c kbd-1.14.1-new/src/spawn_login.c
+--- kbd-1.14.1/src/spawn_login.c 2008-03-13 17:46:23.000000000 +0100
++++ kbd-1.14.1-new/src/spawn_login.c 2008-07-04 22:59:25.000000000 +0200
+@@ -15,7 +15,7 @@
+
+ static void
+ sighup(int n) {
+- if (system("openvt -s -l -- login -h spawn") == -1) {
++ if (system("openvt -s -l -- login") == -1) {
+ perror("system");
+ exit(1);
+ }
diff --git a/sys-apps/kbd/files/kbd-1.14-ds-unicode.patch b/sys-apps/kbd/files/kbd-1.14-ds-unicode.patch
new file mode 100644
index 0000000..9a21352
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.14-ds-unicode.patch
@@ -0,0 +1,59 @@
+diff -dPNur kbd-1.14.1/src/unicode_start kbd-1.14.1-unicode/src/unicode_start
+--- kbd-1.14.1/src/unicode_start 2008-03-24 17:03:56.000000000 +0100
++++ kbd-1.14.1-unicode/src/unicode_start 2008-07-04 23:20:41.000000000 +0200
+@@ -3,7 +3,7 @@
+ # 0. Check whether we're on a console
+ TTY="`/usr/bin/tty`"
+ case "$TTY" in
+- /dev/console|/dev/vc*|/dev/tty[0-9]*)
++ /dev/console|/dev/vc*|/dev/tty*|/dev/pts/*)
+ ;;
+ *)
+ echo "unicode_start skipped on $TTY" >&2
+diff -dPNur kbd-1.14.1/src/unicode_stop kbd-1.14.1-unicode/src/unicode_stop
+--- kbd-1.14.1/src/unicode_stop 2008-03-24 17:03:56.000000000 +0100
++++ kbd-1.14.1-unicode/src/unicode_stop 2008-07-04 23:22:18.000000000 +0200
+@@ -1,8 +1,13 @@
+ #!/bin/sh
+
+-TTY="`/usr/bin/tty`"
++if [ -z "$1" ]; then
++ TTY="`/usr/bin/tty`"
++else
++ TTY=$1
++fi
++
+ case "$TTY" in
+- /dev/console|/dev/vc*|/dev/tty[0-9]*)
++ /dev/console|/dev/vc*|/dev/tty*|/dev/pts/*)
+ ;;
+ *)
+ echo "unicode_stop skipped on $TTY"
+@@ -11,14 +16,23 @@
+ esac
+
+ # stop unicode
+-kbd_mode -a
+-if test -t ; then
++if [ -z "$1" ]; then
++ kbd_mode -a
++ if test -t ; then
+ printf '\033%%@'
++ fi
++ stty -iutf8
++else
++ kbd_mode -a -C $TTY
++ if test -t ; then
++ printf '\033%%@' > $TTY
++ fi
++ stty -F $TTY -iutf8
+ fi
+-stty -iutf8
+
+ uid="`id -u 2>/dev/null`" ||:
+ if [ "$uid" = '0' ]; then
+ [ ! -r "$HOME/.kbd/.keymap_sv" ] ||
+ loadkeys "$HOME/.kbd/.keymap_sv"
+ fi
++setfont
+\ No newline at end of file
diff --git a/sys-apps/kbd/files/kbd-1.14.1-missing-configure.patch b/sys-apps/kbd/files/kbd-1.14.1-missing-configure.patch
new file mode 100644
index 0000000..b9fe961
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.14.1-missing-configure.patch
@@ -0,0 +1,15 @@
+fix from Charles Clément for missing binaries
+
+http://bugs.gentoo.org/215610
+
+--- kbd-1.14.1/src/Makefile.in
++++ kbd-1.14.1/src/Makefile.in
+@@ -2,6 +2,8 @@ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = $(DESTDIR)@bindir@
+ datarootdir = @datarootdir@
++KEYCODES_PROGS = @KEYCODES_PROGS@
++RESIZECONS_PROGS = @RESIZECONS_PROGS@
+ OPTIONAL_PROGS = @OPTIONAL_PROGS@
+
+ # Something like /usr/lib/kbd or /usr/share/kbd
diff --git a/sys-apps/kbd/files/kbd-1.15.1-ds-nohost.patch b/sys-apps/kbd/files/kbd-1.15.1-ds-nohost.patch
new file mode 100644
index 0000000..2cb399e
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.15.1-ds-nohost.patch
@@ -0,0 +1,12 @@
+diff -dPNur kbd-1.15.1/src/spawn_login.c kbd-1.15.1-ds/src/spawn_login.c
+--- kbd-1.15.1/src/spawn_login.c 2009-10-09 15:36:06.000000000 +0200
++++ kbd-1.15.1-ds/src/spawn_login.c 2010-01-31 03:20:24.000000000 +0100
+@@ -17,7 +17,7 @@
+
+ static void
+ sighup(attr_unused int n) {
+- if (system("openvt -s -l -- login -h spawn") == -1) {
++ if (system("openvt -s -l -- login") == -1) {
+ perror("system");
+ exit(1);
+ }
diff --git a/sys-apps/kbd/files/kbd-ds-nohost.patch b/sys-apps/kbd/files/kbd-ds-nohost.patch
new file mode 100644
index 0000000..8f009f1
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-ds-nohost.patch
@@ -0,0 +1,12 @@
+diff -dPNur kbd-1.12/src/spawn_login.c kbd-1.12-new/src/spawn_login.c
+--- kbd-1.12/src/spawn_login.c 2004-01-16 20:45:31.000000000 +0100
++++ kbd-1.12-new/src/spawn_login.c 2008-07-04 22:19:22.000000000 +0200
+@@ -10,7 +10,7 @@
+
+ void
+ sighup(){
+- system("openvt -s -l -- login -h spawn");
++ system("openvt -s -l -- login");
+ signal(SIGHUP, sighup);
+ }
+
diff --git a/sys-apps/kbd/files/keymaps.tar.bz2 b/sys-apps/kbd/files/keymaps.tar.bz2
new file mode 100644
index 0000000..426191b
--- /dev/null
+++ b/sys-apps/kbd/files/keymaps.tar.bz2
Binary files differ