diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
commit | 65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 (patch) | |
tree | fbfdff322b28d9a3c37e6e31c94caf1d8e48dac1 /core/kbd | |
parent | d53c44f055929b18d7d1b25f8367ee5836c435fc (diff) |
Fri Dec 27 23:54:04 UTC 2013
Diffstat (limited to 'core/kbd')
-rw-r--r-- | core/kbd/PKGBUILD | 19 | ||||
-rw-r--r-- | core/kbd/fix-alt_is_meta.patch | 212 | ||||
-rw-r--r-- | core/kbd/merge-fullline_singleline.patch | 104 |
3 files changed, 6 insertions, 329 deletions
diff --git a/core/kbd/PKGBUILD b/core/kbd/PKGBUILD index bce4b994c..f854388b9 100644 --- a/core/kbd/PKGBUILD +++ b/core/kbd/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 196308 2013-10-11 09:58:13Z tpowa $ +# $Id: PKGBUILD 199885 2013-11-18 07:11:38Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> pkgname=kbd -pkgver=2.0.0 -pkgrel=2 +pkgver=2.0.1 +pkgrel=1 pkgdesc="Keytable files and keyboard utilities" arch=('i686' 'x86_64') url="http://www.kbd-project.org" @@ -12,17 +12,13 @@ depends=('glibc' 'pam') makedepends=('check') source=(ftp://ftp.altlinux.org/pub/people/legion/kbd/${pkgname}-${pkgver}.tar.gz 'fix-dvorak-es.patch' - 'fix-euro2.patch' - 'fix-alt_is_meta.patch' - 'merge-fullline_singleline.patch') + 'fix-euro2.patch') provides=('vlock') conflicts=('vlock') replaces=('vlock') -md5sums=('5ba259a0b2464196f6488a72070a3d60' +md5sums=('cc0ee9f2537d8636cae85a8c6541ed2e' '998957c4f815347dcc874c4d7555dc66' - 'd869200acbc0aab6a9cafa43cb140d4e' - '91de90cde763c7f704027c2837360098' - 'b21e24509ea9db206971ce8a02dfc46f') + 'd869200acbc0aab6a9cafa43cb140d4e') prepare() { cd ${srcdir}/${pkgname}-${pkgver} @@ -40,9 +36,6 @@ prepare() { patch -Np1 -i ../fix-dvorak-es.patch # fix euro2 #28213 patch -Np1 -i ../fix-euro2.patch - # fix #36689 - patch -Np1 -i ../fix-alt_is_meta.patch - patch -Np1 -i ../merge-fullline_singleline.patch } build() { diff --git a/core/kbd/fix-alt_is_meta.patch b/core/kbd/fix-alt_is_meta.patch deleted file mode 100644 index 865ea917b..000000000 --- a/core/kbd/fix-alt_is_meta.patch +++ /dev/null @@ -1,212 +0,0 @@ -From f6d17ec929f59cc65a8c5f8a4918c1fe89e2b85a Mon Sep 17 00:00:00 2001 -From: Alexey Gladkov <gladkov.alexey@gmail.com> -Date: Mon, 7 Oct 2013 17:48:57 +0400 -Subject: [PATCH] Fix alt_is_meta regression - -Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com> ---- - src/libkeymap/kmap.c | 8 ++++---- - tests/Makefile.am | 8 ++++++-- - tests/alt-is-meta.in | 19 +++++++++++++++++++ - tests/alt-is-meta.map | 12 ++++++++++++ - tests/alt-is-meta.output | 42 ++++++++++++++++++++++++++++++++++++++++++ - tests/libkeymap-showmaps.c | 30 ++++++++++++++++++++++++++++++ - 6 files changed, 113 insertions(+), 6 deletions(-) - create mode 100755 tests/alt-is-meta.in - create mode 100644 tests/alt-is-meta.map - create mode 100644 tests/alt-is-meta.output - create mode 100644 tests/libkeymap-showmaps.c - -diff --git a/src/libkeymap/kmap.c b/src/libkeymap/kmap.c -index ca97ed5..c7945bc 100644 ---- a/src/libkeymap/kmap.c -+++ b/src/libkeymap/kmap.c -@@ -149,10 +149,10 @@ lk_add_key(struct lk_ctx *ctx, unsigned int k_table, unsigned int k_index, int k - int type = KTYP(keycode); - int val = KVAL(keycode); - -- if (alttable != k_table && !lk_key_exists(ctx, alttable, k_index) && -- (type == KT_LATIN || type == KT_LETTER) && val < 128) { -- if (lk_add_map(ctx, alttable) < 0) -- return -1; -+ if (alttable != k_table && lk_map_exists(ctx, alttable) && -+ !lk_key_exists(ctx, alttable, k_index) && -+ (type == KT_LATIN || type == KT_LETTER) && -+ val < 128) { - if (lk_add_key(ctx, alttable, k_index, K(KT_META, val)) < 0) - return -1; - } -diff --git a/tests/Makefile.am b/tests/Makefile.am -index e7d22c2..d9a9f61 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -7,10 +7,12 @@ AM_CFLAGS = $(CHECK_CFLAGS) - LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) - - EXTRA_DIST = \ -+ alt-is-meta.in \ - dumpkeys-bkeymap.in \ - dumpkeys-fulltable.in \ - dumpkeys-mktable.in \ - \ -+ alt-is-meta.map \ - charset-keymap0.map \ - dumpkeys.full.ruwin_cplk-UTF-8.map \ - dumpkeys.qwerty-layout.map \ -@@ -19,15 +21,16 @@ EXTRA_DIST = \ - keymap0.map keymap1.map keymap2.map keymap3.map keymap4.map keymap5.map keymap6.map \ - VoidSymbol.map \ - \ -+ alt-is-meta.output \ - dumpkeys.bkeymap.bin \ - dumpkeys.defkeymap.c - --check_SCRIPTS = dumpkeys-fulltable dumpkeys-mktable dumpkeys-bkeymap -+check_SCRIPTS = dumpkeys-fulltable dumpkeys-mktable dumpkeys-bkeymap alt-is-meta - check_PROGRAMS = libkeymap-init libkeymap-kmap libkeymap-keys libkeymap-parse \ - libkeymap-charset - - noinst_PROGRAMS = \ -- libkeymap-dumpkeys libkeymap-mktable libkeymap-bkeymap \ -+ libkeymap-dumpkeys libkeymap-mktable libkeymap-bkeymap libkeymap-showmaps \ - $(check_PROGRAMS) - - TESTS = $(check_PROGRAMS) $(check_SCRIPTS) -@@ -41,6 +44,7 @@ libkeymap_charset_SOURCES = libkeymap-charset.c - libkeymap_dumpkeys_SOURCES = libkeymap-dumpkeys.c - libkeymap_mktable_SOURCES = libkeymap-mktable.c - libkeymap_bkeymap_SOURCES = libkeymap-bkeymap.c -+libkeymap_showmaps_SOURCES = libkeymap-showmaps.c - - %: %.in - sed \ -diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in -new file mode 100755 -index 0000000..ddd5ed8 ---- /dev/null -+++ b/tests/alt-is-meta.in -@@ -0,0 +1,19 @@ -+#!/bin/sh -efu -+ -+cwd="$(readlink -ev "${0%/*}")" -+ -+cd "$cwd" -+ -+rc=0 -+temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")" -+ -+./libkeymap-showmaps "@DATADIR@"/alt-is-meta.map > "$temp" || rc=$? -+cmp -s "@DATADIR@//alt-is-meta.output" "$temp" || rc=$? -+ -+if [ "$rc" != 0 ]; then -+ printf 'failed\n' -+else -+ rm -f -- "$temp" -+fi -+ -+exit $rc -diff --git a/tests/alt-is-meta.map b/tests/alt-is-meta.map -new file mode 100644 -index 0000000..fa182a5 ---- /dev/null -+++ b/tests/alt-is-meta.map -@@ -0,0 +1,12 @@ -+keymaps 0-9,12-13,16-20,22,24-25,28,32-41,44-45,48-52,54,56-57,60 -+alt_is_meta -+keycode 16 = +q Q backslash backslash Control_q \ -+ Control_q Control_backslash Control_backslash \ -+ Meta_q Meta_Q VoidSymbol VoidSymbol +Q \ -+ q VoidSymbol VoidSymbol VoidSymbol VoidSymbol \ -+ Meta_Q Meta_q VoidSymbol \ -+ +q Q backslash backslash Control_q \ -+ Control_q Control_backslash Control_backslash \ -+ Meta_q Meta_Q VoidSymbol VoidSymbol +Q \ -+ q VoidSymbol VoidSymbol VoidSymbol VoidSymbol \ -+ Meta_Q Meta_q VoidSymbol -diff --git a/tests/alt-is-meta.output b/tests/alt-is-meta.output -new file mode 100644 -index 0000000..25abb20 ---- /dev/null -+++ b/tests/alt-is-meta.output -@@ -0,0 +1,42 @@ -+keymap 000 -+keymap 001 -+keymap 002 -+keymap 003 -+keymap 004 -+keymap 005 -+keymap 006 -+keymap 007 -+keymap 008 -+keymap 009 -+keymap 012 -+keymap 013 -+keymap 016 -+keymap 017 -+keymap 018 -+keymap 019 -+keymap 020 -+keymap 022 -+keymap 024 -+keymap 025 -+keymap 028 -+keymap 032 -+keymap 033 -+keymap 034 -+keymap 035 -+keymap 036 -+keymap 037 -+keymap 038 -+keymap 039 -+keymap 040 -+keymap 041 -+keymap 044 -+keymap 045 -+keymap 048 -+keymap 049 -+keymap 050 -+keymap 051 -+keymap 052 -+keymap 054 -+keymap 056 -+keymap 057 -+keymap 060 -diff --git a/tests/libkeymap-showmaps.c b/tests/libkeymap-showmaps.c -new file mode 100644 -index 0000000..acbf9f1 ---- /dev/null -+++ b/tests/libkeymap-showmaps.c -@@ -0,0 +1,30 @@ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <keymap.h> -+ -+#include "contextP.h" -+ -+int main(int argc, char **argv) -+{ -+ int i; -+ struct lk_ctx *ctx; -+ lkfile_t f; -+ -+ ctx = lk_init(); -+ -+ f.pipe = 0; -+ strcpy(f.pathname, argv[1]); -+ f.fd = fopen( argv[1], "r"); -+ -+ lk_parse_keymap(ctx, &f); -+ -+ for (i = 0; i < ctx->keymap->total; i++) { -+ if (!lk_map_exists(ctx, i)) -+ continue; -+ printf("keymap %03d\n", i); -+ } -+ -+ lk_free(ctx); -+ return 0; -+} --- -1.7.3.3 - diff --git a/core/kbd/merge-fullline_singleline.patch b/core/kbd/merge-fullline_singleline.patch deleted file mode 100644 index cc2b2c3b0..000000000 --- a/core/kbd/merge-fullline_singleline.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 301cb9f132017ec67cc00681ca3f7a25f0d24ca2 Mon Sep 17 00:00:00 2001 -From: Alexey Gladkov <gladkov.alexey@gmail.com> -Date: Mon, 7 Oct 2013 18:11:45 +0400 -Subject: [PATCH] parser: Merge fullline and singleline rule - -Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com> ---- - src/libkeymap/parser.y | 59 ++++++++++++++++++++++++----------------------- - 1 files changed, 30 insertions(+), 29 deletions(-) - -diff --git a/src/libkeymap/parser.y b/src/libkeymap/parser.y -index 627494a..17d953a 100644 ---- a/src/libkeymap/parser.y -+++ b/src/libkeymap/parser.y -@@ -180,7 +180,6 @@ line : EOL - | usualstringsline - | usualcomposeline - | keymapline -- | fullline - | singleline - | strline - | compline -@@ -281,34 +280,7 @@ compline : COMPOSE compsym compsym TO compsym EOL - compsym : CCHAR { $$ = $1; } - | UNUMBER { $$ = $1 ^ 0xf000; } - ; --singleline : { -- ctx->mod = 0; -- } -- modifiers KEYCODE NUMBER EQUALS rvalue EOL -- { -- if (lk_add_key(ctx, ctx->mod, $4, $6) < 0) -- YYERROR; -- } -- | PLAIN KEYCODE NUMBER EQUALS rvalue EOL -- { -- if (lk_add_key(ctx, 0, $3, $5) < 0) -- YYERROR; -- } -- ; --modifiers : modifiers modifier -- | modifier -- ; --modifier : SHIFT { ctx->mod |= M_SHIFT; } -- | CONTROL { ctx->mod |= M_CTRL; } -- | ALT { ctx->mod |= M_ALT; } -- | ALTGR { ctx->mod |= M_ALTGR; } -- | SHIFTL { ctx->mod |= M_SHIFTL; } -- | SHIFTR { ctx->mod |= M_SHIFTR; } -- | CTRLL { ctx->mod |= M_CTRLL; } -- | CTRLR { ctx->mod |= M_CTRLR; } -- | CAPSSHIFT { ctx->mod |= M_CAPSSHIFT; } -- ; --fullline : KEYCODE NUMBER EQUALS rvalue0 EOL -+singleline : KEYCODE NUMBER EQUALS rvalue0 EOL - { - unsigned int j, i, keycode; - int *val; -@@ -367,6 +339,33 @@ fullline : KEYCODE NUMBER EQUALS rvalue0 EOL - } - } - } -+ -+ | modifiers KEYCODE NUMBER EQUALS rvalue EOL -+ { -+ if (lk_add_key(ctx, ctx->mod, $3, $5) < 0) -+ YYERROR; -+ ctx->mod = 0; -+ } -+ | PLAIN KEYCODE NUMBER EQUALS rvalue EOL -+ { -+ if (lk_add_key(ctx, 0, $3, $5) < 0) -+ YYERROR; -+ ctx->mod = 0; -+ } -+ ; -+modifiers : modifiers modifier -+ | modifier -+ ; -+modifier : SHIFT { ctx->mod |= M_SHIFT; } -+ | CONTROL { ctx->mod |= M_CTRL; } -+ | ALT { ctx->mod |= M_ALT; } -+ | ALTGR { ctx->mod |= M_ALTGR; } -+ | SHIFTL { ctx->mod |= M_SHIFTL; } -+ | SHIFTR { ctx->mod |= M_SHIFTR; } -+ | CTRLL { ctx->mod |= M_CTRLL; } -+ | CTRLR { ctx->mod |= M_CTRLR; } -+ | CAPSSHIFT { ctx->mod |= M_CAPSSHIFT; } -+ ; - ; - - rvalue0 : -@@ -393,6 +392,8 @@ lk_parse_keymap(struct lk_ctx *ctx, lkfile_t *f) - yyscan_t scanner; - int rc = -1; - -+ ctx->mod = 0; -+ - yylex_init(&scanner); - yylex_init_extra(ctx, &scanner); - --- -1.7.3.3 - |