Update to 1.3.4-5.

This commit is contained in:
Daiki Ueno 2012-09-26 17:58:05 +09:00
parent 306c8fa0b0
commit ab1552bc28
2 changed files with 176 additions and 1 deletions

View File

@ -0,0 +1,170 @@
From 3f8feaf9ab19f28f4bb7a121b34a844596a01472 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@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 ();

View File

@ -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@redhat.com> - 1.3.4-5
- Add ibus-m17n-honor-user-cflags.patch
* Wed Aug 15 2012 Daiki Ueno <dueno@redhat.com> - 1.3.4-4
- Add ibus-m17n-translit-layout.patch
- Fix bug 847495 - For non-US keyboard layout Ibus-m17n adds English