aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/kbd/files')
-rw-r--r--sys-apps/kbd/files/kbd-1.15.5-fix-struct_winsize-collision.patch11
-rw-r--r--sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch90
-rw-r--r--sys-apps/kbd/files/kbd-1.15.5-musl-headers-error.patch115
-rw-r--r--sys-apps/kbd/files/kbd-2.0.0-tests.patch31
-rw-r--r--sys-apps/kbd/files/kbd-2.0.2-musl-headers-error.patch147
5 files changed, 394 insertions, 0 deletions
diff --git a/sys-apps/kbd/files/kbd-1.15.5-fix-struct_winsize-collision.patch b/sys-apps/kbd/files/kbd-1.15.5-fix-struct_winsize-collision.patch
new file mode 100644
index 00000000..29360908
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.15.5-fix-struct_winsize-collision.patch
@@ -0,0 +1,11 @@
+diff -Naur kbd-1.15.5.orig/src/resizecons.c kbd-1.15.5/src/resizecons.c
+--- kbd-1.15.5.orig/src/resizecons.c 2012-12-01 21:41:38.000000000 +0000
++++ kbd-1.15.5/src/resizecons.c 2014-01-16 13:48:25.793935059 +0000
+@@ -82,7 +82,6 @@
+ #include <sys/perm.h>
+ #else
+ #include <linux/types.h>
+-#include <linux/termios.h>
+ #endif
+ #include <linux/vt.h>
+ #include "paths.h"
diff --git a/sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch b/sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch
new file mode 100644
index 00000000..c78a2278
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch
@@ -0,0 +1,90 @@
+https://bugs.gentoo.org/447440
+
+From 7e06e56157e8431d02e1377cdc44230944203d88 Mon Sep 17 00:00:00 2001
+From: Alexey Gladkov <gladkov.alexey@gmail.com>
+Date: Tue, 11 Dec 2012 14:24:44 +0400
+Subject: [PATCH] Fix regression in 16117ce6ab
+
+Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
+---
+ src/loadkeys.analyze.l | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/src/loadkeys.analyze.l b/src/loadkeys.analyze.l
+index c18dcea..f817c78 100644
+--- a/src/loadkeys.analyze.l
++++ b/src/loadkeys.analyze.l
+@@ -307,8 +307,10 @@ To to|To|TO
+ char *s = xstrndup(yytext+1, strlen(yytext)-2);
+ /* use static pathname to store *s ? */
+ open_include(s);
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ }
+ <INCLSTR>[^"]|\"\"|\"[^"\n]*{Eol} {
+ yyerror(_("expected filename between quotes"));
+@@ -323,7 +325,7 @@ To to|To|TO
+ }
+ {Eol} {
+ line_nr++;
+- if (state_ptr > 0) {
++ while (state_ptr > 0) {
+ yy_pop_state();
+ state_ptr--;
+ }
+@@ -428,8 +430,10 @@ To to|To|TO
+ }
+ <STR>\" {
+ *p = '\0';
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ return(STRLITERAL);
+ }
+ . {
+--- a/src/loadkeys.analyze.c
++++ b/src/loadkeys.analyze.c
+@@ -1359,8 +1359,10 @@ YY_RULE_SETUP
+ char *s = xstrndup(yytext+1, strlen(yytext)-2);
+ /* use static pathname to store *s ? */
+ open_include(s);
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ }
+ YY_BREAK
+ case 3:
+@@ -1393,7 +1395,7 @@ YY_RULE_SETUP
+ #line 324 "loadkeys.analyze.l"
+ {
+ line_nr++;
+- if (state_ptr > 0) {
++ while (state_ptr > 0) {
+ yy_pop_state();
+ state_ptr--;
+ }
+@@ -1670,8 +1670,10 @@ YY_RULE_SETUP
+ #line 429 "loadkeys.analyze.l"
+ {
+ *p = '\0';
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ return(STRLITERAL);
+ }
+ YY_BREAK
+--
+1.8.0.2
diff --git a/sys-apps/kbd/files/kbd-1.15.5-musl-headers-error.patch b/sys-apps/kbd/files/kbd-1.15.5-musl-headers-error.patch
new file mode 100644
index 00000000..ad52a63f
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.15.5-musl-headers-error.patch
@@ -0,0 +1,115 @@
+diff -Naur kbd-1.15.3.orig/src/dumpkeys.c kbd-1.15.3/src/dumpkeys.c
+--- kbd-1.15.3.orig/src/dumpkeys.c 2011-05-07 20:33:42.000000000 +0000
++++ kbd-1.15.3/src/dumpkeys.c 2013-07-06 02:20:41.660131968 +0000
+@@ -12,6 +12,7 @@
+ #include <linux/kd.h>
+ #include <linux/keyboard.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <string.h>
+ #include <errno.h>
+ #include "ksyms.h"
+diff -Naur kbd-1.15.3.orig/src/kbdinfo.c kbd-1.15.3/src/kbdinfo.c
+--- kbd-1.15.3.orig/src/kbdinfo.c 2011-05-07 20:33:42.000000000 +0000
++++ kbd-1.15.3/src/kbdinfo.c 2013-07-06 02:29:12.057160508 +0000
+@@ -1,6 +1,5 @@
+ #include <stdio.h>
+ #include <errno.h>
+-#include <error.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+@@ -9,6 +8,10 @@
+ #include "nls.h"
+ #include "version.h"
+
++#define error(e, n, s) \
++ perror(s); \
++ exit(e); \
++
+ static const char *action = NULL;
+ static const char *value = NULL;
+
+diff -Naur kbd-1.15.3.orig/src/kbdrate.c kbd-1.15.3/src/kbdrate.c
+--- kbd-1.15.3.orig/src/kbdrate.c 2011-05-07 20:33:42.000000000 +0000
++++ kbd-1.15.3/src/kbdrate.c 2013-07-06 02:21:53.121135964 +0000
+@@ -74,6 +74,7 @@
+ #include <errno.h>
+ #include <sys/file.h>
+ #include <sys/ioctl.h>
++#include <fcntl.h>
+
+ #ifdef __sparc__
+ #include <asm/param.h>
+diff -Naur kbd-1.15.3.orig/src/loadkeys.c kbd-1.15.3/src/loadkeys.c
+--- kbd-1.15.3.orig/src/loadkeys.c 2011-05-07 20:33:42.000000000 +0000
++++ kbd-1.15.3/src/loadkeys.c 2013-07-06 02:21:02.148133114 +0000
+@@ -79,6 +79,7 @@
+ #include <ctype.h>
+ #include <sys/param.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <linux/kd.h>
+ #include <linux/keyboard.h>
+ #include <unistd.h>
+diff -Naur kbd-1.15.3.orig/src/openvt.c kbd-1.15.3/src/openvt.c
+--- kbd-1.15.3.orig/src/openvt.c 2011-05-07 20:33:42.000000000 +0000
++++ kbd-1.15.3/src/openvt.c 2013-07-06 02:22:11.080136968 +0000
+@@ -10,6 +10,7 @@
+ #include <sys/vt.h>
+ #include <sys/wait.h>
+ #include <sys/file.h>
++#include <fcntl.h>
+
+ #include "version.h"
+ #include "xmalloc.h"
+diff -Naur kbd-1.15.3.orig/src/setvtrgb.c kbd-1.15.3/src/setvtrgb.c
+--- kbd-1.15.3.orig/src/setvtrgb.c 2011-05-07 20:33:42.000000000 +0000
++++ kbd-1.15.3/src/setvtrgb.c 2013-07-06 02:34:26.390178084 +0000
+@@ -5,12 +5,15 @@
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+ #include <errno.h>
+-#include <error.h>
+ #include "kbd.h"
+ #include "getfd.h"
+ #include "nls.h"
+ #include "version.h"
+
++#define error(e, n, s) \
++ perror(s); \
++ exit(e); \
++
+ static unsigned char *cmap;
+
+ /* Standard VGA terminal colors, matching those hardcoded in the Linux kernel's
+@@ -82,25 +85,21 @@
+ if (c == EOF)
+ error(EXIT_FAILURE, errno, "fscanf");
+
+- error(EXIT_FAILURE, 0, _("Error: %s: Invalid value in field %u in line %u."),
+- filename, rows + 1, cols + 1);
++ error(EXIT_FAILURE, 0, "setvtrgb");
+ }
+
+ cmap[rows + cols * 3] = (unsigned char) val;
+
+ if (cols < 15 && fgetc(fd) != ',')
+- error(EXIT_FAILURE, 0, _("Error: %s: Insufficient number of fields in line %u."),
+- filename, rows + 1);
++ error(EXIT_FAILURE, 0, "setvtrgb");
+ cols++;
+ }
+
+ if ((c = fgetc(fd)) == EOF)
+- error(EXIT_FAILURE, 0, _("Error: %s: Line %u has ended unexpectedly.\n"),
+- filename, rows + 1);
++ error(EXIT_FAILURE, 0, "setvtrgb");
+
+ if (c != '\n')
+- error(EXIT_FAILURE, 0, _("Error: %s: Line %u is too long.\n"),
+- filename, rows + 1);
++ error(EXIT_FAILURE, 0, "setvtrgb");
+ }
+ }
+
diff --git a/sys-apps/kbd/files/kbd-2.0.0-tests.patch b/sys-apps/kbd/files/kbd-2.0.0-tests.patch
new file mode 100644
index 00000000..7a4e186c
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-2.0.0-tests.patch
@@ -0,0 +1,31 @@
+--- configure.ac
++++ configure.ac
+@@ -11,7 +11,13 @@
+ AC_CONFIG_SRCDIR([src/loadkeys.c])
+ AC_CONFIG_HEADERS(config.h)
+
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
++AC_ARG_ENABLE(tests,
++ AS_HELP_STRING(--enable-tests, [build tests]),
++ [BUILD_TESTS=$enableval],[BUILD_TESTS=no])
++AM_CONDITIONAL(BUILD_TESTS, test "$BUILD_TESTS" = "yes")
++if test "$BUILD_TESTS" = "yes"; then
++ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
++fi
+
+ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
+ AM_SILENT_RULES([yes])
+--- Makefile.am
++++ Makefile.am
+@@ -8,7 +8,10 @@
+ CREDITS \
+ contrib docs rc
+
+-SUBDIRS = src data po tests docs
++SUBDIRS = src data po docs
++if BUILD_TESTS
++SUBDIRS += tests
++endif
+
+ kbd-$(VERSION).tar.xz:
+ make distcheck
diff --git a/sys-apps/kbd/files/kbd-2.0.2-musl-headers-error.patch b/sys-apps/kbd/files/kbd-2.0.2-musl-headers-error.patch
new file mode 100644
index 00000000..69ac7d0e
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-2.0.2-musl-headers-error.patch
@@ -0,0 +1,147 @@
+diff --git a/src/kbdinfo.c b/src/kbdinfo.c
+index e5f122d..dcdcac0 100644
+--- a/src/kbdinfo.c
++++ b/src/kbdinfo.c
+@@ -1,6 +1,5 @@
+ #include <stdio.h>
+ #include <errno.h>
+-#include <error.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+@@ -9,6 +8,10 @@
+ #include "nls.h"
+ #include "version.h"
+
++#define error(e, n, ...) \
++ fprintf(stderr, ##__VA_ARGS__); \
++ exit(e);
++
+ static const char *action = NULL;
+ static const char *value = NULL;
+
+diff --git a/src/kbdrate.c b/src/kbdrate.c
+index 2ab8388..5faff00 100644
+--- a/src/kbdrate.c
++++ b/src/kbdrate.c
+@@ -74,6 +74,7 @@ beats rebuilding the kernel!
+ #include <errno.h>
+ #include <sys/file.h>
+ #include <sys/ioctl.h>
++#include <fcntl.h>
+ #include <linux/kd.h>
+
+ #ifdef __sparc__
+diff --git a/src/libkeymap/dump.c b/src/libkeymap/dump.c
+index 0262e24..606931e 100644
+--- a/src/libkeymap/dump.c
++++ b/src/libkeymap/dump.c
+@@ -13,6 +13,7 @@
+ #include <string.h>
+ #include <ctype.h>
+ #include <unistd.h>
++#include <sys/types.h>
+
+ #include "keymap.h"
+
+diff --git a/src/libkeymap/kmap.c b/src/libkeymap/kmap.c
+index 67be81e..e13498b 100644
+--- a/src/libkeymap/kmap.c
++++ b/src/libkeymap/kmap.c
+@@ -1,5 +1,6 @@
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+
+ #include "nls.h"
+ #include "kbd.h"
+diff --git a/src/libkeymap/summary.c b/src/libkeymap/summary.c
+index 46df90d..0912ae8 100644
+--- a/src/libkeymap/summary.c
++++ b/src/libkeymap/summary.c
+@@ -9,6 +9,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+
+ #include "keymap.h"
+
+diff --git a/src/openvt.c b/src/openvt.c
+index 075136f..49720d7 100644
+--- a/src/openvt.c
++++ b/src/openvt.c
+@@ -10,6 +10,7 @@
+ #include <sys/vt.h>
+ #include <sys/wait.h>
+ #include <sys/file.h>
++#include <fcntl.h>
+
+ #include "version.h"
+ #include "xmalloc.h"
+@@ -19,6 +20,8 @@
+ #include "compat/linux-limits.h"
+ #endif
+
++#define NAME_MAX 255
++
+ // There must be a universal way to find these!
+ #define TRUE (1)
+ #define FALSE (0)
+diff --git a/src/setvtrgb.c b/src/setvtrgb.c
+index f99badc..f1a631c 100644
+--- a/src/setvtrgb.c
++++ b/src/setvtrgb.c
+@@ -5,12 +5,15 @@
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+ #include <errno.h>
+-#include <error.h>
+ #include "kbd.h"
+ #include "getfd.h"
+ #include "nls.h"
+ #include "version.h"
+
++#define error(e, n, ...) \
++ fprintf(stderr, ##__VA_ARGS__); \
++ exit(e);
++
+ static unsigned char *cmap;
+
+ /* Standard VGA terminal colors, matching those hardcoded in the Linux kernel's
+diff --git a/src/vlock/auth.c b/src/vlock/auth.c
+index da135ce..a3f365b 100644
+--- a/src/vlock/auth.c
++++ b/src/vlock/auth.c
+@@ -22,7 +22,6 @@
+ */
+
+ #include <errno.h>
+-#include <error.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+diff --git a/src/vlock/vlock.c b/src/vlock/vlock.c
+index c2c4158..fa2f386 100644
+--- a/src/vlock/vlock.c
++++ b/src/vlock/vlock.c
+@@ -23,7 +23,6 @@
+
+ #include <stdio.h>
+ #include <errno.h>
+-#include <error.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+diff --git a/src/vlock/vt.c b/src/vlock/vt.c
+index 4e5282b..f3ba85d 100644
+--- a/src/vlock/vt.c
++++ b/src/vlock/vt.c
+@@ -23,7 +23,6 @@
+
+ #include <stdio.h>
+ #include <errno.h>
+-#include <error.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>