summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2012-02-13 18:13:53 +0000
committerJohannes Huber <johu@gentoo.org>2012-02-13 18:13:53 +0000
commit141ff56f8d73320b9b0ce79f34a0c9366451955b (patch)
treeb82c9e93cee866fb56e5b3bc86aba9149b1b827a /kde-base
parentDo not install shadow.3 man page, see bug #403379. (diff)
downloadgentoo-2-141ff56f8d73320b9b0ce79f34a0c9366451955b.tar.gz
gentoo-2-141ff56f8d73320b9b0ce79f34a0c9366451955b.tar.bz2
gentoo-2-141ff56f8d73320b9b0ce79f34a0c9366451955b.zip
Add upstream patch to build with app-i18n/ibus-1.4.1 wrt bug #403367.
(Portage version: 2.2.0_alpha86/cvs/Linux i686)
Diffstat (limited to 'kde-base')
-rw-r--r--kde-base/kdeplasma-addons/ChangeLog6
-rw-r--r--kde-base/kdeplasma-addons/files/kdeplasma-addons-4.8.0-ibus141.patch328
-rw-r--r--kde-base/kdeplasma-addons/kdeplasma-addons-4.8.0.ebuild6
3 files changed, 338 insertions, 2 deletions
diff --git a/kde-base/kdeplasma-addons/ChangeLog b/kde-base/kdeplasma-addons/ChangeLog
index 71331dc7d8df..ee4467c699b6 100644
--- a/kde-base/kdeplasma-addons/ChangeLog
+++ b/kde-base/kdeplasma-addons/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for kde-base/kdeplasma-addons
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeplasma-addons/ChangeLog,v 1.118 2012/01/25 18:17:16 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeplasma-addons/ChangeLog,v 1.119 2012/02/13 18:13:53 johu Exp $
+
+ 13 Feb 2012; Johannes Huber <johu@gentoo.org>
+ +files/kdeplasma-addons-4.8.0-ibus141.patch, kdeplasma-addons-4.8.0.ebuild:
+ Add upstream patch to build with app-i18n/ibus-1.4.1 wrt bug #403367.
*kdeplasma-addons-4.8.0 (25 Jan 2012)
diff --git a/kde-base/kdeplasma-addons/files/kdeplasma-addons-4.8.0-ibus141.patch b/kde-base/kdeplasma-addons/files/kdeplasma-addons-4.8.0-ibus141.patch
new file mode 100644
index 000000000000..94521be6b252
--- /dev/null
+++ b/kde-base/kdeplasma-addons/files/kdeplasma-addons-4.8.0-ibus141.patch
@@ -0,0 +1,328 @@
+commit c36d480a2b1867fffc553ccbeb55bef5d6a0d72e
+Author: Weng Xuetian <wengxt@gmail.com>
+Date: Sun Feb 12 19:54:39 2012 +0800
+
+ backport: ibus 1.4.1 compatible.
+
+diff --git a/applets/kimpanel/backend/ibus/panel.c b/applets/kimpanel/backend/ibus/panel.c
+index 9ec68cf..b917c89 100644
+--- a/applets/kimpanel/backend/ibus/panel.c
++++ b/applets/kimpanel/backend/ibus/panel.c
+@@ -1,6 +1,6 @@
+ /*
+ * This file is part of KIMToy, an input method frontend for KDE
+- * Copyright (C) 2011 Ni Hui <shuizhuyuanluo@126.com>
++ * Copyright (C) 2011-2012 Ni Hui <shuizhuyuanluo@126.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+@@ -28,6 +28,9 @@
+ #endif
+ #include "panel.h"
+
++#ifndef DBUS_ERROR_FAILED
++#define DBUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
++#endif /* DBUS_ERROR_FAILED */
+ #define _UNUSED(x) ((void) x)
+
+ typedef struct _IBusPanelImpanelClass IBusPanelImpanelClass;
+@@ -236,6 +239,7 @@ ibus_property_args_to_propstr (const char *key,
+ char *propstr)
+ {
+ static const char pre[] = "/IBus/";
++ propstr[0] = '\0';
+ strcat(propstr, pre);
+ strcat(propstr, key);
+ strcat(propstr, prop_sep);
+@@ -250,11 +254,19 @@ static void
+ ibus_property_to_propstr (IBusProperty *property,
+ char *propstr)
+ {
++#if !IBUS_CHECK_VERSION(1,3,99)
+ ibus_property_args_to_propstr(property->key,
+ property->label->text,
+ property->icon,
+ property->tooltip->text,
+ propstr);
++#else
++ ibus_property_args_to_propstr(ibus_property_get_key (property),
++ ibus_text_get_text (ibus_property_get_label (property)),
++ ibus_property_get_icon (property),
++ ibus_text_get_text (ibus_property_get_tooltip (property)),
++ propstr);
++#endif
+ }
+
+ static void
+@@ -266,6 +278,7 @@ ibus_engine_desc_args_to_propstr (const char *name,
+ char *propstr)
+ {
+ static const char pre[] = "/IBus/Engine/";
++ propstr[0] = '\0';
+ strcat(propstr, pre);
+ strcat(propstr, name);
+ strcat(propstr, prop_sep);
+@@ -502,48 +515,34 @@ ibus_panel_impanel_init (IBusPanelImpanel *impanel)
+ impanel, NULL);
+
+ // some custom property
+- impanel->logo_prop = (IBusProperty *)malloc(sizeof(IBusProperty));
+- memset(impanel->logo_prop, 0, sizeof(IBusProperty));
+- impanel->logo_prop->key = strdup("Logo");
+- impanel->logo_prop->icon = strdup("ibus");
+- impanel->logo_prop->label = (IBusText *)malloc(sizeof(IBusText));
+- memset(impanel->logo_prop->label, 0, sizeof(IBusText));
+- impanel->logo_prop->label->text = strdup("IBus");
+- impanel->logo_prop->tooltip = (IBusText *)malloc(sizeof(IBusText));
+- memset(impanel->logo_prop->tooltip, 0, sizeof(IBusText));
+- impanel->logo_prop->tooltip->text = strdup("IBus input method");
+- impanel->about_prop = (IBusProperty *)malloc(sizeof(IBusProperty));
+- memset(impanel->about_prop, 0, sizeof(IBusProperty));
+- impanel->about_prop->key = strdup("About");
+- impanel->about_prop->icon = strdup("ibus-help");
+- impanel->about_prop->label = (IBusText *)malloc(sizeof(IBusText));
+- memset(impanel->about_prop->label, 0, sizeof(IBusText));
+- impanel->about_prop->label->text = strdup("IBus intelligent input bus");
+- impanel->about_prop->tooltip = (IBusText *)malloc(sizeof(IBusText));
+- memset(impanel->about_prop->tooltip, 0, sizeof(IBusText));
+- impanel->about_prop->tooltip->text = strdup("IBus is an intelligent input bus for Linux/Unix.\n\n"
+- "Huang Peng <shawn.p.huang@gmail.com>");
++ impanel->logo_prop = ibus_property_new ("Logo",
++ PROP_TYPE_NORMAL,
++ ibus_text_new_from_string ("IBus"),
++ "ibus",
++ ibus_text_new_from_string ("IBus input method"),
++ FALSE,
++ FALSE,
++ PROP_STATE_UNCHECKED,
++ NULL);
++
++ impanel->about_prop = ibus_property_new ("About",
++ PROP_TYPE_NORMAL,
++ ibus_text_new_from_string ("IBus intelligent input bus"),
++ "ibus-help",
++ ibus_text_new_from_string ("IBus is an intelligent input bus for Linux/Unix.\n\n"
++ "Huang Peng <shawn.p.huang@gmail.com>"),
++ FALSE,
++ FALSE,
++ PROP_STATE_UNCHECKED,
++ NULL);
+ }
+
+ static void
+ ibus_panel_impanel_destroy (IBusPanelImpanel *impanel)
+ {
+- // free custom property
+- free(impanel->logo_prop->key);
+- free(impanel->logo_prop->icon);
+- free(impanel->logo_prop->label->text);
+- free(impanel->logo_prop->label);
+- free(impanel->logo_prop->tooltip->text);
+- free(impanel->logo_prop->tooltip);
+- free(impanel->logo_prop);
++ g_object_unref (impanel->logo_prop);
+ impanel->logo_prop = NULL;
+- free(impanel->about_prop->key);
+- free(impanel->about_prop->icon);
+- free(impanel->about_prop->label->text);
+- free(impanel->about_prop->label);
+- free(impanel->about_prop->tooltip->text);
+- free(impanel->about_prop->tooltip);
+- free(impanel->about_prop);
++ g_object_unref (impanel->about_prop);
+ impanel->about_prop = NULL;
+
+ g_bus_unown_name (owner_id);
+@@ -584,8 +583,7 @@ ibus_panel_impanel_focus_in (IBusPanelService *panel,
+ // fprintf(stderr, "enable %d %s\n", enable, input_context_path);
+
+ if (enable == 0) {
+- free(IBUS_PANEL_IMPANEL (panel)->logo_prop->icon);
+- IBUS_PANEL_IMPANEL (panel)->logo_prop->icon = strdup("ibus");
++ ibus_property_set_icon (IBUS_PANEL_IMPANEL (panel)->logo_prop, "ibus");
+ }
+ else {
+ IBusEngineDesc *engine_desc = ibus_input_context_get_engine(ic);
+@@ -600,11 +598,10 @@ ibus_panel_impanel_focus_in (IBusPanelService *panel,
+ #endif
+ }
+
+- free(IBUS_PANEL_IMPANEL (panel)->logo_prop->icon);
+ #if !IBUS_CHECK_VERSION(1,3,99)
+- IBUS_PANEL_IMPANEL (panel)->logo_prop->icon = strdup(engine_desc->icon);
++ ibus_property_set_icon (IBUS_PANEL_IMPANEL (panel)->logo_prop, engine_desc->icon);
+ #else
+- IBUS_PANEL_IMPANEL (panel)->logo_prop->icon = strdup(ibus_engine_desc_get_icon(engine_desc));
++ ibus_property_set_icon (IBUS_PANEL_IMPANEL (panel)->logo_prop, ibus_engine_desc_get_icon (engine_desc));
+ #endif
+ }
+
+@@ -654,41 +651,28 @@ ibus_panel_impanel_register_properties (IBusPanelService *panel,
+ {
+ IBusProperty* property = NULL;
+ guint i = 0;
+- char *logo_propstr;
+- char *about_propstr;
+- char *need_free[32] = {NULL};// WARNING enough large I think --- nihui
++ char propstr[512];
+
+ GVariantBuilder builder;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
+
+- logo_propstr = (char*)malloc(512 * sizeof(char));
+- logo_propstr[0] = '\0';
+- ibus_property_to_propstr(IBUS_PANEL_IMPANEL (panel)->logo_prop, logo_propstr);
+- g_variant_builder_add (&builder, "s", logo_propstr);
++ ibus_property_to_propstr(IBUS_PANEL_IMPANEL (panel)->logo_prop, propstr);
++ g_variant_builder_add (&builder, "s", propstr);
+
+ while ( ( property = ibus_prop_list_get( prop_list, i ) ) != NULL ) {
+- need_free[i] = (char*)malloc(512 * sizeof(char));
+- need_free[i][0] = '\0';
+- ibus_property_to_propstr(property, need_free[i]);
+- g_variant_builder_add (&builder, "s", need_free[i]);
++ ibus_property_to_propstr(property, propstr);
++ g_variant_builder_add (&builder, "s", propstr);
+ ++i;
+ }
+
+- about_propstr = (char*)malloc(512 * sizeof(char));
+- about_propstr[0] = '\0';
+- ibus_property_to_propstr(IBUS_PANEL_IMPANEL (panel)->about_prop, about_propstr);
+- g_variant_builder_add (&builder, "s", about_propstr);
++ ibus_property_to_propstr(IBUS_PANEL_IMPANEL (panel)->about_prop, propstr);
++ g_variant_builder_add (&builder, "s", propstr);
+
+ g_dbus_connection_emit_signal (IBUS_PANEL_IMPANEL (panel)->conn,
+ NULL, "/kimpanel", "org.kde.kimpanel.inputmethod", "RegisterProperties",
+ g_variant_new ("(as)", &builder),
+ NULL);
+
+- free(logo_propstr);
+- free(about_propstr);
+- for (i = 0; i < 32; ++i) {
+- free(need_free[i]);
+- }
+ #if !IBUS_CHECK_VERSION(1,3,99)
+ _UNUSED(error);
+ return TRUE;
+@@ -738,7 +722,11 @@ ibus_panel_impanel_update_auxiliary_text (IBusPanelService *panel,
+ gboolean visible)
+ #endif
+ {
+- gchar* t = text->text;
++#if !IBUS_CHECK_VERSION(1,3,99)
++ const gchar* t = text->text;
++#else
++ const gchar* t = ibus_text_get_text (text);
++#endif
+ const gchar *attr = "";
+
+ g_dbus_connection_emit_signal (IBUS_PANEL_IMPANEL (panel)->conn,
+@@ -792,7 +780,7 @@ ibus_panel_impanel_update_lookup_table (IBusPanelService *panel,
+ guint i;
+
+ gchar label[16][4];// WARNING large enough I think --- nihui
+- gchar *candidate;
++ const gchar *candidate;
+
+ GVariantBuilder builder_labels;
+ GVariantBuilder builder_candidates;
+@@ -808,7 +796,11 @@ ibus_panel_impanel_update_lookup_table (IBusPanelService *panel,
+ // label = ibus_lookup_table_get_label(lookup_table, i)->text;
+ g_variant_builder_add (&builder_labels, "s", label[i-start]);
+
+- candidate = ibus_lookup_table_get_candidate(lookup_table, i)->text;
++#if !IBUS_CHECK_VERSION(1,3,99)
++ candidate = ibus_lookup_table_get_candidate (lookup_table, i)->text;
++#else
++ candidate = ibus_text_get_text (ibus_lookup_table_get_candidate (lookup_table, i));
++#endif
+ g_variant_builder_add (&builder_candidates, "s", candidate);
+
+ g_variant_builder_add (&builder_attrs, "s", attr);
+@@ -858,7 +850,11 @@ ibus_panel_impanel_update_preedit_text (IBusPanelService *panel,
+ gboolean visible)
+ #endif
+ {
+- gchar* t = text->text;
++#if !IBUS_CHECK_VERSION(1,3,99)
++ const gchar* t = text->text;
++#else
++ const gchar* t = ibus_text_get_text (text);
++#endif
+ const gchar *attr = "";
+
+ g_dbus_connection_emit_signal (IBUS_PANEL_IMPANEL (panel)->conn,
+@@ -1181,8 +1177,7 @@ ibus_panel_impanel_state_changed (IBusPanelService *panel)
+ gboolean enable = ibus_input_context_is_enabled(IBUS_PANEL_IMPANEL (panel)->input_context);
+
+ if (enable == 0) {
+- free(IBUS_PANEL_IMPANEL (panel)->logo_prop->icon);
+- IBUS_PANEL_IMPANEL (panel)->logo_prop->icon = strdup("ibus");
++ ibus_property_set_icon (IBUS_PANEL_IMPANEL (panel)->logo_prop, "ibus");
+ }
+ else {
+ IBusEngineDesc *engine_desc = ibus_input_context_get_engine(IBUS_PANEL_IMPANEL (panel)->input_context);
+@@ -1194,11 +1189,10 @@ ibus_panel_impanel_state_changed (IBusPanelService *panel)
+ #endif
+ }
+
+- free(IBUS_PANEL_IMPANEL (panel)->logo_prop->icon);
+ #if !IBUS_CHECK_VERSION(1,3,99)
+- IBUS_PANEL_IMPANEL (panel)->logo_prop->icon = strdup(engine_desc->icon);
++ ibus_property_set_icon (IBUS_PANEL_IMPANEL (panel)->logo_prop, engine_desc->icon);
+ #else
+- IBUS_PANEL_IMPANEL (panel)->logo_prop->icon = strdup(ibus_engine_desc_get_icon(engine_desc));
++ ibus_property_set_icon (IBUS_PANEL_IMPANEL (panel)->logo_prop, ibus_engine_desc_get_icon (engine_desc));
+ #endif
+ }
+
+@@ -1239,9 +1233,7 @@ ibus_panel_impanel_exec_dialog (IBusPanelService *panel)
+ static void
+ ibus_panel_impanel_exec_menu (IBusPanelService *panel)
+ {
+- guint i = 0;
+- char *disable_propstr;
+- char *need_free[64] = {NULL};// WARNING enough large I think --- nihui
++ char propstr[512];
+
+ GVariantBuilder builder;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
+@@ -1253,32 +1245,23 @@ ibus_panel_impanel_exec_menu (IBusPanelService *panel)
+ engine_desc = (IBusEngineDesc *)(node->data);
+ node = g_list_next (node);
+
+- need_free[i] = (char*)malloc(512 * sizeof(char));
+- need_free[i][0] = '\0';
+- ibus_engine_desc_to_propstr(engine_desc, need_free[i]);
+- g_variant_builder_add (&builder, "s", need_free[i]);
+- ++i;
++ ibus_engine_desc_to_propstr(engine_desc, propstr);
++ g_variant_builder_add (&builder, "s", propstr);
+ }
+
+- disable_propstr = (char*)malloc(512 * sizeof(char));
+- disable_propstr[0] = '\0';
+ ibus_engine_desc_args_to_propstr("None",
+ NULL,
+ "Disable",
+ "ibus",
+ "",
+- disable_propstr);
++ propstr);
+
+- g_variant_builder_add (&builder, "s", disable_propstr);
++ g_variant_builder_add (&builder, "s", propstr);
+
+ g_dbus_connection_emit_signal (IBUS_PANEL_IMPANEL (panel)->conn,
+ NULL, "/kimpanel", "org.kde.kimpanel.inputmethod", "ExecMenu",
+ g_variant_new ("(as)", &builder),
+ NULL);
+-
+- for (i = 0; i < 64; ++i) {
+- free(need_free[i]);
+- }
+ }
+
+ IBusPanelImpanel *
diff --git a/kde-base/kdeplasma-addons/kdeplasma-addons-4.8.0.ebuild b/kde-base/kdeplasma-addons/kdeplasma-addons-4.8.0.ebuild
index dcab277b2100..e5ee9f5b92f6 100644
--- a/kde-base/kdeplasma-addons/kdeplasma-addons-4.8.0.ebuild
+++ b/kde-base/kdeplasma-addons/kdeplasma-addons-4.8.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeplasma-addons/kdeplasma-addons-4.8.0.ebuild,v 1.1 2012/01/25 18:17:16 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeplasma-addons/kdeplasma-addons-4.8.0.ebuild,v 1.2 2012/02/13 18:13:53 johu Exp $
EAPI=4
@@ -39,6 +39,10 @@ DEPEND="${COMMON_DEPEND}
RDEPEND="${COMMON_DEPEND}
"
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.0-ibus141.patch"
+)
+
src_prepare() {
use semantic-desktop || epatch "${FILESDIR}/${PN}-4.6.2-optional-akonadi.patch"
kde4-base_src_prepare