[arch-commits] Commit in kbd/repos (14 files)
Tobias Powalowski
tpowa at nymeria.archlinux.org
Tue Oct 8 07:44:22 UTC 2013
Date: Tuesday, October 8, 2013 @ 09:44:21
Author: tpowa
Revision: 196204
archrelease: copy trunk to testing-i686, testing-x86_64
Added:
kbd/repos/testing-i686/
kbd/repos/testing-i686/PKGBUILD
(from rev 196203, kbd/trunk/PKGBUILD)
kbd/repos/testing-i686/fix-alt_is_meta.patch
(from rev 196203, kbd/trunk/fix-alt_is_meta.patch)
kbd/repos/testing-i686/fix-dvorak-es.patch
(from rev 196203, kbd/trunk/fix-dvorak-es.patch)
kbd/repos/testing-i686/fix-euro2.patch
(from rev 196203, kbd/trunk/fix-euro2.patch)
kbd/repos/testing-i686/fix-keymap-loading-1.15.5.patch
(from rev 196203, kbd/trunk/fix-keymap-loading-1.15.5.patch)
kbd/repos/testing-i686/merge-fullline_singleline.patch
(from rev 196203, kbd/trunk/merge-fullline_singleline.patch)
kbd/repos/testing-x86_64/
kbd/repos/testing-x86_64/PKGBUILD
(from rev 196203, kbd/trunk/PKGBUILD)
kbd/repos/testing-x86_64/fix-alt_is_meta.patch
(from rev 196203, kbd/trunk/fix-alt_is_meta.patch)
kbd/repos/testing-x86_64/fix-dvorak-es.patch
(from rev 196203, kbd/trunk/fix-dvorak-es.patch)
kbd/repos/testing-x86_64/fix-euro2.patch
(from rev 196203, kbd/trunk/fix-euro2.patch)
kbd/repos/testing-x86_64/fix-keymap-loading-1.15.5.patch
(from rev 196203, kbd/trunk/fix-keymap-loading-1.15.5.patch)
kbd/repos/testing-x86_64/merge-fullline_singleline.patch
(from rev 196203, kbd/trunk/merge-fullline_singleline.patch)
------------------------------------------------+
testing-i686/PKGBUILD | 57 ++++++
testing-i686/fix-alt_is_meta.patch | 212 +++++++++++++++++++++++
testing-i686/fix-dvorak-es.patch | 11 +
testing-i686/fix-euro2.patch | 9
testing-i686/fix-keymap-loading-1.15.5.patch | 47 +++++
testing-i686/merge-fullline_singleline.patch | 104 +++++++++++
testing-x86_64/PKGBUILD | 57 ++++++
testing-x86_64/fix-alt_is_meta.patch | 212 +++++++++++++++++++++++
testing-x86_64/fix-dvorak-es.patch | 11 +
testing-x86_64/fix-euro2.patch | 9
testing-x86_64/fix-keymap-loading-1.15.5.patch | 47 +++++
testing-x86_64/merge-fullline_singleline.patch | 104 +++++++++++
12 files changed, 880 insertions(+)
Copied: kbd/repos/testing-i686/PKGBUILD (from rev 196203, kbd/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD (rev 0)
+++ testing-i686/PKGBUILD 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=kbd
+pkgver=2.0.0
+pkgrel=2
+pkgdesc="Keytable files and keyboard utilities"
+arch=('i686' 'x86_64')
+url="http://www.kbd-project.org"
+license=('GPL')
+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')
+provides=('vlock')
+conflicts=('vlock')
+replaces=('vlock')
+md5sums=('5ba259a0b2464196f6488a72070a3d60'
+ '998957c4f815347dcc874c4d7555dc66'
+ 'd869200acbc0aab6a9cafa43cb140d4e'
+ '91de90cde763c7f704027c2837360098'
+ 'b21e24509ea9db206971ce8a02dfc46f')
+
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ # rename keymap files with the same names
+ # this is needed because when only name of keymap is specified
+ # loadkeys loads the first keymap it can find, which is bad (see FS#13837)
+ # this should be removed when upstream adopts the change
+ mv data/keymaps/i386/qwertz/cz{,-qwertz}.map
+ mv data/keymaps/i386/olpc/es{,-olpc}.map
+ mv data/keymaps/i386/olpc/pt{,-olpc}.map
+ mv data/keymaps/i386/dvorak/no{,-dvorak}.map
+ mv data/keymaps/i386/fgGIod/trf{,-fgGIod}.map
+ mv data/keymaps/i386/colemak/{en-latin9,colemak}.map
+ # fix es-dvorak #33662
+ 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() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --datadir=/usr/share/kbd --mandir=/usr/share/man
+ make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes DESTDIR=${pkgdir} install
+}
Copied: kbd/repos/testing-i686/fix-alt_is_meta.patch (from rev 196203, kbd/trunk/fix-alt_is_meta.patch)
===================================================================
--- testing-i686/fix-alt_is_meta.patch (rev 0)
+++ testing-i686/fix-alt_is_meta.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,212 @@
+From f6d17ec929f59cc65a8c5f8a4918c1fe89e2b85a Mon Sep 17 00:00:00 2001
+From: Alexey Gladkov <gladkov.alexey at 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 at 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
+
Copied: kbd/repos/testing-i686/fix-dvorak-es.patch (from rev 196203, kbd/trunk/fix-dvorak-es.patch)
===================================================================
--- testing-i686/fix-dvorak-es.patch (rev 0)
+++ testing-i686/fix-dvorak-es.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,11 @@
+--- kbd-1.15.5/data/keymaps/i386/dvorak/dvorak-es.map.old 2013-05-08 14:58:03.393349828 +0200
++++ kbd-1.15.5/data/keymaps/i386/dvorak/dvorak-es.map 2013-05-08 14:58:20.206415053 +0200
+@@ -4,7 +4,7 @@
+
+ keymaps 0-2,4,5,6,8-10,12,14
+ include "linux-with-alt-and-altgr"
+-include "euro"
++include "euro.map"
+ strings as usual
+
+ keycode 1 = Escape
Copied: kbd/repos/testing-i686/fix-euro2.patch (from rev 196203, kbd/trunk/fix-euro2.patch)
===================================================================
--- testing-i686/fix-euro2.patch (rev 0)
+++ testing-i686/fix-euro2.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,9 @@
+--- kbd-1.15.5/data/keymaps/i386/include/euro2.map.old 2013-05-08 15:00:25.917752313 +0200
++++ kbd-1.15.5/data/keymaps/i386/include/euro2.map 2013-05-08 15:00:54.943957367 +0200
+@@ -2,5 +2,5 @@
+ # [Say: "loadkeys euro2" to get Euro and cent with AltGr (right alt)
+ # on the positions where many keyboards have E and C.
+ # To get it displayed, use a latin0 (i.e., latin9) font.]
+-altgr keycode 18 = currency
++altgr keycode 18 = euro
+ altgr keycode 46 = cent
Copied: kbd/repos/testing-i686/fix-keymap-loading-1.15.5.patch (from rev 196203, kbd/trunk/fix-keymap-loading-1.15.5.patch)
===================================================================
--- testing-i686/fix-keymap-loading-1.15.5.patch (rev 0)
+++ testing-i686/fix-keymap-loading-1.15.5.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,47 @@
+commit 7e06e56157e8431d02e1377cdc44230944203d88
+Author: Alexey Gladkov <gladkov.alexey at gmail.com>
+Date: Tue Dec 11 14:24:44 2012 +0400
+
+ Fix regression in 16117ce6ab
+
+ Signed-off-by: Alexey Gladkov <gladkov.alexey at gmail.com>
+
+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);
+ }
+ . {
Copied: kbd/repos/testing-i686/merge-fullline_singleline.patch (from rev 196203, kbd/trunk/merge-fullline_singleline.patch)
===================================================================
--- testing-i686/merge-fullline_singleline.patch (rev 0)
+++ testing-i686/merge-fullline_singleline.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,104 @@
+From 301cb9f132017ec67cc00681ca3f7a25f0d24ca2 Mon Sep 17 00:00:00 2001
+From: Alexey Gladkov <gladkov.alexey at 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 at 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
+
Copied: kbd/repos/testing-x86_64/PKGBUILD (from rev 196203, kbd/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=kbd
+pkgver=2.0.0
+pkgrel=2
+pkgdesc="Keytable files and keyboard utilities"
+arch=('i686' 'x86_64')
+url="http://www.kbd-project.org"
+license=('GPL')
+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')
+provides=('vlock')
+conflicts=('vlock')
+replaces=('vlock')
+md5sums=('5ba259a0b2464196f6488a72070a3d60'
+ '998957c4f815347dcc874c4d7555dc66'
+ 'd869200acbc0aab6a9cafa43cb140d4e'
+ '91de90cde763c7f704027c2837360098'
+ 'b21e24509ea9db206971ce8a02dfc46f')
+
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ # rename keymap files with the same names
+ # this is needed because when only name of keymap is specified
+ # loadkeys loads the first keymap it can find, which is bad (see FS#13837)
+ # this should be removed when upstream adopts the change
+ mv data/keymaps/i386/qwertz/cz{,-qwertz}.map
+ mv data/keymaps/i386/olpc/es{,-olpc}.map
+ mv data/keymaps/i386/olpc/pt{,-olpc}.map
+ mv data/keymaps/i386/dvorak/no{,-dvorak}.map
+ mv data/keymaps/i386/fgGIod/trf{,-fgGIod}.map
+ mv data/keymaps/i386/colemak/{en-latin9,colemak}.map
+ # fix es-dvorak #33662
+ 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() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --datadir=/usr/share/kbd --mandir=/usr/share/man
+ make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes DESTDIR=${pkgdir} install
+}
Copied: kbd/repos/testing-x86_64/fix-alt_is_meta.patch (from rev 196203, kbd/trunk/fix-alt_is_meta.patch)
===================================================================
--- testing-x86_64/fix-alt_is_meta.patch (rev 0)
+++ testing-x86_64/fix-alt_is_meta.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,212 @@
+From f6d17ec929f59cc65a8c5f8a4918c1fe89e2b85a Mon Sep 17 00:00:00 2001
+From: Alexey Gladkov <gladkov.alexey at 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 at 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
+
Copied: kbd/repos/testing-x86_64/fix-dvorak-es.patch (from rev 196203, kbd/trunk/fix-dvorak-es.patch)
===================================================================
--- testing-x86_64/fix-dvorak-es.patch (rev 0)
+++ testing-x86_64/fix-dvorak-es.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,11 @@
+--- kbd-1.15.5/data/keymaps/i386/dvorak/dvorak-es.map.old 2013-05-08 14:58:03.393349828 +0200
++++ kbd-1.15.5/data/keymaps/i386/dvorak/dvorak-es.map 2013-05-08 14:58:20.206415053 +0200
+@@ -4,7 +4,7 @@
+
+ keymaps 0-2,4,5,6,8-10,12,14
+ include "linux-with-alt-and-altgr"
+-include "euro"
++include "euro.map"
+ strings as usual
+
+ keycode 1 = Escape
Copied: kbd/repos/testing-x86_64/fix-euro2.patch (from rev 196203, kbd/trunk/fix-euro2.patch)
===================================================================
--- testing-x86_64/fix-euro2.patch (rev 0)
+++ testing-x86_64/fix-euro2.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,9 @@
+--- kbd-1.15.5/data/keymaps/i386/include/euro2.map.old 2013-05-08 15:00:25.917752313 +0200
++++ kbd-1.15.5/data/keymaps/i386/include/euro2.map 2013-05-08 15:00:54.943957367 +0200
+@@ -2,5 +2,5 @@
+ # [Say: "loadkeys euro2" to get Euro and cent with AltGr (right alt)
+ # on the positions where many keyboards have E and C.
+ # To get it displayed, use a latin0 (i.e., latin9) font.]
+-altgr keycode 18 = currency
++altgr keycode 18 = euro
+ altgr keycode 46 = cent
Copied: kbd/repos/testing-x86_64/fix-keymap-loading-1.15.5.patch (from rev 196203, kbd/trunk/fix-keymap-loading-1.15.5.patch)
===================================================================
--- testing-x86_64/fix-keymap-loading-1.15.5.patch (rev 0)
+++ testing-x86_64/fix-keymap-loading-1.15.5.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,47 @@
+commit 7e06e56157e8431d02e1377cdc44230944203d88
+Author: Alexey Gladkov <gladkov.alexey at gmail.com>
+Date: Tue Dec 11 14:24:44 2012 +0400
+
+ Fix regression in 16117ce6ab
+
+ Signed-off-by: Alexey Gladkov <gladkov.alexey at gmail.com>
+
+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);
+ }
+ . {
Copied: kbd/repos/testing-x86_64/merge-fullline_singleline.patch (from rev 196203, kbd/trunk/merge-fullline_singleline.patch)
===================================================================
--- testing-x86_64/merge-fullline_singleline.patch (rev 0)
+++ testing-x86_64/merge-fullline_singleline.patch 2013-10-08 07:44:21 UTC (rev 196204)
@@ -0,0 +1,104 @@
+From 301cb9f132017ec67cc00681ca3f7a25f0d24ca2 Mon Sep 17 00:00:00 2001
+From: Alexey Gladkov <gladkov.alexey at 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 at 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
+
More information about the arch-commits
mailing list