packages: ibus-chewing/ibus-chewing-696864-abrt-ibus-1.4.patch (NEW), ibus-...

baggins baggins at pld-linux.org
Wed Jul 20 12:03:01 CEST 2011


Author: baggins                      Date: Wed Jul 20 10:03:01 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial revision

---- Files affected:
packages/ibus-chewing:
   ibus-chewing-696864-abrt-ibus-1.4.patch (NONE -> 1.1)  (NEW), ibus-chewing.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ibus-chewing/ibus-chewing-696864-abrt-ibus-1.4.patch
diff -u /dev/null packages/ibus-chewing/ibus-chewing-696864-abrt-ibus-1.4.patch:1.1
--- /dev/null	Wed Jul 20 12:03:01 2011
+++ packages/ibus-chewing/ibus-chewing-696864-abrt-ibus-1.4.patch	Wed Jul 20 12:02:56 2011
@@ -0,0 +1,84 @@
+From ff138d7a18b7577e5f04f852bd3caf87cbc9e7cc Mon Sep 17 00:00:00 2001
+From: Ding-Yi Chen <dingyichen at gmail.com>
+Date: Thu, 20 Jan 2011 17:03:07 +1000
+Subject: [PATCH] Addressed comments of yusake
+
+---
+ src/IBusChewingEngine-def.c |   30 ++++++++++++++++++++++--------
+ 1 files changed, 22 insertions(+), 8 deletions(-)
+
+diff --git a/src/IBusChewingEngine-def.c b/src/IBusChewingEngine-def.c
+index 90c0384..8c90766 100644
+--- a/src/IBusChewingEngine-def.c
++++ b/src/IBusChewingEngine-def.c
+@@ -391,21 +391,29 @@ this option determines how these status be synchronized. Valid values:\n\
+ void g_variant_to_g_value(GVariant *gVar, GValue *gValue){
+     const GVariantType *gVType=g_variant_get_type(gVar);
+     if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_BOOLEAN)){
++	g_value_init(gValue, G_TYPE_BOOLEAN);
+ 	g_value_set_boolean(gValue, g_variant_get_boolean(gVar));
+     }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_UINT16)){
++	g_value_init(gValue, G_TYPE_UINT);
+ 	g_value_set_uint(gValue, g_variant_get_uint16(gVar));
+     }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_UINT32)){
++	g_value_init(gValue, G_TYPE_UINT);
+ 	g_value_set_uint(gValue, g_variant_get_uint32(gVar));
+     }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_UINT64)){
++	g_value_init(gValue, G_TYPE_UINT64);
+ 	g_value_set_uint64(gValue, g_variant_get_uint64(gVar));
+     }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_INT16)){
++	g_value_init(gValue, G_TYPE_INT);
+ 	g_value_set_int(gValue, g_variant_get_int16(gVar));
+     }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_INT32)){
++	g_value_init(gValue, G_TYPE_INT);
+ 	g_value_set_int(gValue, g_variant_get_int32(gVar));
+     }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_INT64)){
++	g_value_init(gValue, G_TYPE_INT);
+ 	g_value_set_int64(gValue, g_variant_get_int64(gVar));
+     }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_STRING)){
+-	g_value_set_int64(gValue, g_variant_get_string(gVar, NULL));
++	g_value_init(gValue, G_TYPE_STRING);
++	g_value_set_string(gValue, g_variant_get_string(gVar, NULL));
+     }
+ }
+ 
+@@ -419,8 +427,14 @@ GVariant *g_value_to_g_variant(GValue *gValue){
+ 	case G_TYPE_UINT:
+ 	    gVar=g_variant_new_uint32(g_value_get_uint(gValue));
+ 	    break;
++	case G_TYPE_UINT64:
++	    gVar=g_variant_new_uint64(g_value_get_uint(gValue));
++	    break;
+ 	case G_TYPE_INT:
+-	    gVar=g_variant_new_int32(g_value_get_int(gValue));
++	    gVar=g_variant_new_int32(g_value_get_uint(gValue));
++	    break;
++	case G_TYPE_INT64:
++	    gVar=g_variant_new_int64(g_value_get_uint(gValue));
+ 	    break;
+ 	case G_TYPE_STRING:
+ 	    gVar=g_variant_new_string(g_value_get_string(gValue));
+@@ -435,14 +449,14 @@ GVariant *g_value_to_g_variant(GValue *gValue){
+ 
+ static gboolean ibus_chewing_config_get_value(IBusConfig *config, const gchar *section, const gchar *key, GValue *gValue){
+ #if IBUS_VERSION >= 10399
+-    GVariant *gVar=g_variant_ref_sink(ibus_config_get_value(config, section, key));
+-    if (gVar!=NULL){
+-	g_variant_to_g_value(gVar, gValue);
+-	g_variant_unref(gVar);
+-	return TRUE;
+-    }else{
++    GVariant *gVar=ibus_config_get_value(config, section, key);
++    if (gVar==NULL){
+ 	return FALSE;
+     }
++    g_variant_ref_sink(gVar);
++    g_variant_to_g_value(gVar, gValue);
++    g_variant_unref(gVar);
++    return TRUE;
+ #else
+     return ibus_config_get_value(config, section, key, gValue);
+ #endif
+-- 
+1.7.4.4
+

================================================================
Index: packages/ibus-chewing/ibus-chewing.spec
diff -u /dev/null packages/ibus-chewing/ibus-chewing.spec:1.1
--- /dev/null	Wed Jul 20 12:03:01 2011
+++ packages/ibus-chewing/ibus-chewing.spec	Wed Jul 20 12:02:56 2011
@@ -0,0 +1,92 @@
+# $Revision$, $Date$
+Summary:	The Chewing engine for IBus input platform
+Name:		ibus-chewing
+Version:	1.3.9.2
+Release:	0.1
+Summary(zh_TW):	IBus新酷音輸入法
+License:	GPL v2+
+Group:		Libraries
+Source0:	http://ibus.googlecode.com/files/%{name}-%{version}-Source.tar.gz
+# Source0-md5:	8d177d67647944f5d1f9cca0654eaccb
+Patch0:		%{name}-696864-abrt-ibus-1.4.patch
+URL:		http://code.google.com/p/ibus/
+BuildRequires:	GConf2-devel
+BuildRequires:	cmake
+BuildRequires:	gettext-devel
+BuildRequires:	gob2 >= 2.0.16
+BuildRequires:	gtk+2-devel
+BuildRequires:	ibus-devel >= 1.1
+BuildRequires:	libchewing-devel >= 0.3.3
+BuildRequires:	pkgconfig
+BuildRequires:	xorg-lib-libXtst-devel
+BuildRequires:	rpmbuild(macros) >= 1.600
+Requires:	ibus >= 1.1
+Requires:	libchewing >= 0.3.3
+Requires:	GConf2
+Requires(post):	GConf2
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		_libexecdir	%{_libdir}/ibus
+
+%description
+IBus-chewing is an IBus front-end of Chewing, an intelligent Chinese
+input method for Zhuyin (BoPoMoFo) users. It supports various Zhuyin
+keyboard layout, such as standard (DaChen), IBM, Gin-Yeah, Eten, Eten
+26, Hsu, Dvorak, Dvorak-Hsu, and DaChen26.
+
+Chewing also support toned Hanyu pinyin input.
+
+%description -l zh_TW
+IBus-chewing 是新酷音輸入法的IBus前端。
+新酷音輸入法是個智慧型注音輸入法,支援多種鍵盤布局,諸如:
+標準注音鍵盤、IBM、精業、倚天、倚天26鍵、許氏、Dvorak、
+Dvorak許氏 及大千26鍵。
+
+本輸入法也同時支援帶調漢語拼音輸入。
+
+%prep
+%setup -q -n %{name}-%{version}-Source
+%patch0 -p1
+
+%build
+%cmake \
+	-DLIBEXEC_DIR=%{_libexecdir}
+
+%{__make} VERBOSE=1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# We install document using %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
+
+%find_lang %{name}
+
+%post
+%gconf_schema_install ibus-chewing.schemas
+
+%preun
+%gconf_schema_uninstall ibus-chewing.schemas
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc RELEASE-NOTES.txt AUTHORS README ChangeLog USER-GUIDE
+%{_libexecdir}/ibus-engine-chewing
+%{_datadir}/%{name}
+%{_datadir}/ibus/component/chewing.xml
+%{_sysconfdir}/gconf/schemas/ibus-chewing.schemas
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+* %{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/20 10:02:56  baggins
+- initial revision
+
================================================================


More information about the pld-cvs-commit mailing list