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/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.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-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 637c9fc..04702be 100644
--- a/fcitx.changes
+++ b/fcitx.changes
@@ -1,3 +1,26 @@
+-------------------------------------------------------------------
+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
+
+- 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..b63c3f8 100644
--- a/fcitx.spec
+++ b/fcitx.spec
@@ -15,51 +15,65 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-%define libver -4_2_3
+
+%define libver -4_2_4
Name: fcitx
-Version: 4.2.3
-Release: 1
+Version: 4.2.4
+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.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
-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
-#FIX-FOR-UPSTREAM i@marguerite.su - fix lua51 builds on 11.4
-Patch2: fcitx-4.2.3-openSUSE-11.4-lua51.patch
-BuildRequires: xz
+Patch1: fix_fcitx_googlecode_resolv_error.patch
BuildRequires: cairo-devel
-BuildRequires: pango-devel
BuildRequires: dbus-1-devel
BuildRequires: dbus-1-glib-devel
+BuildRequires: enchant-devel
+BuildRequires: iso-codes-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
+BuildRequires: gobject-introspection-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}
+BuildRequires: libxml2-devel
+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 +83,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 +106,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 +117,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 +127,24 @@ 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
%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 \
@@ -135,11 +159,13 @@ pushd ../data/table
cp -r %{S:6} ./
popd
+#fix gobject-introspection build
+export SUSE_ASNEEDED=0
make
%install
cd build
-make DESTDIR=$RPM_BUILD_ROOT install
+%makeinstall
cd ..
@@ -173,14 +199,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 +223,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 +238,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 +248,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,9 +282,15 @@ fi
%defattr(-,root,root)
%{_libdir}/gtk-2.0/*
+%if 0%{?suse_version} >= 1140
+
%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
%files devel
%defattr(-,root,root)
@@ -256,8 +298,12 @@ fi
%{_datadir}/cmake/
%{_includedir}/*
+%if 0%{?suse_version} > 1110
+
%files qt4
%defattr(-,root,root)
%{_libdir}/qt4/*
+%endif
+
%changelog