Lars Vogdt 2011-09-19 19:23:06 +00:00 committed by Git OBS Bridge
commit 52d6cf42da
3 changed files with 70 additions and 2 deletions

View File

@ -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

View File

@ -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

57
xim.d-ibus-121 Normal file
View File

@ -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