[ibus-m17n] Update to 1.3.4-5.

Daiki Ueno ueno at fedoraproject.org
Wed Sep 26 08:58:28 UTC 2012


commit ab1552bc28cce27c422c5abdde9cc9308c7c1517
Author: Daiki Ueno <ueno at unixuser.org>
Date:   Wed Sep 26 17:58:05 2012 +0900

    Update to 1.3.4-5.

 ibus-m17n-honor-user-cflags.patch |  170 +++++++++++++++++++++++++++++++++++++
 ibus-m17n.spec                    |    7 ++-
 2 files changed, 176 insertions(+), 1 deletions(-)
---
diff --git a/ibus-m17n-honor-user-cflags.patch b/ibus-m17n-honor-user-cflags.patch
new file mode 100644
index 0000000..334eef0
--- /dev/null
+++ b/ibus-m17n-honor-user-cflags.patch
@@ -0,0 +1,170 @@
+From 3f8feaf9ab19f28f4bb7a121b34a844596a01472 Mon Sep 17 00:00:00 2001
+From: Daiki Ueno <ueno at unixuser.org>
+Date: Wed, 26 Sep 2012 10:03:00 +0900
+Subject: [PATCH] Pass user-supplied CFLAGS to configure.
+
+Also fix several compiler warnings.
+
+BUG=none
+
+Review URL: https://codereview.appspot.com/6564047
+---
+ autogen.sh     |  4 ++--
+ src/engine.c   | 22 +++-------------------
+ src/m17nutil.c | 15 +++++++--------
+ src/setup.c    | 17 +++++++++--------
+ 4 files changed, 21 insertions(+), 37 deletions(-)
+
+Index: ibus-m17n-1.3.4/autogen.sh
+===================================================================
+--- ibus-m17n-1.3.4.orig/autogen.sh
++++ ibus-m17n-1.3.4/autogen.sh
+@@ -18,8 +18,8 @@ which gnome-autogen.sh || {
+     exit 1
+ }
+ 
+-export CFLAGS="-g -O0"
+-export CXXFLAGS="$CFLAGS"
++export CFLAGS=${CFLAGS-"-Wall"}
++export CXXFLAGS=${CXXFLAGS-"$CFLAGS"}
+ 
+ ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
+ REQUIRED_AUTOMAKE_VERSION=1.10
+Index: ibus-m17n-1.3.4/src/engine.c
+===================================================================
+--- ibus-m17n-1.3.4.orig/src/engine.c
++++ ibus-m17n-1.3.4/src/engine.c
+@@ -77,14 +77,6 @@ static void ibus_m17n_engine_focus_out
+ static void ibus_m17n_engine_reset          (IBusEngine             *engine);
+ static void ibus_m17n_engine_enable         (IBusEngine             *engine);
+ static void ibus_m17n_engine_disable        (IBusEngine             *engine);
+-static void ibus_engine_set_cursor_location (IBusEngine             *engine,
+-                                             gint                    x,
+-                                             gint                    y,
+-                                             gint                    w,
+-                                             gint                    h);
+-static void ibus_m17n_engine_set_capabilities
+-                                            (IBusEngine             *engine,
+-                                             guint                   caps);
+ static void ibus_m17n_engine_page_up        (IBusEngine             *engine);
+ static void ibus_m17n_engine_page_down      (IBusEngine             *engine);
+ static void ibus_m17n_engine_cursor_up      (IBusEngine             *engine);
+@@ -93,12 +85,6 @@ static void ibus_m17n_engine_property_ac
+                                             (IBusEngine             *engine,
+                                              const gchar            *prop_name,
+                                              guint                   prop_state);
+-static void ibus_m17n_engine_property_show
+-                                            (IBusEngine             *engine,
+-                                             const gchar            *prop_name);
+-static void ibus_m17n_engine_property_hide
+-                                            (IBusEngine             *engine,
+-                                             const gchar            *prop_name);
+ 
+ static void ibus_m17n_engine_commit_string
+                                             (IBusM17NEngine         *m17n,
+@@ -1247,7 +1233,9 @@ ibus_m17n_engine_callback (MInputContext
+                                           &anchor_pos);
+         nchars = ibus_text_get_length (text);
+         nbytes = g_utf8_offset_to_pointer (text->text, nchars) - text->text;
+-        mt = mconv_decode_buffer (Mcoding_utf_8, text->text, nbytes);
++        mt = mconv_decode_buffer (Mcoding_utf_8,
++                                  (const unsigned char *) text->text,
++                                  nbytes);
+         g_object_unref (text);
+ 
+         len = (long) mplist_value (m17n->context->plist);
+Index: ibus-m17n-1.3.4/src/m17nutil.c
+===================================================================
+--- ibus-m17n-1.3.4.orig/src/m17nutil.c
++++ ibus-m17n-1.3.4/src/m17nutil.c
+@@ -55,7 +55,9 @@ ibus_m17n_mtext_to_utf8 (MText *text)
+     bufsize = (mtext_len (text) + 1) * 6;
+     buf = (gchar *) g_malloc (bufsize);
+ 
+-    mconv_rebind_buffer (utf8_converter, buf, bufsize);
++    mconv_rebind_buffer (utf8_converter,
++                         (const unsigned char *) buf,
++                         bufsize);
+     mconv_encode (utf8_converter, text);
+ 
+     buf [utf8_converter->nbytes] = 0;
+@@ -78,7 +80,9 @@ ibus_m17n_mtext_to_ucs4 (MText *text, gl
+     bufsize = (mtext_len (text) + 1) * 6;
+     buf = (gchar *) g_malloc (bufsize);
+ 
+-    mconv_rebind_buffer (utf8_converter, buf, bufsize);
++    mconv_rebind_buffer (utf8_converter,
++                         (const unsigned char *) buf,
++                         bufsize);
+     if (mconv_encode (utf8_converter, text) < 0) {
+         g_free (buf);
+         return NULL;
+@@ -204,17 +208,12 @@ ibus_m17n_list_engines (void)
+             if (l) {
+                 /* check candidates encoding */
+                 MPlist *sl;
+-                MSymbol varname;
+-                MText *vardesc;
+-                MSymbol varunknown;
+                 MSymbol varcharset;
+ 
+                 sl = mplist_value (l);
+-                varname  = mplist_value (sl);
++                /* L = (VAR-NAME DESCRIPTION 'nil' VALUE) */
+                 sl = mplist_next (sl);
+-                vardesc = mplist_value (sl);
+                 sl = mplist_next (sl);
+-                varunknown = mplist_value (sl);
+                 sl = mplist_next (sl);
+                 varcharset = mplist_value (sl);
+ 
+Index: ibus-m17n-1.3.4/src/setup.c
+===================================================================
+--- ibus-m17n-1.3.4.orig/src/setup.c
++++ ibus-m17n-1.3.4/src/setup.c
+@@ -73,7 +73,9 @@ parse_m17n_value (MPlist *plist, gchar *
+     if (mplist_key (plist) == Mtext) {
+         MText *mtext;
+ 
+-        mtext = mconv_decode_buffer (Mcoding_utf_8, text, strlen (text));
++        mtext = mconv_decode_buffer (Mcoding_utf_8,
++                                     (const unsigned char *) text,
++                                     strlen (text));
+         value = mplist ();
+         mplist_add (value, Mtext, mtext);
+         return value;
+@@ -372,10 +374,10 @@ setup_dialog_load_config (SetupDialog *d
+ static gchar *
+ _gdk_color_to_string (GdkColor *color)
+ {
+-    g_strdup_printf ("#%02X%02X%02X",
+-                     (color->red & 0xFF00) >> 8,
+-                     (color->green & 0xFF00) >> 8,
+-                     (color->blue & 0xFF00) >> 8);
++    return g_strdup_printf ("#%02X%02X%02X",
++                            (color->red & 0xFF00) >> 8,
++                            (color->green & 0xFF00) >> 8,
++                            (color->blue & 0xFF00) >> 8);
+ }
+ 
+ static void
+@@ -428,7 +430,7 @@ save_m17n_options (SetupDialog *dialog)
+     gboolean retval = TRUE;
+ 
+     if (!gtk_tree_model_get_iter_first (model, &iter))
+-        return;
++        return FALSE;
+ 
+     do {
+         gtk_tree_model_get (model, &iter,
+@@ -567,9 +569,8 @@ start (const gchar *engine_name)
+ {
+     IBusBus *bus;
+     IBusConfig *config;
+-    gchar **strv, *section;
++    gchar **strv;
+     SetupDialog *dialog;
+-    GObject *object;
+ 
+     ibus_init ();
+     ibus_m17n_init_common ();
diff --git a/ibus-m17n.spec b/ibus-m17n.spec
index 6d35123..f8e9480 100644
--- a/ibus-m17n.spec
+++ b/ibus-m17n.spec
@@ -19,7 +19,7 @@
 
 Name:       ibus-m17n
 Version:    1.3.4
-Release:    4%{?dist}
+Release:    5%{?dist}
 Summary:    The M17N engine for IBus platform
 License:    GPLv2+
 Group:      System Environment/Libraries
@@ -33,6 +33,7 @@ Patch3:	    ibus-m17n-blacklist-engines.patch
 Patch4:	    ibus-m17n-virtkbd.patch
 Patch5:	    ibus-m17n-fix-mtext-config.patch
 Patch6:	    ibus-m17n-translit-layout.patch
+Patch7:	    ibus-m17n-honor-user-cflags.patch
 
 # The following BR is for autogen and not necessary when packging
 # released tarballs.
@@ -68,6 +69,7 @@ the input table maps from m17n-db.
 %patch4 -p1 -b .virtkbd
 %patch5 -p1 -b .fix-mtext-config
 %patch6 -p1 -b .translit-layout
+%patch7 -p1 -b .honor-user-cflags
 
 NOCONFIGURE=1 ./autogen.sh
 
@@ -89,6 +91,9 @@ make DESTDIR=${RPM_BUILD_ROOT} install
 %{_datadir}/ibus/component/*
 
 %changelog
+* Wed Sep 26 2012 Daiki Ueno <dueno at redhat.com> - 1.3.4-5
+- Add ibus-m17n-honor-user-cflags.patch
+
 * Wed Aug 15 2012 Daiki Ueno <dueno at redhat.com> - 1.3.4-4
 - Add ibus-m17n-translit-layout.patch
 - Fix bug 847495 - For non-US keyboard layout Ibus-m17n adds English


More information about the scm-commits mailing list