From 52502a694665bc269487b117fdb7aa490e39691fa19e1617602e0e65a072e0a5 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Tue, 9 Aug 2011 08:54:38 +0000 Subject: [PATCH 1/2] Updating link to change in openSUSE:Factory/ibus revision 15.0 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=fed81bd29616efded7d494af111ebd33 --- ibus.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ibus.spec b/ibus.spec index 6b9db7a..255bd89 100644 --- a/ibus.spec +++ b/ibus.spec @@ -15,11 +15,12 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define build_gtk3 (0%{suse_version} >= 1140) Name: ibus Version: 1.3.9 -Release: 3 +Release: 5 License: LGPL V2+ Url: http://code.google.com/p/ibus/ Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz @@ -70,7 +71,9 @@ Supplements: packageand(ibus:gtk2) This package contains ibus im module for gtk2 %if %{build_gtk3} + %package gtk3 + Summary: IBus im module for gtk3 Group: System/I18n/Chinese Requires: %{name} = %{version} @@ -170,6 +173,7 @@ rm -rf %buildroot %postun -n libibus2 -p /sbin/ldconfig %if %{build_gtk3} + %post gtk3 %gtk3_immodule_post From 98902ad20d508abf07ac0e1917b818088a68fafd109b4d2ee233d0378bd70d00 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 14 Sep 2011 09:21:19 +0000 Subject: [PATCH 2/2] Accepting request 81749 from home:ftake:branches:M17N Fix problem IBus cannot save any settings on 12.1 by adding a new xim.d/ibus script that launch D-Bus daemon manually. OBS-URL: https://build.opensuse.org/request/show/81749 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=26 --- ibus.changes | 5 +++++ ibus.spec | 10 +++++++-- xim.d-ibus-121 | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 xim.d-ibus-121 diff --git a/ibus.changes b/ibus.changes index c6352fe..8a21b37 100644 --- a/ibus.changes +++ b/ibus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 6 17:17:56 UTC 2011 - ftake@geeko.jp + +- Fix xim.d/ibus to launch D-Bus daemon (only for newer D-Bus) + ------------------------------------------------------------------- Mon Aug 8 16:34:13 CEST 2011 - tiwai@suse.de diff --git a/ibus.spec b/ibus.spec index 255bd89..170f467 100644 --- a/ibus.spec +++ b/ibus.spec @@ -17,6 +17,7 @@ %define build_gtk3 (0%{suse_version} >= 1140) +%define build_without_dbus_autolaunch (0%{suse_version} >= 1210) Name: ibus Version: 1.3.9 @@ -26,7 +27,8 @@ Url: http://code.google.com/p/ibus/ Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Source1: xim.d-ibus Source2: ibus-README.suse -Source3: xim.ibus.suse.template +Source3: xim.ibus.suse.template +Source4: xim.d-ibus-121 Patch0: ibus-python-install-dir.patch #Patch1: ibus-disable-portability-check.patch #Patch2: ibus-disable-introspect.patch @@ -120,8 +122,12 @@ make %{?jobs:-j %jobs} %install %makeinstall -mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/ +mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/ +%if %{build_without_dbus_autolaunch} +install -m 644 $RPM_SOURCE_DIR/xim.d-ibus-121 $RPM_BUILD_ROOT/etc/X11/xim.d/ibus +%else install -m 644 $RPM_SOURCE_DIR/xim.d-ibus $RPM_BUILD_ROOT/etc/X11/xim.d/ibus +%endif sed -i 1i"SYS_LIB=%{_lib}" $RPM_BUILD_ROOT/etc/X11/xim.d/ibus PRIORITY=40 diff --git a/xim.d-ibus-121 b/xim.d-ibus-121 new file mode 100644 index 0000000..833675d --- /dev/null +++ b/xim.d-ibus-121 @@ -0,0 +1,57 @@ +OLD_PATH=$PATH +PATH=/usr/bin:/usr/X11R6/bin:/opt/kde3/bin:$PATH + +if ! type -p ibus-daemon > /dev/null 2>&1 ; then + echo "ibus is not available." + PATH=$OLD_PATH + return 1 +fi + +#when skim installed, Autostart must be "false". +#here we move $HOME/.kde/share/config/skimrc to skimrc.orig.ibus +case "$WINDOWMANAGER" in + *kde*) + if type -p skim > /dev/null 2>&1 \ + && ! grep -i -q "^[[:space:]]*Autostart.*=.*false" $HOME/.kde/share/config/skimrc + then + if [ -f $HOME/.kde/share/config/skimrc.orig.ibus ] ; then + mv -f $HOME/.kde/share/config/skimrc $HOME/.kde/share/config/skimrc.orig.ibus + chmod 777 $HOME/.kde/share/config/skimrc.orig.ibus + fi + cat > $HOME/.kde/share/config/skimrc << __END +[General] +Autostart=false +__END + chmod 777 $HOME/.kde/share/config/skimrc + else + # do nothing + : + fi + ;; + *) + # do nothing + ;; +esac + +# Determine the LC_CTYPE locale category setting +#tmplang=${LC_ALL-${LC_CTYPE-${LANG-en_US}}} + + export LC_CTYPE=$LANG + export XMODIFIERS="@im=ibus" + export GTK_IM_MODULE=ibus + export QT_IM_SWITCHER=imsw-multi + if [ -e /usr/$SYS_LIB/qt4/plugins/inputmethods/libqtim-ibus.so ]; then + export QT_IM_MODULE=ibus + else + export QT_IM_MODULE=xim + fi + + MACHINEID=`cat /var/lib/dbus/machine-id` + eval `dbus-launch --sh-syntax --autolaunch=$MACHINEID --close-stderr` + + ibus-daemon --xim -d + +PATH=$OLD_PATH + +# success: +return 0