forked from pool/fcitx
Accepting request 340480 from home:tiwai:branches:M17N
- Fix logging not to include the build path (boo#951602) - Several fixes and cleanup for starting fcitx on GNOME on Leap (boo#947576,boo#942816) * Remove the superfluous manual dbus-launch from xim script * Use xdg autostart for GNOME, KDE, LXDE and XFCE; fcitx-autostart script is also modified to check $INPUT_METHOD * Delay start of fcitx daemon a bit, too OBS-URL: https://build.opensuse.org/request/show/340480 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=124
This commit is contained in:
parent
0bfd314046
commit
70b7a4fe79
14
fcitx-autostart-check-INPUT_METHOD.patch
Normal file
14
fcitx-autostart-check-INPUT_METHOD.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
data/script/fcitx-autostart | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
--- a/data/script/fcitx-autostart
|
||||||
|
+++ b/data/script/fcitx-autostart
|
||||||
|
@@ -1,5 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
+test x"$INPUT_METHOD" = x"fcitx" || exit 0
|
||||||
|
+
|
||||||
|
# sleep for a little while to avoid duplicate startup
|
||||||
|
sleep 2
|
||||||
|
|
23
fcitx-use-basename-for-log.patch
Normal file
23
fcitx-use-basename-for-log.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
src/lib/fcitx-utils/log.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/src/lib/fcitx-utils/log.c
|
||||||
|
+++ b/src/lib/fcitx-utils/log.c
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <wchar.h>
|
||||||
|
+#include <libgen.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "fcitx/fcitx.h"
|
||||||
|
@@ -136,7 +137,7 @@ FcitxLogFunc(FcitxLogLevel e, const char
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
|
- FcitxLogFuncV(e, filename, line, fmt, ap);
|
||||||
|
+ FcitxLogFuncV(e, basename(filename), line, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 22 16:02:07 CEST 2015 - tiwai@suse.de
|
||||||
|
|
||||||
|
- Fix logging not to include the build path (boo#951602)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 22 14:59:29 CEST 2015 - tiwai@suse.de
|
||||||
|
|
||||||
|
- Several fixes and cleanup for starting fcitx on GNOME on Leap
|
||||||
|
(boo#947576,boo#942816)
|
||||||
|
* Remove the superfluous manual dbus-launch from xim script
|
||||||
|
* Use xdg autostart for GNOME, KDE, LXDE and XFCE;
|
||||||
|
fcitx-autostart script is also modified to check $INPUT_METHOD
|
||||||
|
* Delay start of fcitx daemon a bit, too
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 2 02:50:30 UTC 2015 - i@marguerite.su
|
Fri Oct 2 02:50:30 UTC 2015 - i@marguerite.su
|
||||||
|
|
||||||
|
10
fcitx.spec
10
fcitx.spec
@ -33,6 +33,10 @@ Source8: openSUSE-themes.tar.gz
|
|||||||
Source9: macros.%{name}
|
Source9: macros.%{name}
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
Patch: fcitx-4.2.8.5-fix-bashisms.patch
|
Patch: fcitx-4.2.8.5-fix-bashisms.patch
|
||||||
|
# PATCH-FIX-OPENSUSE fcitx-use-basename-for-log.patch boo#951602
|
||||||
|
Patch1: fcitx-use-basename-for-log.patch
|
||||||
|
# PATCH-FIX-OPENSUSE fcitx-autostart-check-INPUT_METHOD.patch boo#947576
|
||||||
|
Patch2: fcitx-autostart-check-INPUT_METHOD.patch
|
||||||
BuildRequires: cairo-devel
|
BuildRequires: cairo-devel
|
||||||
BuildRequires: dbus-1-devel
|
BuildRequires: dbus-1-devel
|
||||||
BuildRequires: dbus-1-glib-devel
|
BuildRequires: dbus-1-glib-devel
|
||||||
@ -356,6 +360,8 @@ You can either use this package for download from kde-look.org using knewstaff i
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch -p1
|
%patch -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
# hack to fix incompatibility of gtk-query-immodules-2.0 (bnc#845860)
|
# hack to fix incompatibility of gtk-query-immodules-2.0 (bnc#845860)
|
||||||
%if %suse_version < 1310
|
%if %suse_version < 1310
|
||||||
sed -i \
|
sed -i \
|
||||||
@ -450,9 +456,6 @@ pushd %{buildroot}%{_sysconfdir}/X11/xim.d/
|
|||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# bnc#801319 remove the unneeded fcitx-autostart.desktop which blocks ibus from starting.
|
|
||||||
rm -rf %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}-autostart.desktop
|
|
||||||
|
|
||||||
# install rpm macros
|
# install rpm macros
|
||||||
install -D -m644 %{SOURCE9} %{buildroot}%{_sysconfdir}/rpm/macros.%{name}
|
install -D -m644 %{SOURCE9} %{buildroot}%{_sysconfdir}/rpm/macros.%{name}
|
||||||
|
|
||||||
@ -519,6 +522,7 @@ exit 0
|
|||||||
%{_mandir}/man1/fcitx.1.gz
|
%{_mandir}/man1/fcitx.1.gz
|
||||||
%{_mandir}/man1/fcitx-remote.1.gz
|
%{_mandir}/man1/fcitx-remote.1.gz
|
||||||
%{_libdir}/%{name}/
|
%{_libdir}/%{name}/
|
||||||
|
%{_sysconfdir}/xdg/autostart/%{name}*.desktop
|
||||||
%config %{_sysconfdir}/X11/xim.d/
|
%config %{_sysconfdir}/X11/xim.d/
|
||||||
%doc %{_docdir}/%{name}/
|
%doc %{_docdir}/%{name}/
|
||||||
|
|
||||||
|
17
xim.d-fcitx
17
xim.d-fcitx
@ -5,12 +5,17 @@ export GTK_IM_MODULE=fcitx
|
|||||||
export QT_IM_SWITCHER=imsw-multi
|
export QT_IM_SWITCHER=imsw-multi
|
||||||
export QT_IM_MODULE=fcitx
|
export QT_IM_MODULE=fcitx
|
||||||
|
|
||||||
# Avoid relying on autolaunch to improvise D-Bus sessions for each process
|
case "$WINDOWMANAGER" in
|
||||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] ; then
|
*gnome*|*kde*|*xfce*|*lxde*)
|
||||||
eval $(dbus-launch --sh-syntax --exit-with-session)
|
# started via xdg autostart (boo#947576)
|
||||||
fi
|
# explicitly set below, as referred in xdg autostart
|
||||||
|
export INPUT_METHOD=fcitx
|
||||||
fcitx -d
|
;;
|
||||||
|
*)
|
||||||
|
# FIXME: a little bit of delay is required to avoid race (boo#947576)
|
||||||
|
(sleep 2; fcitx -d) &
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# success:
|
# success:
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user