From 82cea755930a60836b446d200a883ffa2e74f03476bc843dec09f317717b8d17 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Sun, 3 Jun 2012 09:36:32 +0000 Subject: [PATCH 1/2] Accepting request 123357 from home:MargueriteSu:branches:M17N fix sles builds OBS-URL: https://build.opensuse.org/request/show/123357 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=29 --- _service | 6 +- fcitx-4.2.3.tar.bz2 | 3 + fcitx-4.2.3.tar.xz | 3 - fcitx.changes | 9 ++ fcitx.spec | 100 ++++++++++++++++------- fix-for-sles-downgrade-gio-version.patch | 19 +++++ 6 files changed, 105 insertions(+), 35 deletions(-) create mode 100644 fcitx-4.2.3.tar.bz2 delete mode 100644 fcitx-4.2.3.tar.xz create mode 100644 fix-for-sles-downgrade-gio-version.patch diff --git a/_service b/_service index ffaf4ba..2a7e733 100644 --- a/_service +++ b/_service @@ -1,13 +1,13 @@ - + allhttp://code.google.com/p/fcitx/4.2gitfcitxgit - + *.tar bz2 - + diff --git a/fcitx-4.2.3.tar.bz2 b/fcitx-4.2.3.tar.bz2 new file mode 100644 index 0000000..8ade3ee --- /dev/null +++ b/fcitx-4.2.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2bc67c9251ad9f51439e30ad3aa6b1d6d8c65393ea71dccd4749b5e8de7d3bf +size 844355 diff --git a/fcitx-4.2.3.tar.xz b/fcitx-4.2.3.tar.xz deleted file mode 100644 index 49207b5..0000000 --- a/fcitx-4.2.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b7d22ada50f7e375096094c2abcf09ad114ffb68521ccf0de37d71e1014183c -size 612028 diff --git a/fcitx.changes b/fcitx.changes index 637c9fc..348a38a 100644 --- a/fcitx.changes +++ b/fcitx.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Jun 3 04:46:37 UTC 2012 - i@marguerite.su + +- fix sles builds. + * add version tags. + * changed source compression. + * add a patch to downgrade gio's version. + * use xim instead of qt im module. + ------------------------------------------------------------------- Sat May 12 12:49:11 UTC 2012 - i@marguerite.su diff --git a/fcitx.spec b/fcitx.spec index d0bb13f..1c7ceb5 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -15,51 +15,63 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define libver -4_2_3 Name: fcitx Version: 4.2.3 -Release: 1 +Release: 0 Summary: A Flexible Input Method Framework for CJK -Url: http://code.google.com/p/fcitx -Group: System/I18n/Chinese License: GPL-2.0+ -Source: http://fcitx.googlecode.com/files/%{name}-%{version}.tar.xz +Group: System/I18n/Chinese +Url: http://code.google.com/p/fcitx +Source: http://fcitx.googlecode.com/files/%{name}-%{version}.tar.bz2 Source1: xim.d-fcitx Source2: fcitx-README.suse Source3: xim.fcitx.suse.template -Source5: pinyin.tar.gz -Source6: table.tar.gz +Source5: pinyin.tar.gz +Source6: table.tar.gz #FIX-FOR-UPSTREAM i@marguerite.su - dont download online -Patch1: fix_fcitx_googlecode_resolv_error.patch +Patch1: fix_fcitx_googlecode_resolv_error.patch #FIX-FOR-UPSTREAM i@marguerite.su - fix lua51 builds on 11.4 -Patch2: fcitx-4.2.3-openSUSE-11.4-lua51.patch -BuildRequires: xz +Patch2: fcitx-4.2.3-openSUSE-11.4-lua51.patch +#FIX-FOR-SLES i@marguerite.su - downgrade gio version from 2.6 to 2.26 +Patch3: fix-for-sles-downgrade-gio-version.patch BuildRequires: cairo-devel -BuildRequires: pango-devel BuildRequires: dbus-1-devel BuildRequires: dbus-1-glib-devel +BuildRequires: pango-devel BuildRequires: update-desktop-files -BuildRequires: fdupes +%if 0%{?suse_version} >= 1110 +BuildRequires: fdupes +%endif +%if 0%{?suse_version} > 1110 BuildRequires: libqt4-devel +%endif %if 0%{?suse_version} <= 1210 -BuildRequires: lua-devel +BuildRequires: lua-devel %else BuildRequires: lua51-devel %endif -BuildRequires: opencc-devel -BuildRequires: intltool BuildRequires: cmake BuildRequires: gtk2-devel +BuildRequires: intltool +BuildRequires: opencc-devel +%if 0%{?suse_version} >= 1140 BuildRequires: gtk3-devel +%endif BuildRequires: gcc-c++ BuildRequires: libicu-devel -Requires: lib%{name}%{libver} = %{version}-%{release} -Requires: %{name}-gtk2 = %{version}-%{release} -Requires: %{name}-gtk3 = %{version}-%{release} -Requires: %{name}-qt4 = %{version}-%{release} +Requires: %{name}-gtk2 = %{version}-%{release} +Requires: lib%{name}%{libver} = %{version}-%{release} +%if 0%{?suse_version} >= 1140 +Requires: %{name}-gtk3 = %{version}-%{release} +%endif +%if 0%{?suse_version} > 1110 +Requires: %{name}-qt4 = %{version}-%{release} +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build -Provides: locale(ko;zh_CN;zh_SG) +Provides: locale(ko;zh_CN;zh_SG) %description FCITX is a simplified Chinese input server. It supports Tables, @@ -69,8 +81,8 @@ Since version 4.1, FCITX itself can be use as an im-module. XIM can still be used but not necessary. %package -n lib%{name}%{libver} -Summary: Shared Libraries for %{name} -Group: System/I18n/Chinese +Summary: Shared Libraries for %{name} +Group: System/I18n/Chinese %description -n lib%{name}%{libver} The libfcitx4_2_0 package includes the shared libraries for the fictx package. @@ -92,6 +104,8 @@ Requires: %{name} = %{version}-%{release} %description gtk2 This package contains fcitx im module for gtk2 +%if 0%{?suse_version} >= 1140 + %package gtk3 Summary: Gtk3 IM Module for %{name} Group: System/I18n/Chinese @@ -101,6 +115,9 @@ Requires: %{name} = %{version}-%{release} %description gtk3 This package contains fcitx im module for gtk3 +%endif +%if 0%{?suse_version} > 1110 + %package qt4 Summary: Qt4 IM Module for %{name} Group: System/I18n/Chinese @@ -108,19 +125,26 @@ Requires: %{name} = %{version}-%{release} %description qt4 This package contains fcitx im module for qt4 - + +%endif + %prep %setup -q -n %{name}-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build mkdir build cd build cmake .. -DENABLE_GTK2_IM_MODULE=On \ +%if 0%{?suse_version} >= 1140 -DENABLE_GTK3_IM_MODULE=On \ +%endif +%if 0%{?suse_version} > 1110 -DENABLE_QT_IM_MODULE=On \ +%endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DLIB_INSTALL_DIR=%{_libdir} \ -DENABLE_DEBUG=On \ @@ -139,7 +163,7 @@ make %install cd build -make DESTDIR=$RPM_BUILD_ROOT install +%makeinstall cd .. @@ -173,14 +197,20 @@ popd %find_lang %{name} +%if 0%{?suse_version} >= 1110 %fdupes %{buildroot} +%endif #strip libraries %{__strip} %{buildroot}%{_libdir}/%{name}/*.so %{__strip} %{buildroot}%{_libdir}/libfcitx*.so.* %{__strip} %{buildroot}%{_libdir}/gtk-2.0/*/immodules/im-%{name}.so +%if 0%{?suse_version} >= 1140 %{__strip} %{buildroot}%{_libdir}/gtk-3.0/*/immodules/im-%{name}.so +%endif +%if 0%{?suse_version} > 1110 %{__strip} %{buildroot}%{_libdir}/qt4/plugins/inputmethods/qtim-%{name}.so +%endif #Convenient define for the scriplets %if %{_lib} == lib64 @@ -191,6 +221,14 @@ popd %define _gtk2_query_immodules_update_cache %{_gtk2_query_immodules} > %{_sysconfdir}/gtk-2.0/gtk.immodules %endif +%post gtk2 +%{_gtk2_query_immodules_update_cache} + +%postun gtk2 +%{_gtk2_query_immodules_update_cache} + +%if 0%{?suse_version} >= 1140 + %if %{_lib} == lib64 %define _gtk3_query_immodules %{_bindir}/gtk-query-immodules-3.0-64 %else @@ -198,9 +236,6 @@ popd %endif %define _gtk3_query_immodules_update_cache %{_gtk3_query_immodules} --update-cache -%post gtk2 -%{_gtk2_query_immodules_update_cache} - %post gtk3 %{_gtk3_query_immodules_update_cache} @@ -211,12 +246,11 @@ mv $TARGET $TARGET-fcitx sed "/^const STANDARD_TRAY_ICON_IMPLEMENTATIONS/a \ 'fcitx': 'input-method'," $TARGET-fcitx > $TARGET fi -%postun gtk2 -%{_gtk2_query_immodules_update_cache} - %postun gtk3 %{_gtk3_query_immodules_update_cache} +%endif + %post -p /sbin/ldconfig %post -n lib%{name}%{libver} -p /sbin/ldconfig @@ -246,18 +280,26 @@ fi %defattr(-,root,root) %{_libdir}/gtk-2.0/* +%if 0%{?suse_version} >= 1140 + %files gtk3 %defattr(-,root,root) %{_libdir}/gtk-3.0/* +%endif + %files devel %defattr(-,root,root) %{_libdir}/pkgconfig/*.pc %{_datadir}/cmake/ %{_includedir}/* +%if 0%{?suse_version} > 1110 + %files qt4 %defattr(-,root,root) %{_libdir}/qt4/* +%endif + %changelog diff --git a/fix-for-sles-downgrade-gio-version.patch b/fix-for-sles-downgrade-gio-version.patch new file mode 100644 index 0000000..c611953 --- /dev/null +++ b/fix-for-sles-downgrade-gio-version.patch @@ -0,0 +1,19 @@ +diff -urN fcitx-4.2.3.orig/src/frontend/CMakeLists.txt fcitx-4.2.3/src/frontend/CMakeLists.txt +--- fcitx-4.2.3.orig/src/frontend/CMakeLists.txt 2012-06-03 12:26:00.293473739 +0800 ++++ fcitx-4.2.3/src/frontend/CMakeLists.txt 2012-06-03 12:26:50.285848746 +0800 +@@ -7,7 +7,7 @@ + if (ENABLE_GTK2_IM_MODULE OR ENABLE_GTK3_IM_MODULE) + + PKG_CHECK_MODULES(GLIB2 REQUIRED "glib-2.0" ) +- PKG_CHECK_MODULES(GIO2 "gio-2.0 >= 2.6") ++ PKG_CHECK_MODULES(GIO2 "gio-2.0 >= 2.26") + if (NOT GIO2_FOUND) + PKG_CHECK_MODULES(DBUS_GLIB REQUIRED "dbus-glib-1") + endif (NOT GIO2_FOUND) +@@ -20,4 +20,4 @@ + add_subdirectory(gtk2) + add_subdirectory(gtk3) + add_subdirectory(qt) +-endif (_ENABLE_DBUS) +\ 文件尾没有 newline 字符 ++endif (_ENABLE_DBUS) From 3e51f582e2723a8da610e8e3e136d38f87352f7ad44963a71cb4f6062337eae4 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Mon, 4 Jun 2012 14:26:59 +0000 Subject: [PATCH 2/2] Accepting request 123501 from home:MargueriteSu:branches:M17N version update OBS-URL: https://build.opensuse.org/request/show/123501 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=30 --- baselibs.conf | 2 +- fcitx-4.2.3-openSUSE-11.4-lua51.patch | 58 ------------------------ fcitx-4.2.3.tar.bz2 | 3 -- fcitx-4.2.4.tar.bz2 | 3 ++ fcitx.changes | 14 ++++++ fcitx.spec | 22 +++++---- fix-for-sles-downgrade-gio-version.patch | 19 -------- 7 files changed, 31 insertions(+), 90 deletions(-) delete mode 100644 fcitx-4.2.3-openSUSE-11.4-lua51.patch delete mode 100644 fcitx-4.2.3.tar.bz2 create mode 100644 fcitx-4.2.4.tar.bz2 delete mode 100644 fix-for-sles-downgrade-gio-version.patch diff --git a/baselibs.conf b/baselibs.conf index de11b1c..25e1d0b 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,4 @@ -libfcitx-4_2_3 +libfcitx-4_2_4 fcitx-gtk2 fcitx-gtk3 fcitx-qt4 \ No newline at end of file diff --git a/fcitx-4.2.3-openSUSE-11.4-lua51.patch b/fcitx-4.2.3-openSUSE-11.4-lua51.patch deleted file mode 100644 index 0b21bea..0000000 --- a/fcitx-4.2.3-openSUSE-11.4-lua51.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/src/module/lua/luawrap.c b/src/module/lua/luawrap.c -index 67883a7..417a1c9 100644 ---- a/src/module/lua/luawrap.c -+++ b/src/module/lua/luawrap.c -@@ -58,13 +58,13 @@ typedef struct _ConverterItem { - UT_hash_handle hh; - } ConverterItem; - --typedef struct _LuaExtension { -+struct _LuaExtension { - char *name; - lua_State *lua; - UT_hash_handle hh; --} LuaExtension; -+}; - --typedef struct _LuaModule { -+struct _LuaModule { - FcitxInstance *fcitx; - LuaExtension *extensions; - CommandItem *commands; -@@ -73,7 +73,7 @@ typedef struct _LuaModule { - ConverterItem *converters; - ConverterItem *current_converter; - size_t shortest_input_trigger_key_length; --} LuaModule; -+}; - - typedef void (*LuaResultFn)(LuaModule *luamodule, const char *in, const char *out); - -diff --git a/src/module/lua/luawrap.h b/src/module/lua/luawrap.h -index 152d835..592b275 100644 ---- a/src/module/lua/luawrap.h -+++ b/src/module/lua/luawrap.h -@@ -21,18 +21,18 @@ - #ifndef _LUA_WRAP_H_ - #define _LUA_WRAP_H_ - --typedef struct lua_State lua_State; --typedef struct _LuaModule LuaModule; --typedef struct _LuaExtension LuaExtension; --typedef struct _FcitxInstance FcitxInstance; -+#include - - typedef struct _LuaResultItem { - char *result; - char *help; - } LuaResultItem; - -+typedef struct _LuaModule LuaModule; -+typedef struct _LuaExtension LuaExtension; -+ - // alloc/free luamodule --LuaModule * LuaModuleAlloc(FcitxInstance *fcitx); -+LuaModule * LuaModuleAlloc(struct _FcitxInstance *fcitx); - void LuaModuleFree(LuaModule *luamodule); - FcitxInstance *GetFcitx(LuaModule *luamodule); - diff --git a/fcitx-4.2.3.tar.bz2 b/fcitx-4.2.3.tar.bz2 deleted file mode 100644 index 8ade3ee..0000000 --- a/fcitx-4.2.3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2bc67c9251ad9f51439e30ad3aa6b1d6d8c65393ea71dccd4749b5e8de7d3bf -size 844355 diff --git a/fcitx-4.2.4.tar.bz2 b/fcitx-4.2.4.tar.bz2 new file mode 100644 index 0000000..cfae2db --- /dev/null +++ b/fcitx-4.2.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0889c6ea3dd2066ca582ac3cd5b18c293ee01123d2a454a5731af9da42a24542 +size 11133679 diff --git a/fcitx.changes b/fcitx.changes index 348a38a..04702be 100644 --- a/fcitx.changes +++ b/fcitx.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sun Jun 3 13:05:53 UTC 2012 - i@marguerite.su + +- update to 4.2.4 + * fix some xim problem + * add fcitx-gclient for glib and gir binding, can be used to control fcitx or implement fcitx client. + * merge fcitx-keyboard into fcitx + * bind specific keyboard layout with inputmethod + (you need up to date fcitx-configtool,gtk3 ver or kcm-fcitx to configure this feature) + * adjust some default hotkey setting. +- drop openSUSE 11.4 lua51 patch. upstream fixed. +- drop downgrade gio version patch. upstream fixed. +- add SUSE_ASNEEDED=0 macro to avoid a gobject-introspection bug as vuntz suggested. thanks! + ------------------------------------------------------------------- Sun Jun 3 04:46:37 UTC 2012 - i@marguerite.su diff --git a/fcitx.spec b/fcitx.spec index 1c7ceb5..b63c3f8 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -16,16 +16,18 @@ # -%define libver -4_2_3 +%define libver -4_2_4 Name: fcitx -Version: 4.2.3 +Version: 4.2.4 Release: 0 Summary: A Flexible Input Method Framework for CJK License: GPL-2.0+ Group: System/I18n/Chinese Url: http://code.google.com/p/fcitx -Source: http://fcitx.googlecode.com/files/%{name}-%{version}.tar.bz2 +#Source: http://fcitx.googlecode.com/files/%{name}-%{version}.tar.xz +# use bzip to be compatible with sles. +Source: %{name}-%{version}.tar.bz2 Source1: xim.d-fcitx Source2: fcitx-README.suse Source3: xim.fcitx.suse.template @@ -33,13 +35,11 @@ Source5: pinyin.tar.gz Source6: table.tar.gz #FIX-FOR-UPSTREAM i@marguerite.su - dont download online Patch1: fix_fcitx_googlecode_resolv_error.patch -#FIX-FOR-UPSTREAM i@marguerite.su - fix lua51 builds on 11.4 -Patch2: fcitx-4.2.3-openSUSE-11.4-lua51.patch -#FIX-FOR-SLES i@marguerite.su - downgrade gio version from 2.6 to 2.26 -Patch3: fix-for-sles-downgrade-gio-version.patch BuildRequires: cairo-devel BuildRequires: dbus-1-devel BuildRequires: dbus-1-glib-devel +BuildRequires: enchant-devel +BuildRequires: iso-codes-devel BuildRequires: pango-devel BuildRequires: update-desktop-files %if 0%{?suse_version} >= 1110 @@ -59,9 +59,11 @@ BuildRequires: intltool BuildRequires: opencc-devel %if 0%{?suse_version} >= 1140 BuildRequires: gtk3-devel +BuildRequires: gobject-introspection-devel %endif BuildRequires: gcc-c++ BuildRequires: libicu-devel +BuildRequires: libxml2-devel Requires: %{name}-gtk2 = %{version}-%{release} Requires: lib%{name}%{libver} = %{version}-%{release} %if 0%{?suse_version} >= 1140 @@ -131,8 +133,6 @@ This package contains fcitx im module for qt4 %prep %setup -q -n %{name}-%{version} %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build mkdir build @@ -159,6 +159,8 @@ pushd ../data/table cp -r %{S:6} ./ popd +#fix gobject-introspection build +export SUSE_ASNEEDED=0 make %install @@ -285,6 +287,8 @@ fi %files gtk3 %defattr(-,root,root) %{_libdir}/gtk-3.0/* +%{_libdir}/girepository-1.0/Fcitx-1.0.typelib +%{_datadir}/gir-1.0/Fcitx-1.0.gir %endif diff --git a/fix-for-sles-downgrade-gio-version.patch b/fix-for-sles-downgrade-gio-version.patch deleted file mode 100644 index c611953..0000000 --- a/fix-for-sles-downgrade-gio-version.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urN fcitx-4.2.3.orig/src/frontend/CMakeLists.txt fcitx-4.2.3/src/frontend/CMakeLists.txt ---- fcitx-4.2.3.orig/src/frontend/CMakeLists.txt 2012-06-03 12:26:00.293473739 +0800 -+++ fcitx-4.2.3/src/frontend/CMakeLists.txt 2012-06-03 12:26:50.285848746 +0800 -@@ -7,7 +7,7 @@ - if (ENABLE_GTK2_IM_MODULE OR ENABLE_GTK3_IM_MODULE) - - PKG_CHECK_MODULES(GLIB2 REQUIRED "glib-2.0" ) -- PKG_CHECK_MODULES(GIO2 "gio-2.0 >= 2.6") -+ PKG_CHECK_MODULES(GIO2 "gio-2.0 >= 2.26") - if (NOT GIO2_FOUND) - PKG_CHECK_MODULES(DBUS_GLIB REQUIRED "dbus-glib-1") - endif (NOT GIO2_FOUND) -@@ -20,4 +20,4 @@ - add_subdirectory(gtk2) - add_subdirectory(gtk3) - add_subdirectory(qt) --endif (_ENABLE_DBUS) -\ 文件尾没有 newline 字符 -+endif (_ENABLE_DBUS)