packages: scim-bridge/scim-bridge-EOF.patch (NEW), scim-bridge/scim-bridge-...
baggins
baggins at pld-linux.org
Sun Jul 24 23:17:09 CEST 2011
Author: baggins Date: Sun Jul 24 21:17:09 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- initial revision
---- Files affected:
packages/scim-bridge:
scim-bridge-EOF.patch (NONE -> 1.1) (NEW), scim-bridge-ac.patch (NONE -> 1.1) (NEW), scim-bridge-bz461373.patch (NONE -> 1.1) (NEW), scim-bridge-fix-gdm.patch (NONE -> 1.1) (NEW), scim-bridge-fix-gtk-key-snooper.patch (NONE -> 1.1) (NEW), scim-bridge-fixes-null-imengine.patch (NONE -> 1.1) (NEW), scim-bridge-hotkey-help.patch (NONE -> 1.1) (NEW), scim-bridge.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/scim-bridge/scim-bridge-EOF.patch
diff -u /dev/null packages/scim-bridge/scim-bridge-EOF.patch:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge-EOF.patch Sun Jul 24 23:17:03 2011
@@ -0,0 +1,12 @@
+diff -ru scim-bridge-0.4.15.orig/agent/scim-bridge-agent-application.cpp scim-bridge-0.4.15/agent/scim-bridge-agent-application.cpp
+--- scim-bridge-0.4.15.orig/agent/scim-bridge-agent-application.cpp 2009-03-03 14:19:54.000000000 +0000
++++ scim-bridge-0.4.15/agent/scim-bridge-agent-application.cpp 2009-03-03 14:20:27.000000000 +0000
+@@ -65,7 +65,7 @@
+ unsigned int tmp_uint;
+
+ int option = 0;
+- while (option != EOF) {
++ while (option != -1) {
+ option = getopt_long (argc, argv, short_options, long_options, NULL);
+ switch (option) {
+ case 'v':
================================================================
Index: packages/scim-bridge/scim-bridge-ac.patch
diff -u /dev/null packages/scim-bridge/scim-bridge-ac.patch:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge-ac.patch Sun Jul 24 23:17:03 2011
@@ -0,0 +1,78 @@
+--- scim-bridge-0.4.16/configure.ac.orig 2009-04-18 15:50:18.000000000 +0200
++++ scim-bridge-0.4.16/configure.ac 2011-07-24 22:57:13.848200038 +0200
+@@ -61,6 +61,7 @@
+ [SCIM_BRIDGE_HAS_GTK2=no])
+
+ SCIM_BRIDGE_HAS_GTK2_2=no
++if test "$enable_gtk2_immodule" != "no"; then
+ if test "$SCIM_BRIDGE_HAS_GTK2" = "yes"; then
+ if $PKG_CONFIG --exists "gtk+-2.0 >= 2.2" ; then
+ SCIM_BRIDGE_HAS_GTK2_2=yes
+@@ -82,12 +83,14 @@
+ AC_SUBST(GTK_BINARY_VERSION)
+ enable_gtk2_immodule="yes";
+ fi
++fi
+
+ # Check if we should build scim-bridge-qt-immodule
+ PKG_CHECK_MODULES(QT3, [qt-mt >= 3.3],
+ [SCIM_BRIDGE_HAS_QT3=yes],
+ [SCIM_BRIDGE_HAS_QT3=no])
+
++if test "$enable_qt3_immodule" != "no"; then
+ if test "$SCIM_BRIDGE_HAS_QT3" = "yes"; then
+ if test -z "$QT3_PREFIX"; then
+ QT3_PREFIX=`$PKG_CONFIG --variable=prefix qt-mt`
+@@ -95,11 +98,13 @@
+ AC_SUBST(QT3_PREFIX)
+ enable_qt3_immodule="yes";
+ fi
++fi
+
+ PKG_CHECK_MODULES(QT4, [QtGui >= 4.0, QtCore >= 4.0],
+ [SCIM_BRIDGE_HAS_QT4=yes],
+ [SCIM_BRIDGE_HAS_QT4=no])
+
++if test "$enable_qt4_immodule" != "no"; then
+ if test "$SCIM_BRIDGE_HAS_QT4" = "yes"; then
+ if test -z "$QT4_PREFIX"; then
+ QT4_PREFIX=`$PKG_CONFIG --variable=prefix QtCore`
+@@ -107,6 +112,7 @@
+ AC_SUBST(QT4_PREFIX)
+ enable_qt4_immodule="yes";
+ fi
++fi
+
+ ###########################################################
+ ## Definiation of compile args. ##
+@@ -128,13 +128,16 @@
+ enable_agent=yes)
+
+ AC_ARG_ENABLE(gtk2-immodule,
+- [AS_HELP_STRING([--enable-gtk2-immodule], [build GTK2 IM module])], , )
++ [AS_HELP_STRING([--enable-gtk2-immodule], [build GTK2 IM module])],
++ enable_gtk2_immodule="$enableval", )
+
+ AC_ARG_ENABLE(qt3-immodule,
+- [AS_HELP_STRING([--enable-qt3-immodule], [build Qt3 IM module])], , )
++ [AS_HELP_STRING([--enable-qt3-immodule], [build Qt3 IM module])],
++ enable_qt3_immodule="$enableval", )
+
+ AC_ARG_ENABLE(qt4-immodule,
+- [AS_HELP_STRING([--enable-qt4-immodule], [build Qt4 IM module])], , )
++ [AS_HELP_STRING([--enable-qt4-immodule], [build Qt4 IM module])],
++ enable_qt4_immodule="$enableval", )
+
+ if test "$enable_debug" = "yes"; then
+ AC_DEFINE(ENABLE_DEBUG,1,[Define this to enable the debug facility in libscim])
+--- scim-bridge-0.4.16/client-gtk/Makefile.am~ 2009-01-17 17:46:31.000000000 +0100
++++ scim-bridge-0.4.16/client-gtk/Makefile.am 2011-07-24 23:09:58.900272006 +0200
+@@ -24,7 +24,7 @@
+
+ noinst_HEADERS = scim-bridge-client-gtk.h scim-bridge-client-imcontext-gtk.h scim-bridge-client-key-event-utility-gtk.h
+
+-moduledir = @GTK_LIBDIR@/gtk-2.0/immodules
++moduledir = @GTK_LIBDIR@/gtk-2.0/@GTK_BINARY_VERSION@/immodules
+
+ module_LTLIBRARIES = im-scim-bridge.la
+
================================================================
Index: packages/scim-bridge/scim-bridge-bz461373.patch
diff -u /dev/null packages/scim-bridge/scim-bridge-bz461373.patch:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge-bz461373.patch Sun Jul 24 23:17:03 2011
@@ -0,0 +1,30 @@
+diff -up scim-bridge-0.4.15/client-qt/qt4/scim-bridge-client-imcontext-qt.cpp.bz461373 scim-bridge-0.4.15/client-qt/qt4/scim-bridge-client-imcontext-qt.cpp
+--- scim-bridge-0.4.15/client-qt/scim-bridge-client-imcontext-qt.cpp.bz461373 2008-09-16 09:54:29.000000000 +0800
++++ scim-bridge-0.4.15/client-qt/scim-bridge-client-imcontext-qt.cpp 2008-09-16 09:58:47.000000000 +0800
+@@ -220,7 +220,12 @@ void ScimBridgeClientIMContextImpl::setF
+ {
+ scim_bridge_pdebugln (4, "ScimBridgeClientIMContextImpl::setFocusWidget ()");
+ QInputContext::setFocusWidget (widget);
+- focus_in ();
++ if (widget == NULL) {
++ focus_out ();
++ }
++ else {
++ focus_in ();
++ }
+ update ();
+ }
+
+@@ -442,8 +447,10 @@ void ScimBridgeClientIMContextImpl::focu
+ }
+ }
+
+- set_preedit_shown (false);
+- update_preedit ();
++ if (preedit_shown) {
++ set_preedit_shown (false);
++ update_preedit ();
++ }
+
+ focused_imcontext = NULL;
+ }
================================================================
Index: packages/scim-bridge/scim-bridge-fix-gdm.patch
diff -u /dev/null packages/scim-bridge/scim-bridge-fix-gdm.patch:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge-fix-gdm.patch Sun Jul 24 23:17:03 2011
@@ -0,0 +1,39 @@
+diff -up scim-bridge-0.4.15/client-gtk/scim-bridge-client-imcontext-gtk.c.fix-gdm scim-bridge-0.4.15/client-gtk/scim-bridge-client-imcontext-gtk.c
+--- scim-bridge-0.4.15/client-gtk/scim-bridge-client-imcontext-gtk.c.fix-gdm 2007-06-23 20:58:40.000000000 +0800
++++ scim-bridge-0.4.15/client-gtk/scim-bridge-client-imcontext-gtk.c 2008-03-04 13:00:49.000000000 +0800
+@@ -37,6 +37,8 @@
+ #include "scim-bridge-output.h"
+ #include "scim-bridge-string.h"
+
++#define SEND_EVENT_MASK 0x02
++
+ /* Typedef */
+ struct _ScimBridgeClientIMContext
+ {
+@@ -202,7 +204,7 @@ static gboolean key_snooper (GtkWidget *
+ {
+ scim_bridge_pdebugln (7, "key_snooper ()");
+
+- if (!event->send_event && scim_bridge_client_is_messenger_opened () && focused_imcontext != NULL) {
++ if (!(event->send_event & SEND_EVENT_MASK) && scim_bridge_client_is_messenger_opened () && focused_imcontext != NULL) {
+ if (focused_imcontext->client_window != NULL) {
+ int new_window_x;
+ int new_window_y;
+@@ -558,7 +560,7 @@ void scim_bridge_client_imcontext_forwar
+ {
+ GdkEventKey gdk_event;
+ scim_bridge_key_event_bridge_to_gdk (&gdk_event, imcontext->client_window, key_event);
+- gdk_event.send_event = TRUE;
++ gdk_event.send_event |= SEND_EVENT_MASK;
+ if (imcontext == focused_imcontext && focused_widget != NULL) {
+ const char *signal_name = NULL;
+ if (scim_bridge_key_event_is_pressed (key_event)) {
+@@ -764,7 +766,7 @@ gboolean scim_bridge_client_imcontext_fi
+
+ ScimBridgeClientIMContext *imcontext = SCIM_BRIDGE_CLIENT_IMCONTEXT (context);
+
+- if (!event->send_event && scim_bridge_client_is_messenger_opened () && imcontext != NULL && !key_snooper_used) {
++ if (!(event->send_event & SEND_EVENT_MASK) && scim_bridge_client_is_messenger_opened () && imcontext != NULL && !key_snooper_used) {
+
+ if (imcontext->client_window != NULL) {
+ int new_window_x;
================================================================
Index: packages/scim-bridge/scim-bridge-fix-gtk-key-snooper.patch
diff -u /dev/null packages/scim-bridge/scim-bridge-fix-gtk-key-snooper.patch:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge-fix-gtk-key-snooper.patch Sun Jul 24 23:17:03 2011
@@ -0,0 +1,11 @@
+--- client-gtk/scim-bridge-client-imcontext-gtk.c.bak 2010-01-22 14:00:00.000000000 +0800
++++ client-gtk/scim-bridge-client-imcontext-gtk.c 2010-01-22 14:44:03.000000000 +0800
+@@ -877,7 +877,7 @@
+ scim_bridge_client_open_messenger ();
+ }
+
+- if (is_key_snooper_enabled ()) {
++ if (!key_snooper_used && is_key_snooper_enabled ()) {
+ key_snooper_id = gtk_key_snooper_install ((GtkKeySnoopFunc) &key_snooper, NULL);
+ key_snooper_used = TRUE;
+ }
================================================================
Index: packages/scim-bridge/scim-bridge-fixes-null-imengine.patch
diff -u /dev/null packages/scim-bridge/scim-bridge-fixes-null-imengine.patch:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge-fixes-null-imengine.patch Sun Jul 24 23:17:03 2011
@@ -0,0 +1,13 @@
+Index: scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.cpp
+===================================================================
+--- scim-bridge-0.4.16.orig/agent/scim-bridge-agent-imcontext.cpp
++++ scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.cpp
+@@ -662,6 +662,8 @@ void ScimBridgeAgentIMContextImpl::focus
+
+ void ScimBridgeAgentIMContextImpl::focus_out ()
+ {
++ if (!imengine_shared && imengine == NULL) alloc_imengine ();
++
+ ScimBridgeAgentIMContext *focused_imcontext = static_cast<ScimBridgeAgentIMContext*> (get_imengine ()->get_frontend_data ());
+
+ if ( !focused )
================================================================
Index: packages/scim-bridge/scim-bridge-hotkey-help.patch
diff -u /dev/null packages/scim-bridge/scim-bridge-hotkey-help.patch:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge-hotkey-help.patch Sun Jul 24 23:17:03 2011
@@ -0,0 +1,96 @@
+diff -up scim-bridge-0.4.16/agent/scim-bridge-agent.cpp.1-hotkey-help scim-bridge-0.4.16/agent/scim-bridge-agent.cpp
+--- scim-bridge-0.4.16/agent/scim-bridge-agent.cpp.1-hotkey-help 2009-03-08 23:07:29.000000000 +1000
++++ scim-bridge-0.4.16/agent/scim-bridge-agent.cpp 2009-05-02 09:49:03.000000000 +1000
+@@ -542,6 +542,27 @@ void ScimBridgeAgentImpl::slot_reload_co
+ scim_global_config_flush ();
+
+ scim_keyboard_layout = scim_get_default_keyboard_layout ();
++
++ // Hot key name, hot key config key.
++ // ! Update hotkey_list_length according to updated list length.
++ int hotkey_list_length = 6;
++ String hotkey_list[][2] = {
++ { "Toggle on/off - ", "/Hotkeys/FrontEnd/Trigger" },
++ { "Turn on - ", "/Hotkeys/FrontEnd/On" },
++ { "Turn off - ", "/Hotkeys/FrontEnd/Off" },
++ { "Next input method - ", "/Hotkeys/FrontEnd/NextFactory" },
++ { "Previous input method - ", "/Hotkeys/FrontEnd/PreviousFactory" },
++ { "Show input method menu - ", "/Hotkeys/FrontEnd/ShowFactoryMenu" }
++ };
++
++ // Undefined hot keys are hidden from help window.
++ String help_hotkeys = "\nGlobal Hotkeys:";
++ for ( int i = 0; i < hotkey_list_length; i++ ) {
++ String tmp_hotkeys = scim_config->read (String (hotkey_list[i][1]), String (""));
++ if ( tmp_hotkeys != "" )
++ help_hotkeys += "\n" + hotkey_list[i][0] + "<" + tmp_hotkeys + ">";
++ }
++ ScimBridgeAgentIMContext::set_help_hotkeys (help_hotkeys);
+ }
+
+
+diff -up scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.cpp.1-hotkey-help scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.cpp
+--- scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.cpp.1-hotkey-help 2009-02-04 00:36:14.000000000 +1000
++++ scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.cpp 2009-05-02 09:51:26.000000000 +1000
+@@ -60,6 +60,8 @@ static unsigned int imengine_id = 0;
+
+ static bool on_the_spot_enabled = true;
+
++static String help_hotkeys = "";
++
+ /* Class definition */
+ class ScimBridgeAgentIMContextImpl: public ScimBridgeAgentIMContext
+ {
+@@ -274,6 +276,12 @@ void ScimBridgeAgentIMContext::set_on_th
+ }
+
+
++void ScimBridgeAgentIMContext::set_help_hotkeys (const String &hotkey_str)
++{
++ help_hotkeys = hotkey_str;
++}
++
++
+ ScimBridgeAgentIMContextImpl::ScimBridgeAgentIMContextImpl (ScimBridgeAgentClientListener *new_client_listener):
+ client_listener (new_client_listener), imengine (NULL), enabled (false), focused(false) ,preedit_mode (PREEDIT_ANY),
+ preedit_shown (false), preedit_cursor_position (0)
+@@ -923,9 +931,11 @@ void ScimBridgeAgentIMContextImpl::panel
+
+ void ScimBridgeAgentIMContextImpl::panel_request_help ()
+ {
+- String help = String ("Smart Common Input Method platform ") +
+- String (SCIM_VERSION) +
+- String ("\n(C) 2002-2005 James Su <suzhe at tsinghua.org.cn>\n\n");
++ String help = String ("SCIM Bridge") +
++ String (VERSION) +
++ String ("\n(C) 2006-2008 Ryo Dairiki <ryo-dairiki at users.sourceforge.net>\n") +
++ help_hotkeys +
++ String ("\n\n");
+
+ IMEngineFactoryPointer factory = scim_backend->get_factory (get_imengine ()->get_factory_uuid ());
+ if (factory.null ()) factory = fallback_imengine_factory;
+diff -up scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.h.1-hotkey-help scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.h
+--- scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.h.1-hotkey-help 2008-11-02 16:44:49.000000000 +1000
++++ scim-bridge-0.4.16/agent/scim-bridge-agent-imcontext.h 2009-05-02 09:49:03.000000000 +1000
+@@ -130,6 +130,21 @@ class ScimBridgeAgentIMContext
+ static void set_enabled_by_default (bool enabled);
+
+ /**
++ * Get the hotkey help messages.
++ *
++ * @return help messages about hotkeys.
++ */
++ static scim::String get_help_hotkeys ();
++
++ /**
++ * Set the hotkey help messages.
++ *
++ * @param hotkey_str Help message about hotkeys.
++ *
++ */
++ static void set_help_hotkeys (const scim::String &hotkey_str);
++
++ /**
+ * Destructor.
+ */
+ virtual ~ScimBridgeAgentIMContext () {}
================================================================
Index: packages/scim-bridge/scim-bridge.spec
diff -u /dev/null packages/scim-bridge/scim-bridge.spec:1.1
--- /dev/null Sun Jul 24 23:17:09 2011
+++ packages/scim-bridge/scim-bridge.spec Sun Jul 24 23:17:03 2011
@@ -0,0 +1,144 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_with qt3 # don't build qt3 input module
+%bcond_without qt4 # don't build qt4 input module
+#
+Summary: SCIM Bridge Gtk IM module
+Name: scim-bridge
+Version: 0.4.16
+Release: 0.1
+License: GPLv2+ or LGPLv2+
+Group: Libraries
+URL: http://www.scim-im.org/projects/scim_bridge
+Source0: http://downloads.sourceforge.net/scim/%{name}-%{version}.tar.gz
+# Source0-md5: 0011b178c4a0d2b0de26e7a14545323c
+Patch0: %{name}-fix-gdm.patch
+Patch1: %{name}-hotkey-help.patch
+Patch2: %{name}-bz461373.patch
+Patch3: %{name}-EOF.patch
+Patch4: %{name}-fix-gtk-key-snooper.patch
+Patch5: %{name}-fixes-null-imengine.patch
+Patch6: %{name}-ac.patch
+%{?with_qt3:BuildRequires: qt-devel}
+%if %{with qt4}
+BuildRequires: qt4-qmake
+BuildRequires: QtGui-devel
+%endif
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+BuildRequires: scim-devel >= 1.4.6
+Requires: scim >= 1.4.6
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+SCIM Bridge is a C implementation of a Gtk IM module for SCIM.
+
+%package gtk2
+Summary: SCIM Bridge Gtk+2 IM module
+Group: Libraries
+Requires(post): gtk+2
+Requires(postun): gtk+2
+# need %{_bindir}/scim-bridge
+Requires: %{name} = %{version}-%{release}
+
+%description gtk2
+This package provides the SCIM Bridge GTK+2 input method module.
+
+%package qt
+Summary: SCIM Bridge Qt IM module
+Group: Libraries
+# need %{_bindir}/scim-bridge
+Requires: %{name} = %{version}-%{release}
+
+%description qt
+This package provides the SCIM Bridge Qt input method module.
+
+%package qt3
+Summary: SCIM Bridge Qt3 IM module
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description qt3
+This package provides the SCIM Bridge Qt3 input method module.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p0
+%patch5 -p1
+%patch6 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure \
+ --%{?with_qt3:en}%{!?with_qt3:dis}able-qt3-immodule \
+ --%{?with_qt4:en}%{!?with_qt4:dis}able-qt4-immodule \
+ --disable-documents
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT/%{_libdir}/gtk-2.0/*/immodules/*.{la,a}
+%{?with_qt3:%{__rm} $RPM_BUILD_ROOT%{_libdir}/qt-3.3/plugins/*/*.{la,a}}
+%{?with_qt4:%{__rm} $RPM_BUILD_ROOT%{_libdir}/qt4/plugins/*/*.{la,a}}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post gtk2
+%if "%{_lib}" != "lib"
+%{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk64-2.0/gtk.immodules
+%else
+%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules
+%endif
+
+%postun gtk2
+%if "%{_lib}" != "lib"
+%{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk64-2.0/gtk.immodules
+%else
+%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules
+%endif
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS COPYING doc
+%attr(755,root,root) %{_bindir}/scim-bridge
+
+%files gtk2
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/gtk-2.0/*/immodules/im-scim-bridge.so
+
+%if %{with qt4}
+%files qt
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/qt4/plugins/inputmethods/*.so
+%endif
+
+%if %{with qt3}
+%files qt3
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/qt-3.3/plugins/inputmethods/*.so
+%endif
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2011/07/24 21:17:03 baggins
+- initial revision
+
================================================================
More information about the pld-cvs-commit
mailing list