diff options
author | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2010-01-17 17:09:48 +0100 |
---|---|---|
committer | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2010-01-17 18:57:40 +0100 |
commit | 2d3315393289290d009884649c2a76e41c3b7c87 (patch) | |
tree | 4203a150e213c99f6894d0180f5ed922e84aaee3 /recipes/scim | |
parent | 08008989b6fbd7e6227f5f5b8425bac77c87b025 (diff) |
scim: add a couple of patches from Ubuntu, Debian and Gentoo.
* all relevant patches have been pushed to and committed upstream
only relevant patch for the next release will be the generic, OE-only
"configure.patch"
Diffstat (limited to 'recipes/scim')
-rw-r--r-- | recipes/scim/files/20_scim_config.dpatch | 20 | ||||
-rw-r--r-- | recipes/scim/files/40_scim_user_home_overrides.dpatch | 35 | ||||
-rw-r--r-- | recipes/scim/files/50_validate-desktop-entry.dpatch | 29 | ||||
-rw-r--r-- | recipes/scim/files/51_scim-1.4.7-fix-capslock.dpatch | 53 | ||||
-rw-r--r-- | recipes/scim/files/52_scim-1.4.7-imdkit-read-property-properly.dpatch | 108 | ||||
-rw-r--r-- | recipes/scim/files/53_scim-1.4.7-trayicon.dpatch | 279 | ||||
-rw-r--r-- | recipes/scim/files/54_scim-1.4.7-xim-wrong-format.dpatch | 26 | ||||
-rw-r--r-- | recipes/scim/files/gcc-4.4-const-char.dpatch | 2 | ||||
-rw-r--r-- | recipes/scim/files/scim-1.4.7-syslibltdl.patch | 61 | ||||
-rw-r--r-- | recipes/scim/scim_1.4.9.bb | 12 |
10 files changed, 623 insertions, 2 deletions
diff --git a/recipes/scim/files/20_scim_config.dpatch b/recipes/scim/files/20_scim_config.dpatch new file mode 100644 index 0000000000..fa15b6ab26 --- /dev/null +++ b/recipes/scim/files/20_scim_config.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 20_scim_config.dpatch by <egon@localhost.localdomain> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: update the default config (see malone #37687) + +@DPATCH@ +diff -urNad scim-1.4.7~/configs/config scim-1.4.7/configs/config +--- scim-1.4.7~/configs/config 2007-06-26 22:31:56.000000000 +0800 ++++ scim-1.4.7/configs/config 2008-04-07 15:12:54.000000000 +0800 +@@ -10,7 +10,7 @@ + /Hotkeys/FrontEnd/NextFactory = Control+Alt+Down,Shift+Control+KeyRelease+Shift_L,Shift+Control+KeyRelease+Shift_R + /Hotkeys/FrontEnd/PreviousFactory = Control+Alt+Up,Shift+Control+KeyRelease+Control_L,Shift+Control+KeyRelease+Control_R + /Hotkeys/FrontEnd/ShowFactoryMenu = Control+Alt+Right +-/Hotkeys/FrontEnd/Trigger = Control+space ++/Hotkeys/FrontEnd/Trigger = Control+space,Zenkaku_Hankaku,Hangul + /Hotkeys/FrontEnd/ValidKeyMask = Shift+Control+Alt+Meta+QuirkKanaRo + /Panel/Gtk/Color/ActiveBackground = light sky blue + /Panel/Gtk/Color/ActiveText = black + diff --git a/recipes/scim/files/40_scim_user_home_overrides.dpatch b/recipes/scim/files/40_scim_user_home_overrides.dpatch new file mode 100644 index 0000000000..cbce674d45 --- /dev/null +++ b/recipes/scim/files/40_scim_user_home_overrides.dpatch @@ -0,0 +1,35 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 40_scim_user_home_overrides.dpatch by Colin Watson <cjwatson@ubuntu.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Allow home directory and user name detection to be overridden using +## DP: SCIM_HOME and SCIM_USER environment variables respectively. + +@DPATCH@ +diff -urNad scim-1.4.7~/src/scim_utility.cpp scim-1.4.7/src/scim_utility.cpp +--- scim-1.4.7~/src/scim_utility.cpp 2007-06-26 15:31:38.000000000 +0100 ++++ scim-1.4.7/src/scim_utility.cpp 2008-07-26 11:28:49.000000000 +0100 +@@ -547,6 +547,11 @@ + + struct passwd *pw; + ++ home_dir = getenv ("SCIM_HOME"); ++ if (home_dir && *home_dir) { ++ return String (home_dir); ++ } ++ + setpwent (); + pw = getpwuid (getuid ()); + endpwent (); +@@ -568,6 +573,11 @@ + struct passwd *pw; + const char *user_name; + ++ user_name = getenv ("SCIM_USER"); ++ if (user_name && *user_name) { ++ return String (user_name); ++ } ++ + setpwent (); + pw = getpwuid (getuid ()); + endpwent (); diff --git a/recipes/scim/files/50_validate-desktop-entry.dpatch b/recipes/scim/files/50_validate-desktop-entry.dpatch new file mode 100644 index 0000000000..46a19cb0f1 --- /dev/null +++ b/recipes/scim/files/50_validate-desktop-entry.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 50_validate-desktop-entry.dpatch by Ming Hua <minghua-guest@users.alioth.debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## +## DP: Update to conform Desktop Entry Specification version 1.0. The "Icon" +## DP: key uses a hardcoded path because scim-setup.desktop is generated +## DP: without any variable substitution. Maybe it can use a name without +## DP: path or extension instead, needs more investigation. + +@DPATCH@ +diff -urNad scim-1.4.7~/extras/setup/scim-setup.desktop.in scim-1.4.7/extras/setup/scim-setup.desktop.in +--- scim-1.4.7~/extras/setup/scim-setup.desktop.in 2007-06-26 09:31:50.000000000 -0500 ++++ scim-1.4.7/extras/setup/scim-setup.desktop.in 2008-01-28 09:33:48.000000000 -0600 +@@ -1,10 +1,9 @@ + [Desktop Entry] +-Encoding=UTF-8 + _Name=SCIM Input Method Setup + _Comment=Setup utility for Smart Common Input Method platform + Exec=scim-setup +-Icon=scim-setup.png ++Icon=scim-setup + Terminal=false + Type=Application + StartupNotify=true +-Categories=Applications;Settings; ++Categories=Settings; ++NotShowIn=KDE; ++X-Ubuntu-Gettext-Domain=scim diff --git a/recipes/scim/files/51_scim-1.4.7-fix-capslock.dpatch b/recipes/scim/files/51_scim-1.4.7-fix-capslock.dpatch new file mode 100644 index 0000000000..ba74f10d8f --- /dev/null +++ b/recipes/scim/files/51_scim-1.4.7-fix-capslock.dpatch @@ -0,0 +1,53 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 51_scim-1.4.7-fix-capslock.dpatch by Ikuya Awashiro <ikuya@fruitsbasket.info> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Ignore caps lock to enable switcing input methods with it on +## DP: https://bugzilla.redhat.com/show_bug.cgi?id=431222 + +@DPATCH@ +diff -urNad scim-1.4.9~/utils/scimkeyselection.cpp scim-1.4.9/utils/scimkeyselection.cpp +--- scim-1.4.9~/utils/scimkeyselection.cpp 2008-11-02 06:42:49.000000000 +0000 ++++ scim-1.4.9/utils/scimkeyselection.cpp 2009-07-20 11:47:28.000000000 +0000 +@@ -267,6 +267,11 @@ + gtk_widget_show (keyselection->toggle_hyper); + gtk_box_pack_start (GTK_BOX (hbox), keyselection->toggle_hyper, TRUE, TRUE, 2); + ++ ++ keyselection->toggle_capslock = gtk_check_button_new_with_mnemonic (_("Ca_psLock")); ++ gtk_widget_show (keyselection->toggle_capslock); ++ gtk_box_pack_start (GTK_BOX (hbox), keyselection->toggle_capslock, TRUE, TRUE, 2); ++ + hbox = gtk_hbox_new (TRUE, 0); + gtk_widget_show (hbox); + gtk_box_pack_start (GTK_BOX (keyselection), hbox, FALSE, FALSE, 4); +@@ -319,6 +324,8 @@ + key += String ("Super+"); + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (keyselection->toggle_hyper))) + key += String ("Hyper+"); ++ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (keyselection->toggle_capslock))) ++ key += String ("CapsLock+"); + + key_code = String (gtk_entry_get_text (GTK_ENTRY (keyselection->key_code))); + if (!key_code.length ()){ +@@ -572,6 +579,9 @@ + GTK_TOGGLE_BUTTON (keyselection->toggle_hyper), + event.is_hyper_down ()); + gtk_toggle_button_set_active ( ++ GTK_TOGGLE_BUTTON (keyselection->toggle_capslock), ++ event.is_caps_lock_down ()); ++ gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (keyselection->toggle_release), + event.is_key_release ()); + +diff -urNad scim-1.4.9~/utils/scimkeyselection.h scim-1.4.9/utils/scimkeyselection.h +--- scim-1.4.9~/utils/scimkeyselection.h 2008-11-02 06:42:49.000000000 +0000 ++++ scim-1.4.9/utils/scimkeyselection.h 2009-07-20 11:47:28.000000000 +0000 +@@ -36,6 +36,7 @@ + GtkWidget *toggle_meta; + GtkWidget *toggle_super; + GtkWidget *toggle_hyper; ++ GtkWidget *toggle_capslock; + GtkWidget *toggle_release; + GtkWidget *key_code; + diff --git a/recipes/scim/files/52_scim-1.4.7-imdkit-read-property-properly.dpatch b/recipes/scim/files/52_scim-1.4.7-imdkit-read-property-properly.dpatch new file mode 100644 index 0000000000..13540a34c5 --- /dev/null +++ b/recipes/scim/files/52_scim-1.4.7-imdkit-read-property-properly.dpatch @@ -0,0 +1,108 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 52_scim-1.4.7-imdkit-read-property-properly.dpatch by Ikuya Awashiro <ikuya@fruitsbasket.info> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Correctly read XIM_FORWARD_EVENT, triggered when rapidly typing keys +## DP: https://bugzilla.redhat.com/show_bug.cgi?id=466657 + +@DPATCH@ +diff -urNad scim-1.4.9~/modules/FrontEnd/IMdkit/Xi18n.h scim-1.4.9/modules/FrontEnd/IMdkit/Xi18n.h +--- scim-1.4.9~/modules/FrontEnd/IMdkit/Xi18n.h 2008-11-02 06:42:13.000000000 +0000 ++++ scim-1.4.9/modules/FrontEnd/IMdkit/Xi18n.h 2009-07-20 11:48:01.000000000 +0000 +@@ -149,6 +149,8 @@ + */ + int sync; + XIMPending *pending; ++ /* property offset to read next data */ ++ long property_offset; + void *trans_rec; /* contains transport specific data */ + struct _Xi18nClient *next; + } Xi18nClient; +diff -urNad scim-1.4.9~/modules/FrontEnd/IMdkit/i18nUtil.c scim-1.4.9/modules/FrontEnd/IMdkit/i18nUtil.c +--- scim-1.4.9~/modules/FrontEnd/IMdkit/i18nUtil.c 2008-11-02 06:42:13.000000000 +0000 ++++ scim-1.4.9/modules/FrontEnd/IMdkit/i18nUtil.c 2009-07-20 11:48:01.000000000 +0000 +@@ -70,6 +70,7 @@ + client->sync = False; + client->byte_order = '?'; /* initial value */ + memset (&client->pending, 0, sizeof (XIMPending *)); ++ client->property_offset = 0; + client->next = i18n_core->address.clients; + i18n_core->address.clients = client; + +diff -urNad scim-1.4.9~/modules/FrontEnd/IMdkit/i18nX.c scim-1.4.9/modules/FrontEnd/IMdkit/i18nX.c +--- scim-1.4.9~/modules/FrontEnd/IMdkit/i18nX.c 2008-11-02 06:42:12.000000000 +0000 ++++ scim-1.4.9/modules/FrontEnd/IMdkit/i18nX.c 2009-07-20 11:48:01.000000000 +0000 +@@ -29,6 +29,7 @@ + + ******************************************************************/ + ++#include <limits.h> + #include <X11/Xlib.h> + #include <X11/Xatom.h> + #include "FrameMgr.h" +@@ -128,6 +129,7 @@ + else if (ev->format == 32) { + /* ClientMessage and WindowProperty */ + unsigned long length = (unsigned long) ev->data.l[0]; ++ unsigned long get_length; + Atom atom = (Atom) ev->data.l[1]; + int return_code; + Atom actual_type_ret; +@@ -136,11 +138,20 @@ + unsigned char *prop; + unsigned long nitems; + ++ /* Round up length to next 4 byte value. */ ++ get_length = length + 3; ++ if (get_length > LONG_MAX) ++ get_length = LONG_MAX; ++ get_length /= 4; ++ if (get_length == 0) { ++ fprintf(stderr, "%s: invalid length 0\n", __FUNCTION__); ++ return NULL; ++ } + return_code = XGetWindowProperty (i18n_core->address.dpy, + x_client->accept_win, + atom, +- 0L, +- length, ++ client->property_offset / 4, ++ get_length, + True, + AnyPropertyType, + &actual_type_ret, +@@ -151,15 +162,27 @@ + if (return_code != Success || actual_format_ret == 0 || nitems == 0) { + if (return_code == Success) + XFree (prop); ++ client->property_offset = 0; + return (unsigned char *) NULL; + } +- if (length != nitems) +- length = nitems; +- if (actual_format_ret == 16) +- length *= 2; +- else if (actual_format_ret == 32) +- length *= 4; +- ++ /* Update the offset to read next time as needed */ ++ if (bytes_after_ret > 0) ++ client->property_offset += length; ++ else ++ client->property_offset = 0; ++ switch (actual_format_ret) { ++ case 8: ++ case 16: ++ case 32: ++ length = nitems * actual_format_ret / 8; ++ break; ++ default: ++ fprintf(stderr, "%s: unknown property return format: %d\n", ++ __FUNCTION__, actual_format_ret); ++ XFree(prop); ++ client->property_offset = 0; ++ return NULL; ++ } + /* if hit, it might be an error */ + if ((p = (unsigned char *) malloc (length)) == NULL) + return (unsigned char *) NULL; diff --git a/recipes/scim/files/53_scim-1.4.7-trayicon.dpatch b/recipes/scim/files/53_scim-1.4.7-trayicon.dpatch new file mode 100644 index 0000000000..666d39ef86 --- /dev/null +++ b/recipes/scim/files/53_scim-1.4.7-trayicon.dpatch @@ -0,0 +1,279 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 53_scim-1.4.7-trayicon.dpatch by Ikuya Awashiro <ikuya@fruitsbasket.info> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Use better tray icon +## DP: https://bugzilla.redhat.com/show_bug.cgi?id=447848 + +@DPATCH@ +diff -urNad scim-1.4.9~/extras/panel/scim_panel_gtk.cpp scim-1.4.9/extras/panel/scim_panel_gtk.cpp +--- scim-1.4.9~/extras/panel/scim_panel_gtk.cpp 2008-11-02 06:43:13.000000000 +0000 ++++ scim-1.4.9/extras/panel/scim_panel_gtk.cpp 2009-07-20 11:54:40.000000000 +0000 +@@ -60,7 +60,7 @@ + #include "scimstringview.h" + + #if ENABLE_TRAY_ICON +- #include "scimtrayicon.h" ++// #include "scimtrayicon.h" + #endif + + using namespace scim; +@@ -276,6 +276,13 @@ + #if ENABLE_TRAY_ICON + static void ui_tray_icon_destroy_cb (GtkObject *object, + gpointer user_data); ++static void ui_tray_icon_popup_menu_cb (GtkStatusIcon *status_icon, ++ guint button, ++ guint activate_time, ++ gpointer user_data); ++ ++static void ui_tray_icon_activate_cb (GtkStatusIcon *status_icon, ++ gpointer user_data); + #endif + + // Client Property Callback +@@ -399,9 +406,9 @@ + static PangoFontDescription *_default_font_desc = 0; + + #if ENABLE_TRAY_ICON +-static ScimTrayIcon *_tray_icon = 0; +-static GtkWidget *_tray_icon_factory_button = 0; +-static gulong _tray_icon_destroy_signal_id = 0; ++static GtkStatusIcon *_tray_icon = 0; ++// static GtkWidget *_tray_icon_factory_button = 0; ++// static gulong _tray_icon_destroy_signal_id = 0; + #endif + + static gboolean _input_window_draging = FALSE; +@@ -647,9 +654,9 @@ + + #if ENABLE_TRAY_ICON + if (_tray_icon) { +- g_signal_handler_disconnect (G_OBJECT (_tray_icon), +- _tray_icon_destroy_signal_id); +- gtk_widget_destroy (GTK_WIDGET (_tray_icon)); ++ // g_signal_handler_disconnect (G_OBJECT (_tray_icon), ++ // _tray_icon_destroy_signal_id); ++ g_object_unref (_tray_icon); + } + _tray_icon = 0; + #endif +@@ -1312,9 +1319,9 @@ + } + + #if ENABLE_TRAY_ICON +- if (_tray_icon) { +- gtk_window_set_screen (GTK_WINDOW (_tray_icon), screen); +- } ++ // if (_tray_icon) { ++ // gtk_window_set_screen (GTK_WINDOW (_tray_icon), screen); ++ // } + #endif + + if (_help_dialog) { +@@ -1337,65 +1344,75 @@ + #endif + + #if ENABLE_TRAY_ICON +-static gboolean +-ui_tray_icon_expose_event_cb (GtkWidget *widget, GdkEventExpose *event) +-{ +- gdk_window_clear_area (widget->window, event->area.x, event->area.y, +- event->area.width, event->area.height); +- return FALSE; +-} +- +-static void +-ui_tray_icon_style_set_cb (GtkWidget *widget, GtkStyle *previous_style) +-{ +- gdk_window_set_back_pixmap (widget->window, NULL, TRUE); +-} +- +-static void +-ui_tray_icon_realize_cb (GtkWidget *widget) +-{ +- if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget)) +- return; +- +- gtk_widget_set_app_paintable (widget, TRUE); +- gtk_widget_set_double_buffered (widget, FALSE); +- gdk_window_set_back_pixmap (widget->window, NULL, TRUE); +- g_signal_connect (widget, "expose_event", +- G_CALLBACK (ui_tray_icon_expose_event_cb), NULL); +- g_signal_connect_after (widget, "style_set", +- G_CALLBACK (ui_tray_icon_style_set_cb), NULL); +-} ++// static gboolean ++// ui_tray_icon_expose_event_cb (GtkWidget *widget, GdkEventExpose *event) ++// { ++// gdk_window_clear_area (widget->window, event->area.x, event->area.y, ++// event->area.width, event->area.height); ++// return FALSE; ++// } ++// ++// static void ++// ui_tray_icon_style_set_cb (GtkWidget *widget, GtkStyle *previous_style) ++// { ++// gdk_window_set_back_pixmap (widget->window, NULL, TRUE); ++// } ++// ++// static void ++// ui_tray_icon_realize_cb (GtkWidget *widget) ++// { ++// if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget)) ++// return; ++// ++// gtk_widget_set_app_paintable (widget, TRUE); ++// gtk_widget_set_double_buffered (widget, FALSE); ++// gdk_window_set_back_pixmap (widget->window, NULL, TRUE); ++// g_signal_connect (widget, "expose_event", ++// G_CALLBACK (ui_tray_icon_expose_event_cb), NULL); ++// g_signal_connect_after (widget, "style_set", ++// G_CALLBACK (ui_tray_icon_style_set_cb), NULL); ++// } + + static gboolean + ui_create_tray_icon_when_idle (gpointer data) + { + GtkWidget *image; + +- _tray_icon = scim_tray_icon_new ("SCIM Tray Icon"); +- g_signal_connect (G_OBJECT (_tray_icon), "realize", +- G_CALLBACK (ui_tray_icon_realize_cb), NULL); ++ _tray_icon = gtk_status_icon_new_from_file (SCIM_KEYBOARD_ICON_FILE); ++ // g_signal_connect (G_OBJECT (_tray_icon), "realize", ++ // G_CALLBACK (ui_tray_icon_realize_cb), NULL); + +- _tray_icon_destroy_signal_id = +- g_signal_connect (G_OBJECT (_tray_icon), "destroy", +- G_CALLBACK (ui_tray_icon_destroy_cb), +- 0); ++ // _tray_icon_destroy_signal_id = ++ // g_signal_connect (G_OBJECT (_tray_icon), "destroy", ++ // G_CALLBACK (ui_tray_icon_destroy_cb), ++ // 0); + +- image = ui_create_icon (SCIM_KEYBOARD_ICON_FILE, +- NULL, +- TRAY_ICON_SIZE, +- TRAY_ICON_SIZE, +- true); ++ // image = ui_create_icon (SCIM_KEYBOARD_ICON_FILE, ++ // NULL, ++ // TRAY_ICON_SIZE, ++ // TRAY_ICON_SIZE, ++ // true); + +- _tray_icon_factory_button = gtk_event_box_new (); +- g_signal_connect (G_OBJECT (_tray_icon_factory_button), "realize", +- G_CALLBACK (ui_tray_icon_realize_cb), NULL); +- gtk_container_add (GTK_CONTAINER (_tray_icon_factory_button), image); +- gtk_container_add (GTK_CONTAINER (_tray_icon), _tray_icon_factory_button); +- g_signal_connect (G_OBJECT (_tray_icon_factory_button), "button-release-event", +- G_CALLBACK (ui_factory_button_click_cb), ++ // _tray_icon_factory_button = gtk_event_box_new (); ++ // g_signal_connect (G_OBJECT (_tray_icon_factory_button), "realize", ++ // G_CALLBACK (ui_tray_icon_realize_cb), NULL); ++ // gtk_container_add (GTK_CONTAINER (_tray_icon_factory_button), image); ++ // gtk_container_add (GTK_CONTAINER (_tray_icon), _tray_icon_factory_button); ++ ++ ++ // g_signal_connect (G_OBJECT (_tray_icon_factory_button), "button-release-event", ++ // G_CALLBACK (ui_factory_button_click_cb), ++ // 0); ++ ++ g_signal_connect (G_OBJECT (_tray_icon), "popup-menu", ++ G_CALLBACK (ui_tray_icon_popup_menu_cb), ++ 0); ++ ++ g_signal_connect (G_OBJECT (_tray_icon), "activate", ++ G_CALLBACK (ui_tray_icon_activate_cb), + 0); + +- gtk_widget_show_all (GTK_WIDGET (_tray_icon)); ++ gtk_status_icon_set_visible (_tray_icon, TRUE); + + return FALSE; + } +@@ -1686,6 +1703,19 @@ + } + + static void ++ui_tray_icon_popup_menu_cb (GtkStatusIcon *status_icon, guint button, ++ guint activate_time, gpointer user_data) ++{ ++ action_show_command_menu (); ++} ++ ++static void ++ui_tray_icon_activate_cb (GtkStatusIcon *status_icon, gpointer user_data) ++{ ++ _panel_agent->request_factory_menu (); ++} ++ ++static void + ui_factory_menu_activate_cb (GtkMenuItem *item, + gpointer user_data) + { +@@ -2243,19 +2273,19 @@ + } + + #if ENABLE_TRAY_ICON +-static void +-ui_tray_icon_destroy_cb (GtkObject *object, +- gpointer user_data) +-{ +- SCIM_DEBUG_MAIN (1) << "Tray Icon destroyed!\n"; +- +- gtk_widget_destroy (GTK_WIDGET (object)); +- +- _tray_icon = 0; +- _tray_icon_factory_button = 0; +- +- g_idle_add (ui_create_tray_icon_when_idle, NULL); +-} ++// static void ++// ui_tray_icon_destroy_cb (GtkObject *object, ++// gpointer user_data) ++// { ++// SCIM_DEBUG_MAIN (1) << "Tray Icon destroyed!\n"; ++// ++// gtk_widget_destroy (GTK_WIDGET (object)); ++// ++// _tray_icon = 0; ++// _tray_icon_factory_button = 0; ++// ++// g_idle_add (ui_create_tray_icon_when_idle, NULL); ++// } + #endif + + static void +@@ -2685,18 +2715,21 @@ + } + + #if ENABLE_TRAY_ICON +- if (_tray_icon_factory_button) { +- GtkWidget *icon = gtk_bin_get_child (GTK_BIN (_tray_icon_factory_button)); ++ // if (_tray_icon_factory_button) { ++ // GtkWidget *icon = gtk_bin_get_child (GTK_BIN (_tray_icon_factory_button)); + +- if (icon) +- gtk_container_remove (GTK_CONTAINER (_tray_icon_factory_button), icon); ++ // if (icon) ++ // gtk_container_remove (GTK_CONTAINER (_tray_icon_factory_button), icon); + +- icon = ui_create_icon (info.icon, NULL, TRAY_ICON_SIZE, TRAY_ICON_SIZE, true); ++ // icon = ui_create_icon (info.icon, NULL, TRAY_ICON_SIZE, TRAY_ICON_SIZE, true); + +- gtk_container_add (GTK_CONTAINER (_tray_icon_factory_button), icon); ++ // gtk_container_add (GTK_CONTAINER (_tray_icon_factory_button), icon); + +- if (_tooltips) +- gtk_tooltips_set_tip (_tooltips, _tray_icon_factory_button, info.name.c_str (), NULL); ++ // if (_tooltips) ++ // gtk_tooltips_set_tip (_tooltips, _tray_icon_factory_button, info.name.c_str (), NULL); ++ // } ++ if (_tray_icon) { ++ gtk_status_icon_set_from_file (_tray_icon, info.icon.c_str()); + } + #endif diff --git a/recipes/scim/files/54_scim-1.4.7-xim-wrong-format.dpatch b/recipes/scim/files/54_scim-1.4.7-xim-wrong-format.dpatch new file mode 100644 index 0000000000..7fc7db3ae9 --- /dev/null +++ b/recipes/scim/files/54_scim-1.4.7-xim-wrong-format.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 54_scim-1.4.7-xim-wrong-format.dpatch by Ikuya Awashiro <ikuya@fruitsbasket.info> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix incorrect XIM_QUERY_EXTENSION_REPLY message +## DP: https://bugzilla.redhat.com/show_bug.cgi?id=457566 + +@DPATCH@ +diff -urNad scim-1.4.9~/modules/FrontEnd/IMdkit/i18nIMProto.c scim-1.4.9/modules/FrontEnd/IMdkit/i18nIMProto.c +--- scim-1.4.9~/modules/FrontEnd/IMdkit/i18nIMProto.c 2008-11-02 06:42:13.000000000 +0000 ++++ scim-1.4.9/modules/FrontEnd/IMdkit/i18nIMProto.c 2009-07-20 11:55:05.000000000 +0000 +@@ -106,11 +106,11 @@ + + static XimFrameRec ext_fr[] = + { +- _FRAME(BIT16), /* extension major-opcode */ +- _FRAME(BIT16), /* extension minor-opcode */ ++ _FRAME(BIT8), /* extension major-opcode */ ++ _FRAME(BIT8), /* extension minor-opcode */ + _FRAME(BIT16), /* length of extension name */ + _FRAME(BARRAY), /* extension name */ +- _PAD4(2), ++ _PAD4(1), + _FRAME(EOL), + }; + diff --git a/recipes/scim/files/gcc-4.4-const-char.dpatch b/recipes/scim/files/gcc-4.4-const-char.dpatch index b53a7b4d9c..9ebe3e418a 100644 --- a/recipes/scim/files/gcc-4.4-const-char.dpatch +++ b/recipes/scim/files/gcc-4.4-const-char.dpatch @@ -1,4 +1,4 @@ -upstream: Laibsch will push upstream soon +upstream: http://scim.svn.sourceforge.net/viewvc/scim?view=rev&revision=259 origin: the original patch was prepared by Jari Aalto <jari.aalto@cante.net> for the Debian distribution http://bugs.debian.org/560486 diff --git a/recipes/scim/files/scim-1.4.7-syslibltdl.patch b/recipes/scim/files/scim-1.4.7-syslibltdl.patch new file mode 100644 index 0000000000..ddd86ad5e9 --- /dev/null +++ b/recipes/scim/files/scim-1.4.7-syslibltdl.patch @@ -0,0 +1,61 @@ +Index: scim-1.4.7/src/Makefile.am +=================================================================== +--- scim-1.4.7.orig/src/Makefile.am ++++ scim-1.4.7/src/Makefile.am +@@ -33,7 +33,7 @@ INCLUDES = -I$(top_builddir) \ + -DSCIM_MODULE_PATH=\"@SCIM_MODULE_PATH@\" + + +-noinst_HEADERS = ltdl.h \ ++noinst_HEADERS = \ + scim_private.h \ + scim_compose_key_data.h \ + scim_keyboard_layout_data.h \ +@@ -84,11 +84,6 @@ libsciminclude_HEADERS = scim.h \ + scim_utility.h + + +-noinst_LTLIBRARIES = libltdlc.la +- +-libltdlc_la_SOURCES = ltdl.cpp +-libltdlc_la_LIBADD = $(LIBADD_DL) +- + if SCIM_LD_VERSION_SCRIPT + LD_VERSION_SCRIPT_OPTION="-Wl,--version-script=$(srcdir)/libscim.version-script" + endif +@@ -137,7 +132,7 @@ libscim@SCIM_EPOCH@_la_LDFLAGS= -version + @LTLIBINTL@ \ + -lstdc++ + +-libscim@SCIM_EPOCH@_la_LIBADD = libltdlc.la ++libscim@SCIM_EPOCH@_la_LIBADD = -lltdl + + + bin_PROGRAMS = scim scim-config-agent +Index: scim-1.4.7/src/scim_module.cpp +=================================================================== +--- scim-1.4.7.orig/src/scim_module.cpp ++++ scim-1.4.7/src/scim_module.cpp +@@ -27,7 +27,9 @@ + #define Uses_STL_ALGORITHM + #include "scim_private.h" + #include "scim.h" +-#include "ltdl.h" ++extern "C" { ++ #include <ltdl.h> ++} + #include <dirent.h> + #include <sys/types.h> + #include <sys/stat.h> +Index: scim-1.4.7/configure.ac +=================================================================== +--- scim-1.4.7.orig/configure.ac ++++ scim-1.4.7/configure.ac +@@ -71,7 +71,6 @@ AM_GNU_GETTEXT + # Init libtool + AC_LIBTOOL_DLOPEN + AC_PROG_LIBTOOL +-AC_LIB_LTDL + AC_SUBST(LIBTOOL_DEPS) + + # libtool option to control which symbols are exported diff --git a/recipes/scim/scim_1.4.9.bb b/recipes/scim/scim_1.4.9.bb index 61802f1173..521c756dd9 100644 --- a/recipes/scim/scim_1.4.9.bb +++ b/recipes/scim/scim_1.4.9.bb @@ -3,10 +3,20 @@ HOMEPAGE = "http://www.scim-im.org" SECTION = "libs/inputmethod" LICENSE = "LGPL" DEPENDS = "gtk+" +PR = "r1" SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}.tar.gz \ file://gcc-4.4-const-char.dpatch;patch=1 \ - file://configure.patch;patch=1" + file://configure.patch;patch=1 \ + file://20_scim_config.dpatch;patch=1 \ + file://40_scim_user_home_overrides.dpatch;patch=1 \ + file://50_validate-desktop-entry.dpatch;patch=1 \ + file://51_scim-1.4.7-fix-capslock.dpatch;patch=1 \ + file://52_scim-1.4.7-imdkit-read-property-properly.dpatch;patch=1 \ + file://53_scim-1.4.7-trayicon.dpatch;patch=1 \ + file://54_scim-1.4.7-xim-wrong-format.dpatch;patch=1 \ + file://scim-1.4.7-syslibltdl.patch;patch=1 \ + " inherit autotools pkgconfig |