summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-05-30 14:02:46 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-05-30 14:02:46 +0000
commitbd954c3fa45edd624e979d7477fd9bc48d68c1ae (patch)
treec025f89060c227998f44915b0a7618637e67c1a8 /main
parent7d623cd7e5f0f80ace80ff924e1983883dff1cdf (diff)
downloadaports-bd954c3fa45edd624e979d7477fd9bc48d68c1ae.tar.bz2
aports-bd954c3fa45edd624e979d7477fd9bc48d68c1ae.tar.xz
main/kbd: disable. does not build with musl
Diffstat (limited to 'main')
-rw-r--r--main/kbd/APKBUILD2
-rw-r--r--main/kbd/kbd.patch246
2 files changed, 247 insertions, 1 deletions
diff --git a/main/kbd/APKBUILD b/main/kbd/APKBUILD
index 9ecd61cc6..2e88b4e11 100644
--- a/main/kbd/APKBUILD
+++ b/main/kbd/APKBUILD
@@ -5,7 +5,7 @@ pkgver=2.0.1
pkgrel=1
pkgdesc="Tools for configuring the console (keyboard, virtual terminals, etc.)"
url="http://ftp.altlinux.org/pub/people/legion/kbd"
-arch="all"
+arch=""
license="GPL2+"
depends="kbd-misc"
makedepends="bison flex autoconf automake linux-pam-dev check-dev"
diff --git a/main/kbd/kbd.patch b/main/kbd/kbd.patch
new file mode 100644
index 000000000..83440ef8f
--- /dev/null
+++ b/main/kbd/kbd.patch
@@ -0,0 +1,246 @@
+--- kbd-1.15.3/src/dumpkeys.c 2011-04-26 20:29:35.000000000 +0000
++++ kbd-1.15.3.patched/src/dumpkeys.c 2012-11-02 20:55:42.405000003 +0000
+@@ -107,7 +107,7 @@
+ }
+
+ static int
+-get_bind(u_char kb_index, u_char kb_table) {
++get_bind(unsigned char kb_index, unsigned char kb_table) {
+ struct kbentry ke;
+
+ ke.kb_index = kb_index;
+@@ -169,7 +169,7 @@
+ return status;
+ }
+
+-static u_char
++static unsigned char
+ maximum_val(int t) {
+ struct kbentry ke, ke0;
+ int i;
+@@ -440,7 +440,7 @@
+ (val >= 'a' && val <= 'z')));
+ isasexpected = 0;
+ if (isletter) {
+- u_short defs[16];
++ unsigned short defs[16];
+ defs[0] = K(KT_LETTER, val);
+ defs[1] = K(KT_LETTER, val ^ 32);
+ defs[2] = defs[0];
+diff -ur kbd-1.15.3/src/kbdinfo.c kbd-1.15.3.patched/src/kbdinfo.c
+--- kbd-1.15.3/src/kbdinfo.c 2011-04-26 20:29:35.000000000 +0000
++++ kbd-1.15.3.patched/src/kbdinfo.c 2012-11-02 21:22:31.081000003 +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>
+@@ -8,10 +7,12 @@
+ #include "getfd.h"
+ #include "nls.h"
+ #include "version.h"
++#include "error.c"
+
+ static const char *action = NULL;
+ static const char *value = NULL;
+
++
+ static void attr_noreturn
+ usage(int code) {
+ fprintf(stderr,
+diff -ur kbd-1.15.3/src/kbdrate.c kbd-1.15.3.patched/src/kbdrate.c
+--- kbd-1.15.3/src/kbdrate.c 2011-03-05 14:41:20.000000000 +0000
++++ kbd-1.15.3.patched/src/kbdrate.c 2012-11-02 20:57:25.869000003 +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 -ur kbd-1.15.3/src/loadkeys.c kbd-1.15.3.patched/src/loadkeys.c
+--- kbd-1.15.3/src/loadkeys.c 2011-05-01 23:22:35.000000000 +0000
++++ kbd-1.15.3.patched/src/loadkeys.c 2012-11-02 20:55:48.743000003 +0000
+@@ -114,7 +114,7 @@
+ int alt_is_meta = 0;
+
+ /* the kernel structures we want to set or print */
+-u_short *key_map[MAX_NR_KEYMAPS];
++unsigned short *key_map[MAX_NR_KEYMAPS];
+ char *func_table[MAX_NR_FUNC];
+
+ accent_entry accent_table[MAX_DIACR];
+@@ -255,7 +255,7 @@
+
+ if (!key_map[k_table]) {
+ key_map[k_table] =
+- (u_short *) xmalloc(NR_KEYS * sizeof(u_short));
++ (unsigned short *) xmalloc(NR_KEYS * sizeof(unsigned short));
+ for (i = 0; i < NR_KEYS; i++)
+ (key_map[k_table])[i] = K_HOLE;
+ }
+@@ -566,7 +566,7 @@
+ return kd.kb_cnt;
+ }
+
+-static void do_constant_key(int i, u_short key)
++static void do_constant_key(int i, unsigned short key)
+ {
+ int typ, val, j;
+
+@@ -575,7 +575,7 @@
+
+ if ((typ == KT_LATIN || typ == KT_LETTER) &&
+ ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z'))) {
+- u_short defs[16];
++ unsigned short defs[16];
+ defs[0] = K(KT_LETTER, val);
+ defs[1] = K(KT_LETTER, val ^ 32);
+ defs[2] = defs[0];
+@@ -620,7 +620,7 @@
+
+ for (i = 0; i < NR_KEYS; i++) {
+ if (key_is_constant[i]) {
+- u_short key;
++ unsigned short key;
+
+ if (!key_map[r0])
+ lkfatal(_("impossible error in do_constant"));
+@@ -800,7 +800,7 @@
+ keymap_count++;
+ if (i)
+ printf("static ");
+- printf("u_short %s_map[NR_KEYS] = {", mk_mapname(i));
++ printf("unsigned short %s_map[NR_KEYS] = {", mk_mapname(i));
+ for (j = 0; j < NR_KEYS; j++) {
+ if (!(j % 8))
+ printf("\n");
+@@ -904,7 +904,7 @@
+ {
+ int i, j;
+
+- //u_char *p;
++ //unsigned char *p;
+ char flag, magic[] = "bkeymap";
+ unsigned short v;
+
+diff -ur kbd-1.15.3/src/loadkeys.y kbd-1.15.3.patched/src/loadkeys.y
+--- kbd-1.15.3/src/loadkeys.y 2011-05-01 23:19:11.000000000 +0000
++++ kbd-1.15.3.patched/src/loadkeys.y 2012-11-02 20:55:42.410000003 +0000
+@@ -55,7 +55,7 @@
+ int alt_is_meta = 0;
+
+ /* the kernel structures we want to set or print */
+-u_short *key_map[MAX_NR_KEYMAPS];
++unsigned short *key_map[MAX_NR_KEYMAPS];
+ char *func_table[MAX_NR_FUNC];
+
+ accent_entry accent_table[MAX_DIACR];
+@@ -196,7 +196,7 @@
+
+ if (!key_map[k_table]) {
+ key_map[k_table] =
+- (u_short *) xmalloc(NR_KEYS * sizeof(u_short));
++ (unsigned short *) xmalloc(NR_KEYS * sizeof(unsigned short));
+ for (i = 0; i < NR_KEYS; i++)
+ (key_map[k_table])[i] = K_HOLE;
+ }
+@@ -507,7 +507,7 @@
+ return kd.kb_cnt;
+ }
+
+-static void do_constant_key(int i, u_short key)
++static void do_constant_key(int i, unsigned short key)
+ {
+ int typ, val, j;
+
+@@ -516,7 +516,7 @@
+
+ if ((typ == KT_LATIN || typ == KT_LETTER) &&
+ ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z'))) {
+- u_short defs[16];
++ unsigned short defs[16];
+ defs[0] = K(KT_LETTER, val);
+ defs[1] = K(KT_LETTER, val ^ 32);
+ defs[2] = defs[0];
+@@ -561,7 +561,7 @@
+
+ for (i = 0; i < NR_KEYS; i++) {
+ if (key_is_constant[i]) {
+- u_short key;
++ unsigned short key;
+
+ if (!key_map[r0])
+ lkfatal(_("impossible error in do_constant"));
+@@ -741,7 +741,7 @@
+ keymap_count++;
+ if (i)
+ printf("static ");
+- printf("u_short %s_map[NR_KEYS] = {", mk_mapname(i));
++ printf("unsigned short %s_map[NR_KEYS] = {", mk_mapname(i));
+ for (j = 0; j < NR_KEYS; j++) {
+ if (!(j % 8))
+ printf("\n");
+@@ -845,7 +845,7 @@
+ {
+ int i, j;
+
+- //u_char *p;
++ //unsigned char *p;
+ char flag, magic[] = "bkeymap";
+ unsigned short v;
+
+diff -ur kbd-1.15.3/src/openvt.c kbd-1.15.3.patched/src/openvt.c
+--- kbd-1.15.3/src/openvt.c 2011-05-01 23:27:13.000000000 +0000
++++ kbd-1.15.3.patched/src/openvt.c 2012-11-02 20:59:45.516000002 +0000
+@@ -10,7 +10,7 @@
+ #include <sys/vt.h>
+ #include <sys/wait.h>
+ #include <sys/file.h>
+-
++#include <fcntl.h>
+ #include "version.h"
+ #include "xmalloc.h"
+ #include "getfd.h"
+diff -ur kbd-1.15.3/src/setvtrgb.c kbd-1.15.3.patched/src/setvtrgb.c
+--- kbd-1.15.3/src/setvtrgb.c 2011-04-26 20:29:35.000000000 +0000
++++ kbd-1.15.3.patched/src/setvtrgb.c 2012-11-02 21:22:50.566000002 +0000
+@@ -5,7 +5,7 @@
+ #include <sys/ioctl.h>
+ #include <linux/kd.h>
+ #include <errno.h>
+-#include <error.h>
++#include "error.c"
+ #include "kbd.h"
+ #include "getfd.h"
+ #include "nls.h"
+--- /dev/null 2012-10-16 17:31:41.304000002 +0000
++++ kbd-1.15.3.patched/src/error.c 2012-11-02 21:22:07.812000002 +0000
+@@ -0,0 +1,24 @@
++#include <stdio.h>
++#include <stdarg.h>
++
++static void error(int status, int errnum, const char *fmt, ...) {
++ fflush(stdout);
++ char dest[4096];
++ va_list ap;
++ va_start(ap, fmt);
++ ssize_t result = vsnprintf(dest, sizeof(dest), fmt, ap);
++ va_end(ap);
++ dprintf(2, "program_name: %s", dest);
++ if(errnum) {
++ dprintf(2, ": ");
++ perror(fmt);
++ exit (status);
++ } else {
++ dprintf(2, "\n");
++ }
++}
++
++
++
++
++