tags 640715 + patch thanks On 09/06/2011 09:42 PM, Mònica Ramírez Arceda wrote: >> >> The following packages have unmet dependencies: >> sbuild-build-depends-ibus-unikey-dummy : Depends: libibus-dev but it is not >> installable >> E: Broken packages >
I've been able to fix the build failure by replacing libibus-dev in build-dependencies by libibus-1.0-dev and patching several files. However, I didn't find a way to *set* a value for engine->rank, which moved to a private part of the struct. In the patch, that part is commented and tagged "FIXME". HTH, -- Mehdi Dogguy مهدي الدڤي http://dogguy.org/
diff -Nru ibus-unikey-0.5/debian/changelog ibus-unikey-0.5/debian/changelog --- ibus-unikey-0.5/debian/changelog 2010-09-18 18:35:58.000000000 +0200 +++ ibus-unikey-0.5/debian/changelog 2011-09-24 01:14:35.000000000 +0200 @@ -1,3 +1,11 @@ +ibus-unikey (0.5-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Build depend on libibus-1.0-dev instead of libibus-dev and add + ibus-unikey-new-api.patch (Closes: #640715). + + -- Mehdi Dogguy <me...@debian.org> Fri, 23 Sep 2011 23:22:27 +0200 + ibus-unikey (0.5-2) unstable; urgency=low * debian/patches/crash-when-edit-macrotable.patch: fix bug crash when @@ -20,4 +28,3 @@ * Initial release (Closes: #558210). -- Lê Quá»c Tuấn <mr.lequoct...@gmail.com> Fri, 27 Nov 2009 08:54:00 +0700 - diff -Nru ibus-unikey-0.5/debian/control ibus-unikey-0.5/debian/control --- ibus-unikey-0.5/debian/control 2010-09-18 15:58:49.000000000 +0200 +++ ibus-unikey-0.5/debian/control 2011-09-23 23:22:16.000000000 +0200 @@ -2,7 +2,7 @@ Section: utils Priority: extra Maintainer: Lê Quá»c Tuấn <mr.lequoct...@gmail.com> -Build-Depends: debhelper (>= 7), autotools-dev, pkg-config, libibus-dev, libx11-dev, libgtk2.0-dev, libgconf2-dev +Build-Depends: debhelper (>= 7), autotools-dev, pkg-config, libibus-1.0-dev, libx11-dev, libgtk2.0-dev, libgconf2-dev Standards-Version: 3.9.1 Homepage: http://ibus-unikey.googlecode.com/ diff -Nru ibus-unikey-0.5/debian/patches/ibus-unikey-new-api.patch ibus-unikey-0.5/debian/patches/ibus-unikey-new-api.patch --- ibus-unikey-0.5/debian/patches/ibus-unikey-new-api.patch 1970-01-01 01:00:00.000000000 +0100 +++ ibus-unikey-0.5/debian/patches/ibus-unikey-new-api.patch 2011-09-24 01:12:45.000000000 +0200 @@ -0,0 +1,272 @@ +--- ibus-unikey-0.5/src/engine.cpp 2011-09-23 22:46:04.000000000 +0200 ++++ ibus-unikey-0.5.new/src/engine.cpp 2011-09-24 00:53:36.000000000 +0200 +@@ -138,9 +138,8 @@ + + static void ibus_unikey_engine_init(IBusUnikeyEngine* unikey) + { +- GValue v = {0}; + gchar* str; +- gboolean succ; ++ GVariant *succ; + guint i; + + unikey->preeditstr = new std::string(); +@@ -160,10 +159,10 @@ + + // read config value + // read Input Method +- succ = ibus_config_get_value(config, "engine/Unikey", "InputMethod", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey", "InputMethod"); + if (succ) + { +- str = (gchar*)g_value_get_string(&v); ++ g_variant_get (succ, "s", &str); + for (i = 0; i < NUM_INPUTMETHOD; i++) + { + if (strcasecmp(str, Unikey_IMNames[i]) == 0) +@@ -171,14 +170,14 @@ + unikey->im = Unikey_IM[i]; + } + } +- g_value_unset(&v); ++ g_variant_unref(succ); + } // end read Input Method + + // read Output Charset +- succ = ibus_config_get_value(config, "engine/Unikey", "OutputCharset", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey", "OutputCharset"); + if (succ) + { +- str = (gchar*)g_value_get_string(&v); ++ g_variant_get (succ, "s", &str); + for (i = 0; i < NUM_OUTPUTCHARSET; i++) + { + if (strcasecmp(str, Unikey_OCNames[i]) == 0) +@@ -186,64 +185,64 @@ + unikey->oc = Unikey_OC[i]; + } + } +- g_value_unset(&v); ++ g_variant_unref(succ); + } // end read Output Charset + + // read Unikey Option + // freemarking +- succ = ibus_config_get_value(config, "engine/Unikey/Options", "FreeMarking", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey/Options", "FreeMarking"); + if (succ) + { +- unikey->ukopt.freeMarking = g_value_get_boolean(&v); +- g_value_unset(&v); ++ unikey->ukopt.freeMarking = g_variant_get_boolean(succ); ++ g_variant_unref(succ); + } + + // modernstyle +- succ = ibus_config_get_value(config, "engine/Unikey/Options", "ModernStyle", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey/Options", "ModernStyle"); + if (succ) + { +- unikey->ukopt.modernStyle = g_value_get_boolean(&v); +- g_value_unset(&v); ++ unikey->ukopt.modernStyle = g_variant_get_boolean(succ); ++ g_variant_unref(succ); + } + + // macroEnabled +- succ = ibus_config_get_value(config, "engine/Unikey/Options", "MacroEnabled", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey/Options", "MacroEnabled"); + if (succ) + { +- unikey->ukopt.macroEnabled = g_value_get_boolean(&v); +- g_value_unset(&v); ++ unikey->ukopt.macroEnabled = g_variant_get_boolean(succ); ++ g_variant_unref(succ); + } + + // spellCheckEnabled +- succ = ibus_config_get_value(config, "engine/Unikey/Options", "SpellCheckEnabled", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey/Options", "SpellCheckEnabled"); + if (succ) + { +- unikey->ukopt.spellCheckEnabled = g_value_get_boolean(&v); +- g_value_unset(&v); ++ unikey->ukopt.spellCheckEnabled = g_variant_get_boolean(succ); ++ g_variant_unref(succ); + } + + // autoNonVnRestore +- succ = ibus_config_get_value(config, "engine/Unikey/Options", "AutoNonVnRestore", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey/Options", "AutoNonVnRestore"); + if (succ) + { +- unikey->ukopt.autoNonVnRestore = g_value_get_boolean(&v); +- g_value_unset(&v); ++ unikey->ukopt.autoNonVnRestore = g_variant_get_boolean(succ); ++ g_variant_unref(succ); + } + + // ProcessWAtBegin +- succ = ibus_config_get_value(config, "engine/Unikey/Options", "ProcessWAtBegin", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey/Options", "ProcessWAtBegin"); + if (succ) + { +- unikey->process_w_at_begin = g_value_get_boolean(&v); +- g_value_unset(&v); ++ unikey->process_w_at_begin = g_variant_get_boolean(succ); ++ g_variant_unref(succ); + } + + // MouseCapture +- succ = ibus_config_get_value(config, "engine/Unikey/Options", "MouseCapture", &v); ++ succ = ibus_config_get_value(config, "engine/Unikey/Options", "MouseCapture"); + if (succ) + { +- unikey->mouse_capture = g_value_get_boolean(&v); +- g_value_unset(&v); ++ unikey->mouse_capture = g_variant_get_boolean(succ); ++ g_variant_unref(succ); + } + // end read Unikey Option + // end read config value +@@ -331,7 +330,7 @@ + { + IBusProperty* prop; + IBusText* label; +- GValue v = {0}; ++ GVariant *v; + guint i, j; + + unikey = (IBusUnikeyEngine*)engine; +@@ -346,9 +345,8 @@ + { + unikey->im = Unikey_IM[i]; + +- g_value_init(&v, G_TYPE_STRING); +- g_value_set_string(&v, Unikey_IMNames[i]); +- ibus_config_set_value(config, "engine/Unikey", "InputMethod", &v); ++ v = g_variant_new_string (Unikey_IMNames[i]); ++ ibus_config_set_value(config, "engine/Unikey", "InputMethod", v); + + // update label + for (j=0; j<unikey->prop_list->properties->len; j++) +@@ -391,9 +389,8 @@ + { + unikey->oc = Unikey_OC[i]; + +- g_value_init(&v, G_TYPE_STRING); +- g_value_set_string(&v, Unikey_OCNames[i]); +- ibus_config_set_value(config, "engine/Unikey", "OutputCharset", &v); ++ v = g_variant_new_string (Unikey_OCNames[i]); ++ ibus_config_set_value(config, "engine/Unikey", "OutputCharset", v); + + // update label + for (j=0; j<unikey->prop_list->properties->len; j++) +@@ -431,9 +428,8 @@ + { + unikey->ukopt.spellCheckEnabled = !unikey->ukopt.spellCheckEnabled; + +- g_value_init(&v, G_TYPE_BOOLEAN); +- g_value_set_boolean(&v, unikey->ukopt.spellCheckEnabled); +- ibus_config_set_value(config, "engine/Unikey/Options", "SpellCheckEnabled", &v); ++ v = g_variant_new_boolean (unikey->ukopt.spellCheckEnabled); ++ ibus_config_set_value(config, "engine/Unikey/Options", "SpellCheckEnabled", v); + + // update state of state + for (j = 0; j < unikey->menu_opt->properties->len ; j++) +@@ -456,9 +452,8 @@ + { + unikey->ukopt.autoNonVnRestore = !unikey->ukopt.autoNonVnRestore; + +- g_value_init(&v, G_TYPE_BOOLEAN); +- g_value_set_boolean(&v, unikey->ukopt.autoNonVnRestore); +- ibus_config_set_value(config, "engine/Unikey/Options", "AutoNonVnRestore", &v); ++ v = g_variant_new_boolean (unikey->ukopt.autoNonVnRestore); ++ ibus_config_set_value(config, "engine/Unikey/Options", "AutoNonVnRestore", v); + + // update state of state + for (j = 0; j < unikey->menu_opt->properties->len ; j++) +@@ -481,9 +476,8 @@ + { + unikey->ukopt.modernStyle = !unikey->ukopt.modernStyle; + +- g_value_init(&v, G_TYPE_BOOLEAN); +- g_value_set_boolean(&v, unikey->ukopt.modernStyle); +- ibus_config_set_value(config, "engine/Unikey/Options", "ModernStyle", &v); ++ v = g_variant_new_boolean (unikey->ukopt.modernStyle); ++ ibus_config_set_value(config, "engine/Unikey/Options", "ModernStyle", v); + + // update state of state + for (j = 0; j < unikey->menu_opt->properties->len ; j++) +@@ -506,9 +500,8 @@ + { + unikey->ukopt.freeMarking = !unikey->ukopt.freeMarking; + +- g_value_init(&v, G_TYPE_BOOLEAN); +- g_value_set_boolean(&v, unikey->ukopt.freeMarking); +- ibus_config_set_value(config, "engine/Unikey/Options", "FreeMarking", &v); ++ v = g_variant_new_boolean (unikey->ukopt.freeMarking); ++ ibus_config_set_value(config, "engine/Unikey/Options", "FreeMarking", v); + + // update state of state + for (j = 0; j < unikey->menu_opt->properties->len ; j++) +@@ -531,9 +524,8 @@ + { + unikey->ukopt.macroEnabled = !unikey->ukopt.macroEnabled; + +- g_value_init(&v, G_TYPE_BOOLEAN); +- g_value_set_boolean(&v, unikey->ukopt.macroEnabled); +- ibus_config_set_value(config, "engine/Unikey/Options", "MacroEnabled", &v); ++ v = g_variant_new_boolean (unikey->ukopt.macroEnabled); ++ ibus_config_set_value(config, "engine/Unikey/Options", "MacroEnabled", v); + + // update state of state + for (j = 0; j < unikey->menu_opt->properties->len ; j++) +@@ -556,9 +548,8 @@ + { + unikey->process_w_at_begin = !unikey->process_w_at_begin; + +- g_value_init(&v, G_TYPE_BOOLEAN); +- g_value_set_boolean(&v, unikey->process_w_at_begin); +- ibus_config_set_value(config, "engine/Unikey/Options", "ProcessWAtBegin", &v); ++ v = g_variant_new_boolean (unikey->process_w_at_begin); ++ ibus_config_set_value(config, "engine/Unikey/Options", "ProcessWAtBegin", v); + + // update state of state + for (j = 0; j < unikey->menu_opt->properties->len ; j++) +@@ -581,9 +572,8 @@ + { + unikey->mouse_capture = !unikey->mouse_capture; + +- g_value_init(&v, G_TYPE_BOOLEAN); +- g_value_set_boolean(&v, unikey->mouse_capture); +- ibus_config_set_value(config, "engine/Unikey/Options", "MouseCapture", &v); ++ v = g_variant_new_boolean (unikey->mouse_capture); ++ ibus_config_set_value(config, "engine/Unikey/Options", "MouseCapture", v); + + // update state of state + for (j = 0; j < unikey->menu_opt->properties->len ; j++) +--- ibus-unikey-0.5/src/main.cpp 2010-02-05 09:50:24.000000000 +0100 ++++ ibus-unikey-0.5.new/src/main.cpp 2011-09-24 00:30:59.000000000 +0200 +@@ -56,7 +56,7 @@ + for (p = engines; p != NULL; p = p->next) + { + IBusEngineDesc* engine = (IBusEngineDesc*)p->data; +- ibus_factory_add_engine(factory, engine->name, IBUS_TYPE_UNIKEY_ENGINE); ++ ibus_factory_add_engine(factory, ibus_engine_desc_get_name (engine), IBUS_TYPE_UNIKEY_ENGINE); + } + + if (ibus) +--- ibus-unikey-0.5/src/utils.cpp 2010-06-11 10:26:00.000000000 +0200 ++++ ibus-unikey-0.5.new/src/utils.cpp 2011-09-24 01:04:02.000000000 +0200 +@@ -46,8 +46,8 @@ + PKGDATADIR"/icons/ibus-unikey.png", + "us" + ); +- +- engine->rank = 99; ++ ++ /* FIXME: part of private set of members now: engine->rank = 99; */ + + ibus_component_add_engine(component, engine); + diff -Nru ibus-unikey-0.5/debian/patches/series ibus-unikey-0.5/debian/patches/series --- ibus-unikey-0.5/debian/patches/series 2010-09-18 15:06:07.000000000 +0200 +++ ibus-unikey-0.5/debian/patches/series 2011-09-24 01:13:09.000000000 +0200 @@ -1,3 +1,4 @@ crash-when-edit-macrotable.patch macro-on-but-cant-use.patch check-setup-to-reload-config.patch +ibus-unikey-new-api.patch