summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
author Dimitris Zlatanidis <d.zlatanidis@gmail.com>2014-03-24 10:46:10 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2014-03-24 13:02:34 +0700
commit3f375ada7820d51ab8c17761a3d6b3c2e88ba4c1 (patch)
treeb242021cb991f222130faeec66dd066bdaf861d0 /system
parentab09016092f9b536dd1992fcc16aae9d08c3e3e9 (diff)
downloadslackbuilds-3f375ada7820d51ab8c17761a3d6b3c2e88ba4c1.tar.gz
slackbuilds-3f375ada7820d51ab8c17761a3d6b3c2e88ba4c1.tar.xz
system/mlterm: Rebuilt with patch.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/mlterm/mlterm-3.3.3-fixes.patch212
-rw-r--r--system/mlterm/mlterm.SlackBuild4
2 files changed, 215 insertions, 1 deletions
diff --git a/system/mlterm/mlterm-3.3.3-fixes.patch b/system/mlterm/mlterm-3.3.3-fixes.patch
new file mode 100644
index 0000000000..3e9719f12d
--- /dev/null
+++ b/system/mlterm/mlterm-3.3.3-fixes.patch
@@ -0,0 +1,212 @@
+diff -r ac6ec6344d05 inputmethod/uim/im_uim.c
+--- a/inputmethod/uim/im_uim.c
++++ b/inputmethod/uim/im_uim.c
+@@ -78,6 +78,8 @@
+
+ u_int cand_limit ;
+
++ int is_mozc ;
++
+ } im_uim_t ;
+
+ KIK_LIST_TYPEDEF( im_uim_t) ;
+@@ -744,13 +746,13 @@
+
+ uim = (im_uim_t*) p ;
+
++ (*uim->im.listener->get_spot)( uim->im.listener->self ,
++ uim->im.preedit.chars ,
++ uim->im.preedit.segment_offset ,
++ &x , &y) ;
++
+ if( uim->im.cand_screen == NULL)
+ {
+- (*uim->im.listener->get_spot)( uim->im.listener->self ,
+- uim->im.preedit.chars ,
+- uim->im.preedit.segment_offset ,
+- &x , &y) ;
+-
+ if( ! ( uim->im.cand_screen = (*syms->x_im_candidate_screen_new)(
+ uim->im.disp , uim->im.font_man , uim->im.color_man ,
+ (*uim->im.listener->is_vertical)(uim->im.listener->self) ,
+@@ -847,6 +852,22 @@
+
+ if( uim->im.cand_screen)
+ {
++ /*
++ * XXX Hack for uim-mozc (1.11.1522.102)
++ * If candidate_activate() is called with num == 20 and limit = 10,
++ * uim_get_candidate() on mozc doesn't returns 20 candidates but 10 ones.
++ * (e.g. uim_get_candidate(0) and uim_get_candidate(10) returns the same.)
++ */
++ if( uim->is_mozc &&
++ uim->im.cand_screen->index != index &&
++ uim->im.cand_screen->index / uim->cand_limit != index / uim->cand_limit &&
++ (index % uim->cand_limit) == 0)
++ {
++ candidate_activate( p ,
++ uim->im.cand_screen->num_of_candidates ,
++ uim->cand_limit) ;
++ }
++
+ (*uim->im.cand_screen->select)( uim->im.cand_screen , index) ;
+ }
+ }
+@@ -1616,6 +1637,8 @@
+ goto error ;
+ }
+
++ uim->is_mozc = (strcmp( engine , "mozc") == 0) ;
++
+ uim_set_preedit_cb( uim->context ,
+ preedit_clear ,
+ preedit_pushback ,
+diff -r ac6ec6344d05 xwindow/x_screen.c
+--- a/xwindow/x_screen.c
++++ b/xwindow/x_screen.c
+@@ -5268,11 +5268,13 @@
+ * Callbacks of x_config_event_listener_t events.
+ */
+
+-static char *
++static void
+ get_config_intern(
+ x_screen_t * screen ,
+ char * dev , /* can be NULL */
+- char * key /* can be "error" */
++ char * key , /* can be "error" */
++ int to_menu , /* -1: don't output to pty and menu. */
++ int * flag /* 1(true), 0(false) or -1(other) is returned. */
+ )
+ {
+ ml_term_t * term ;
+@@ -5285,7 +5287,7 @@
+ if( ( term = (*screen->system_listener->get_pty)( screen->system_listener->self ,
+ dev)) == NULL)
+ {
+- return NULL ;
++ return ;
+ }
+ }
+ else
+@@ -5829,7 +5831,34 @@
+ }
+ }
+
+- return value ;
++ if( to_menu >= 0)
++ {
++ if( value == NULL)
++ {
++ ml_term_write( screen->term , "#error\n" , 7 , to_menu) ;
++
++ #ifdef __DEBUG
++ kik_debug_printf( KIK_DEBUG_TAG " #error\n") ;
++ #endif
++ }
++ else
++ {
++ ml_term_write( screen->term , "#" , 1 , to_menu) ;
++ ml_term_write( screen->term , key , strlen( key) , to_menu) ;
++ ml_term_write( screen->term , "=" , 1 , to_menu) ;
++ ml_term_write( screen->term , value , strlen( value) , to_menu) ;
++ ml_term_write( screen->term , "\n" , 1 , to_menu) ;
++
++ #ifdef __DEBUG
++ kik_debug_printf( KIK_DEBUG_TAG " #%s=%s\n" , key , value) ;
++ #endif
++ }
++ }
++
++ if( flag)
++ {
++ *flag = value ? true_or_false( value) : -1 ;
++ }
+ }
+
+ static void
+@@ -5840,31 +5869,7 @@
+ int to_menu
+ )
+ {
+- x_screen_t * screen ;
+- char * value ;
+-
+- screen = p ;
+-
+- if( ( value = get_config_intern( screen , dev , key)) == NULL)
+- {
+- ml_term_write( screen->term , "#error\n" , 7 , to_menu) ;
+-
+- #ifdef __DEBUG
+- kik_debug_printf( KIK_DEBUG_TAG " #error\n") ;
+- #endif
+- }
+- else
+- {
+- ml_term_write( screen->term , "#" , 1 , to_menu) ;
+- ml_term_write( screen->term , key , strlen( key) , to_menu) ;
+- ml_term_write( screen->term , "=" , 1 , to_menu) ;
+- ml_term_write( screen->term , value , strlen( value) , to_menu) ;
+- ml_term_write( screen->term , "\n" , 1 , to_menu) ;
+-
+- #ifdef __DEBUG
+- kik_debug_printf( KIK_DEBUG_TAG " #%s=%s\n" , key , value) ;
+- #endif
+- }
++ get_config_intern( p , dev , key , to_menu , NULL) ;
+ }
+
+ static void
+@@ -8286,18 +8291,21 @@
+ }
+ else if( strcmp( value , "switch") == 0)
+ {
+- char * val ;
+-
+- if( ( val = get_config_intern( screen , /* dev */ NULL , key)))
+- {
+- if( strcmp( val , "true") == 0)
+- {
+- value = "false" ;
+- }
+- else if( strcmp( val , "false") == 0)
+- {
+- value = "true" ;
+- }
++ int flag ;
++
++ get_config_intern( screen , /* dev */ NULL , key , -1 , &flag) ;
++
++ if( flag == 1)
++ {
++ value = "false" ;
++ }
++ else if( flag == 0)
++ {
++ value = "true" ;
++ }
++ else
++ {
++ return 1 ;
+ }
+ }
+
+@@ -8312,7 +8320,7 @@
+ if( ( term = (*screen->system_listener->get_pty)( screen->system_listener->self ,
+ dev)) == NULL)
+ {
+- return 0 ;
++ return 1 ;
+ }
+ }
+ else
+@@ -8838,7 +8846,7 @@
+ }
+ else
+ {
+- return 0 ;
++ return 1 ;
+ }
+
+ usascii_font_cs_changed( screen , ml_term_get_encoding( screen->term)) ;
diff --git a/system/mlterm/mlterm.SlackBuild b/system/mlterm/mlterm.SlackBuild
index 9ed52d7e39..618d5e9cab 100644
--- a/system/mlterm/mlterm.SlackBuild
+++ b/system/mlterm/mlterm.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=mlterm
VERSION=${VERSION:-3.3.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -69,6 +69,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/mlterm-3.3.3-fixes.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \