summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authortsutsui <tsutsui@pkgsrc.org>2013-06-26 11:29:47 +0000
committertsutsui <tsutsui@pkgsrc.org>2013-06-26 11:29:47 +0000
commit7011dc1c1d1e1d363b28f3079723fa7f875dc33c (patch)
tree1ccfc6088e729b0322f19c7ffbfdc6d4777755e9 /x11
parent0d2992bfd58cd7d6aae5b540a628067ea2aabca3 (diff)
downloadpkgsrc-7011dc1c1d1e1d363b28f3079723fa7f875dc33c.tar.gz
Pull one more post-3.2.0 fix from upstream (leaf package bug fixes):
https://bitbucket.org/arakiken/mlterm/commits/c8814173cb051b32ce1d1b440b4033bd0 bba567d#chg-xwindow/fb/x_display.c > fb/x_display.c: get_ps2_kcode() is added to convert usb keycode > to ps2 keycode for iBus on NetBSD/OpenBSD framebuffer. This makes ibus inputmethod usable with USB keyboard on mlterm-fb. Bump PKGREVISION.
Diffstat (limited to 'x11')
-rw-r--r--x11/mlterm/Makefile4
-rw-r--r--x11/mlterm/distinfo4
-rw-r--r--x11/mlterm/patches/patch-xwindow_fb_x__display.c199
3 files changed, 182 insertions, 25 deletions
diff --git a/x11/mlterm/Makefile b/x11/mlterm/Makefile
index c26bad76e75..0ca6d977c82 100644
--- a/x11/mlterm/Makefile
+++ b/x11/mlterm/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.88 2013/06/23 06:02:39 tsutsui Exp $
+# $NetBSD: Makefile,v 1.89 2013/06/26 11:29:47 tsutsui Exp $
DISTNAME= mlterm-3.2.0
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mlterm/}
diff --git a/x11/mlterm/distinfo b/x11/mlterm/distinfo
index 20721b673e2..fdfe6bdd4bf 100644
--- a/x11/mlterm/distinfo
+++ b/x11/mlterm/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.32 2013/06/23 06:02:39 tsutsui Exp $
+$NetBSD: distinfo,v 1.33 2013/06/26 11:29:47 tsutsui Exp $
SHA1 (mlterm-3.2.0.tar.gz) = 66478d4f345bb2fe225c498b585797e66f2f931f
RMD160 (mlterm-3.2.0.tar.gz) = b14f5304e690eb300093ce905f89c89f1a5f4bb7
@@ -6,7 +6,7 @@ Size (mlterm-3.2.0.tar.gz) = 3509742 bytes
SHA1 (patch-configure) = b09182d7cb0ceb73557cf9e568445ad2d46aa04c
SHA1 (patch-etc_font-fb) = 95a39d6e2aa56ecc745edec3d324f3dcf57b3b39
SHA1 (patch-mkf_lib_mkf__ucs4__map.c) = 1bec2e100d5a53a84ca81436389c5cf2ce67f34b
-SHA1 (patch-xwindow_fb_x__display.c) = 8a78d78036e83928c4a81dc41510789ea420aa75
+SHA1 (patch-xwindow_fb_x__display.c) = 20bbfc87028828eeec33b3bc8bdbba93766ff9a1
SHA1 (patch-xwindow_fb_x__font.c) = a55515411ed9063e609eb70bddf40ad6c486376b
SHA1 (patch-xwindow_fb_x__window.c) = bbeafd847b6654bec9dd517bf669194e964a2758
SHA1 (patch-xwindow_win32_x__font.c) = 3c33fe26bbac54ee6ec9ad6add086f8903269a31
diff --git a/x11/mlterm/patches/patch-xwindow_fb_x__display.c b/x11/mlterm/patches/patch-xwindow_fb_x__display.c
index 24bf0f6de01..d63072f5804 100644
--- a/x11/mlterm/patches/patch-xwindow_fb_x__display.c
+++ b/x11/mlterm/patches/patch-xwindow_fb_x__display.c
@@ -1,32 +1,189 @@
-$NetBSD: patch-xwindow_fb_x__display.c,v 1.1 2013/06/23 06:02:39 tsutsui Exp $
+$NetBSD: patch-xwindow_fb_x__display.c,v 1.2 2013/06/26 11:29:47 tsutsui Exp $
Pull fix from http://mlterm.sf.net/mlterm-3.2.0-fixes.patch
> Fix the bug which caused segmentation fault in closing input method
> status window.
+Pull update for ibus on mlterm-fb from rev c881417
+ https://bitbucket.org/arakiken/mlterm/commits/c8814173cb051b32ce1d1b440b4033bd0bba567d#chg-xwindow/fb/x_display.c
+> fb/x_display.c: get_ps2_kcode() is added to convert usb keycode
+> to ps2 keycode for iBus on NetBSD/OpenBSD framebuffer.
+
--- xwindow/fb/x_display.c.orig 2013-05-26 02:13:13.000000000 +0000
+++ xwindow/fb/x_display.c
-@@ -849,19 +849,17 @@ receive_event_for_multi_roots(
+@@ -169,6 +169,7 @@ static x_display_t * opened_disps[] = {
+ #if defined(__FreeBSD__)
+ static keymap_t keymap ;
+ #elif defined(__NetBSD__)
++static u_int kbd_type ;
+ static struct wskbd_map_data keymap ;
+ static int console_id = -1 ;
+ static int orig_console_mode = WSDISPLAYIO_MODE_EMUL ; /* 0 */
+@@ -1589,6 +1590,149 @@ receive_key_event(void)
+
+ #elif defined(__NetBSD__)
- x_window_receive_event( _disp.roots[0] , xev) ;
++/* For iBus */
++static u_int
++get_ps2_kcode(
++ u_int kcode
++ )
++{
++ if( kbd_type == WSKBD_TYPE_USB)
++ {
++ static u_char map_table1[] =
++ {
++ 30 , /* A (4) */
++ 48 , /* B */
++ 46 , /* C */
++ 32 , /* D */
++ 18 , /* E */
++ 33 , /* F */
++ 34 , /* G (10) */
++ 35 , /* H */
++ 23 , /* I */
++ 36 , /* J */
++ 37 , /* K */
++ 38 , /* L */
++ 50 , /* M */
++ 49 , /* N */
++ 24 , /* O */
++ 25 , /* P */
++ 16 , /* Q (20) */
++ 19 , /* R */
++ 31 , /* S */
++ 20 , /* T */
++ 22 , /* U */
++ 47 , /* V */
++ 17 , /* W */
++ 45 , /* X */
++ 21 , /* Y */
++ 44 , /* Z */
++ 2 , /* 1 (30) */
++ 3 , /* 2 */
++ 4 , /* 3 */
++ 5 , /* 4 */
++ 6 , /* 5 */
++ 7 , /* 6 */
++ 8 , /* 7 */
++ 9 , /* 8 */
++ 10 , /* 9 */
++ 11 , /* 0 */
++ 28 , /* Enter (40) */
++ 1 , /* ESC */
++ 14 , /* BackSpace */
++ 15 , /* Tab */
++ 57 , /* Space */
++ 12 , /* _ - */
++ 13 , /* + = */
++ 26 , /* { [ */
++ 27 , /* } ] */
++ 43 , /* \ | */
++ 0 , /* (50) */
++ 39 , /* : ; */
++ 40 , /* " ' */
++ 41 , /* ~ ` */
++ 51 , /* < , */
++ 52 , /* > . */
++ 53 , /* ? / */
++ 58 , /* CapsLock */
++ 59 , /* F1 */
++ 60 , /* F2 */
++ 61 , /* F3 (60) */
++ 62 , /* F4 */
++ 63 , /* F5 */
++ 64 , /* F6 */
++ 65 , /* F7 */
++ 66 , /* F8 */
++ 67 , /* F9 */
++ 68 , /* F10 */
++ 87 , /* F11 */
++ 88 , /* F12 */
++ 0 , /* Print Screen (70) */
++ 70 , /* ScreenLock */
++ 0 , /* Pause */
++ 110 , /* Insert */
++ 102 , /* Home */
++ 104 , /* Page Up */
++ 111 , /* Delete */
++ 107 , /* End */
++ 109 , /* Page Down */
++ 106 , /* Right */
++ 105 , /* Left (80) */
++ 108 , /* Down */
++ 103 , /* Up */
++ 69 , /* NumLock */
++ 0 , /* Num / */
++ 55 , /* Num * */
++ 74 , /* Num - */
++ 78 , /* Num + */
++ 0 , /* Num Enter */
++ 79 , /* Num 1 */
++ 80 , /* Num 2 (90) */
++ 81 , /* Num 3 */
++ 75 , /* Num 4 */
++ 76 , /* Num 5 */
++ 77 , /* Num 6 */
++ 71 , /* Num 7 */
++ 72 , /* Num 8 */
++ 73 , /* Num 9 */
++ 82 , /* Num 0 */
++ 83 , /* Num . */
++ } ;
++
++ static u_char map_table2[] =
++ {
++ 29 , /* Control L (224) */
++ 42 , /* Shift L */
++ 56 , /* Alt L */
++ 0 , /* Windows L */
++ 97 , /* Control R */
++ 54 , /* Shift R */
++ 100 , /* Alt R (230) */
++ 0 , /* Windows R */
++ } ;
++
++ if( 4 <= kcode)
++ {
++ if( kcode <= 99)
++ {
++ return map_table1[kcode - 4] ;
++ }
++ else if( 224 <= kcode)
++ {
++ if( kcode <= 231)
++ {
++ return map_table2[kcode - 224] ;
++ }
++ }
++ }
++
++ return 0 ;
++ }
++ else
++ {
++ return kcode ;
++ }
++}
++
+ static void
+ process_wskbd_event(
+ struct wscons_event * ev
+@@ -1656,7 +1800,7 @@ process_wskbd_event(
+ xev.ksym = ksym ;
+ xev.state = _mouse.button_state |
+ _display.key_state ;
+- xev.keycode = ev->value ;
++ xev.keycode = get_ps2_kcode( ev->value) ;
-- if( redraw_im_win)
-+ if( redraw_im_win && _disp.num_of_roots == 2)
- {
- /* Restart drawing input method window */
- _disp.roots[1]->is_mapped = 1 ;
- }
+ receive_event_for_multi_roots( &xev) ;
-- if( ! check_visibility_of_im_window())
-+ if( check_visibility_of_im_window())
- {
-- return ;
-+ expose_window( _disp.roots[1] , _disp.roots[1]->x , _disp.roots[1]->y ,
-+ ACTUAL_WIDTH(_disp.roots[1]) , ACTUAL_HEIGHT(_disp.roots[1])) ;
- }
--
-- expose_window( _disp.roots[1] , _disp.roots[1]->x , _disp.roots[1]->y ,
-- ACTUAL_WIDTH(_disp.roots[1]) , ACTUAL_HEIGHT(_disp.roots[1])) ;
- }
+@@ -1884,6 +2028,8 @@ open_display(void)
+ ioctl( _display.fd , WSKBDIO_SETVERSION , &mode) ;
+ #endif
- #ifndef __FreeBSD__
++ ioctl( _display.fd , WSKBDIO_GTYPE , &kbd_type) ;
++
+ keymap.maplen = KS_NUMKEYCODES ;
+ keymap.map = map ;
+ ioctl( _display.fd , WSKBDIO_GETMAP , &keymap) ;