Hello community,

here is the log from the commit of package ibus-hangul for openSUSE:Factory
checked in at Thu Oct 13 19:41:41 CEST 2011.



--------
--- openSUSE:Factory/ibus-hangul/ibus-hangul.changes    2011-09-23 
02:03:06.000000000 +0200
+++ /mounts/work_src_done/STABLE/ibus-hangul/ibus-hangul.changes        
2011-10-12 14:29:22.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Oct 12 11:49:43 CEST 2011 - [email protected]
+
+- Fix build with ibus-1.4, the patch taken from Fedora (bnc#723591)
+- Fix the installation path of setup program
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  ibus-hangul-ibus-1.4.patch
  ibus-hangul-setup-dir-fix.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ibus-hangul.spec ++++++
--- /var/tmp/diff_new_pack.IbzgYf/_old  2011-10-13 19:41:38.000000000 +0200
+++ /var/tmp/diff_new_pack.IbzgYf/_new  2011-10-13 19:41:38.000000000 +0200
@@ -28,6 +28,8 @@
 Provides:       locale(ibus:ko)
 Url:            http://code.google.com/p/ibus/
 Source:         %{name}-%{version}.tar.gz
+Patch:          ibus-hangul-ibus-1.4.patch
+Patch1:         ibus-hangul-setup-dir-fix.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -37,6 +39,12 @@
 
 %prep
 %setup -q
+%patch -p1
+%patch1 -p1
+# autoreconf -fi
+aclocal -Im4
+automake --foreign --copy --add-missing
+autoconf
 
 %build
 %configure --disable-static --libexecdir=%{_prefix}/%{_lib}/ibus
@@ -56,6 +64,7 @@
 %doc AUTHORS COPYING README
 %dir %{_libdir}/ibus
 %{_libdir}/ibus/ibus-*
+%{_prefix}/%{_lib}/ibus
 %{_datadir}/ibus-*
 %dir %{_datadir}/ibus
 %dir %{_datadir}/ibus/component

++++++ ibus-hangul-ibus-1.4.patch ++++++
Patch to follow ibus 1.4 config API change.
Index: ibus-hangul-1.3.1/src/engine.c
===================================================================
--- ibus-hangul-1.3.1.orig/src/engine.c
+++ ibus-hangul-1.3.1/src/engine.c
@@ -111,7 +111,11 @@ static void ibus_hangul_engine_update_lo
 static void ibus_config_value_changed       (IBusConfig             *config,
                                              const gchar            *section,
                                              const gchar            *name,
+#if IBUS_CHECK_VERSION(1,3,99)
+                                             GVariant               *value,
+#else
                                              GValue                 *value,
+#endif  /* !IBUS_CHECK_VERSION(1,3,99) */
                                              gpointer                
user_data);
 
 static void        lookup_table_set_visible (IBusLookupTable        *table,
@@ -136,6 +140,11 @@ static gboolean hanja_key_list_match    
 static gboolean hanja_key_list_has_modifier (HanjaKeyList           *list,
                                              guint                   keyval);
 
+static gboolean config_get_string           (IBusConfig             *config,
+                                             const gchar            *section,
+                                             const gchar            *name,
+                                             gchar                 **result);
+
 static IBusEngineClass *parent_class = NULL;
 static HanjaTable *hanja_table = NULL;
 static HanjaTable *symbol_table = NULL;
@@ -176,7 +185,7 @@ void
 ibus_hangul_init (IBusBus *bus)
 {
     gboolean res;
-    GValue value = { 0, };
+    gchar *str;
 
     hanja_table = hanja_table_load (NULL);
 
@@ -187,22 +196,20 @@ ibus_hangul_init (IBusBus *bus)
         g_object_ref_sink (config);
 
     hangul_keyboard = g_string_new_len ("2", 8);
-    res = ibus_config_get_value (config, "engine/Hangul",
-                                         "HangulKeyboard", &value);
+    str = NULL;
+    res = config_get_string (config, "engine/Hangul", "HangulKeyboard", &str);
     if (res) {
-        const gchar* str = g_value_get_string (&value);
         g_string_assign (hangul_keyboard, str);
-        g_value_unset(&value);
+        g_free (str);
     }
 
     hanja_key_list_init(&hanja_keys);
 
-    res = ibus_config_get_value (config, "engine/Hangul",
-                                         "HanjaKeys", &value);
+    str = NULL;
+    res = config_get_string (config, "engine/Hangul", "HanjaKeys", &str);
     if (res) {
-        const gchar* str = g_value_get_string (&value);
         hanja_key_list_set_from_string(&hanja_keys, str);
-        g_value_unset(&value);
+        g_free (str);
     } else {
        hanja_key_list_append(&hanja_keys, IBUS_Hangul_Hanja, 0);
        hanja_key_list_append(&hanja_keys, IBUS_F9, 0);
@@ -963,27 +970,71 @@ ibus_hangul_engine_property_activate (IB
     }
 }
 
+static gboolean
+config_get_string (IBusConfig  *config,
+                   const gchar *section,
+                   const gchar *name,
+                   gchar      **result)
+{
+#if IBUS_CHECK_VERSION(1,3,99)
+    GVariant *value = NULL;
+
+    g_return_val_if_fail (result != NULL, FALSE);
+
+    value = ibus_config_get_value (config, section, name);
+    if (value) {
+        *result = g_strdup (g_variant_get_string (value, NULL));
+        g_variant_unref (value);
+        return TRUE;
+    }
+    return FALSE;
+#else
+    GValue value = { 0 };
+
+    g_return_val_if_fail (result != NULL, FALSE);
+
+    if (ibus_config_get_value (config, section, name, &value)) {
+        *result = g_strdup (g_value_get_string (&value));
+        g_value_unset (&value);
+        return TRUE;
+    }
+    return FALSE;
+#endif  /* !IBUS_CHECK_VERSION(1,3,99) */
+}
+
+#if IBUS_CHECK_VERSION(1,3,99)
+#define _g_variant_get_string g_variant_get_string
+#define _g_variant_get_int32 g_variant_get_int32
+#else
+#define _g_variant_get_string(value, length) g_value_get_string(value)
+#define _g_variant_get_int32 g_value_get_int
+#endif  /* !IBUS_CHECK_VERSION(1,3,99) */
+
 static void
 ibus_config_value_changed (IBusConfig   *config,
                            const gchar  *section,
                            const gchar  *name,
+#if IBUS_CHECK_VERSION(1,3,99)
+                           GVariant     *value,
+#else
                            GValue       *value,
+#endif  /* !IBUS_CHECK_VERSION(1,3,99) */
                            gpointer      user_data)
 {
     IBusHangulEngine *hangul = (IBusHangulEngine *) user_data;
 
     if (strcmp(section, "engine/Hangul") == 0) {
         if (strcmp(name, "HangulKeyboard") == 0) {
-            const gchar *str = g_value_get_string (value);
+            const gchar *str = _g_variant_get_string (value, NULL);
             g_string_assign (hangul_keyboard, str);
             hangul_ic_select_keyboard (hangul->context, hangul_keyboard->str);
         } else if (strcmp(name, "HanjaKeys") == 0) {
-            const gchar* str = g_value_get_string (value);
+            const gchar* str = _g_variant_get_string (value, NULL);
            hanja_key_list_set_from_string(&hanja_keys, str);
         }
     } else if (strcmp(section, "panel") == 0) {
         if (strcmp(name, "lookup_table_orientation") == 0) {
-            lookup_table_orientation = g_value_get_int (value);
+            lookup_table_orientation = _g_variant_get_int32 (value);
         }
     }
 }
++++++ ibus-hangul-setup-dir-fix.diff ++++++
---
 setup/Makefile.am |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -26,7 +26,7 @@
 
 nodist_setup_hangul_PYTHON = config.py
 
-setup_hanguldir = $(datadir)/ibus-hangul/setup
+setup_hanguldir = $(libexecdir)
 
 libexec_SCRIPTS = ibus-setup-hangul
 
continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to