commit
6bf9041f00
BIN
imsettings-1.7.3.tar.bz2
Normal file
BIN
imsettings-1.7.3.tar.bz2
Normal file
Binary file not shown.
28
imsettings-constraint-of-language.patch
Normal file
28
imsettings-constraint-of-language.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff -pruN imsettings-1.6.1.orig/data/xinput.sh.in.in imsettings-1.6.1/data/xinput.sh.in.in
|
||||||
|
--- imsettings-1.6.1.orig/data/xinput.sh.in.in 2013-04-03 16:26:39.000000000 +0900
|
||||||
|
+++ imsettings-1.6.1/data/xinput.sh.in.in 2013-04-03 19:22:31.000000000 +0900
|
||||||
|
@@ -52,8 +52,22 @@ if [ -r "$USER_XINPUTRC" -a "x$IMSETTING
|
||||||
|
SHORT_DESC="User Specific"
|
||||||
|
fi
|
||||||
|
elif [ -r "$SYS_XINPUTRC" ]; then
|
||||||
|
- source "$SYS_XINPUTRC"
|
||||||
|
- READ_XINPUTRC=$SYS_XINPUTRC
|
||||||
|
+ # FIXME: This hardcoded list has to be gone in the future.
|
||||||
|
+ _language_list="as bn gu hi ja kn ko mai ml mr ne or pa si ta te th ur vi zh"
|
||||||
|
+ _sourced_xinputrc=0
|
||||||
|
+ for i in $_language_list; do
|
||||||
|
+ if echo $tmplang | grep -q -E "^$i"; then
|
||||||
|
+ source "$SYS_XINPUTRC"
|
||||||
|
+ READ_XINPUTRC=$SYS_XINPUTRC
|
||||||
|
+ _sourced_xinputrc=1
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ if [ $_sourced_xinputrc -eq 0 ]; then
|
||||||
|
+ # Read none.conf to set up properly for locales not listed the above.
|
||||||
|
+ source @XINPUT_PATH@/none.conf
|
||||||
|
+ READ_XINPUTRC=@XINPUT_PATH@/none.conf
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -z "$IMSETTINGS_INTEGRATE_DESKTOP" ] && IMSETTINGS_INTEGRATE_DESKTOP=yes
|
||||||
19
imsettings-disable-xim.patch
Normal file
19
imsettings-disable-xim.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff -pruN imsettings-1.6.1.orig/data/imsettings-functions.in imsettings-1.6.1/data/imsettings-functions.in
|
||||||
|
--- imsettings-1.6.1.orig/data/imsettings-functions.in 2013-04-03 16:26:45.000000000 +0900
|
||||||
|
+++ imsettings-1.6.1/data/imsettings-functions.in 2013-04-03 19:20:35.000000000 +0900
|
||||||
|
@@ -160,10 +160,11 @@ function is_qt_supported() {
|
||||||
|
}
|
||||||
|
|
||||||
|
function is_xim_supported() {
|
||||||
|
- [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
|
||||||
|
- if check_imsettings_capability xim; then
|
||||||
|
- return 0
|
||||||
|
- fi
|
||||||
|
+# XXX: Disable XIM support so far
|
||||||
|
+# [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
|
||||||
|
+# if check_imsettings_capability xim; then
|
||||||
|
+# return 0
|
||||||
|
+# fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
39
imsettings-fix-unbound-var.patch
Normal file
39
imsettings-fix-unbound-var.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From e8dab09d0f47c6030878c89e6db7168af9f7e009 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Akira TAGOH <akira@tagoh.org>
|
||||||
|
Date: Wed, 10 Jan 2018 21:29:26 +0900
|
||||||
|
Subject: [PATCH] Fix unbound variable issue
|
||||||
|
|
||||||
|
---
|
||||||
|
data/xinput.sh.in.in | 2 +-
|
||||||
|
data/xinputinfo.sh.in | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/data/xinput.sh.in.in b/data/xinput.sh.in.in
|
||||||
|
index e8e99ee..f56e57a 100755
|
||||||
|
--- a/data/xinput.sh.in.in
|
||||||
|
+++ b/data/xinput.sh.in.in
|
||||||
|
@@ -38,7 +38,7 @@ tmplang=${LC_CTYPE:-${LANG:-"en_US.UTF-8"}}
|
||||||
|
# unset env vars to be safe
|
||||||
|
unset AUXILIARY_PROGRAM AUXILIARY_ARGS GTK_IM_MODULE ICON IMSETTINGS_IGNORE_ME LONG_DESC NOT_RUN PREFERENCE_PROGRAM PREFERENCE_ARGS QT_IM_MODULE SHORT_DESC XIM XIM_PROGRAM XIM_ARGS XMODIFIERS
|
||||||
|
|
||||||
|
-[ -z "$IMSETTINGS_DISABLE_USER_XINPUTRC" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
|
||||||
|
+[ -z "${IMSETTINGS_DISABLE_USER_XINPUTRC-}" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
|
||||||
|
|
||||||
|
# migrate old configuration file
|
||||||
|
[ ! -d $CONFIGDIR ] && mkdir -p $CONFIGDIR || :
|
||||||
|
diff --git a/data/xinputinfo.sh.in b/data/xinputinfo.sh.in
|
||||||
|
index 9802392..2ce5b20 100755
|
||||||
|
--- a/data/xinputinfo.sh.in
|
||||||
|
+++ b/data/xinputinfo.sh.in
|
||||||
|
@@ -56,7 +56,7 @@ if [ $# -gt 0 ]; then
|
||||||
|
source $1
|
||||||
|
IMSETTINGS_FILENAME=$1
|
||||||
|
else
|
||||||
|
- [ -z "$IMSETTINGS_DISABLE_USER_XINPUTRC" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
|
||||||
|
+ [ -z "${IMSETTINGS_DISABLE_USER_XINPUTRC-}" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
|
||||||
|
|
||||||
|
if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
|
||||||
|
source "$USER_XINPUTRC"
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
||||||
23
imsettings-force-enable-for-cinnamon.patch
Normal file
23
imsettings-force-enable-for-cinnamon.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff -pruN imsettings-1.6.6.orig/data/imsettings-target-checker.sh.in imsettings-1.6.6/data/imsettings-target-checker.sh.in
|
||||||
|
--- imsettings-1.6.6.orig/data/imsettings-target-checker.sh.in 2013-10-10 20:15:29.000000000 +0900
|
||||||
|
+++ imsettings-1.6.6/data/imsettings-target-checker.sh.in 2013-10-10 20:44:39.000000000 +0900
|
||||||
|
@@ -89,19 +89,6 @@ case $(get_desktop) in
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
- cinnamon*)
|
||||||
|
- dbus_send 'org.Cinnamon' '/' 'org.freedesktop.DBus.Peer.Ping'
|
||||||
|
- if [ $? = 0 ]; then
|
||||||
|
- if gsettings_get_bool org.cinnamon.settings-daemon.plugins.keyboard active; then
|
||||||
|
- log "** org.cinnamon.settings-daemon.plugins.keyboard.active is true. imsettings is going to be disabled."
|
||||||
|
- exit 0
|
||||||
|
- else
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
- else
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
- ;;
|
||||||
|
*)
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
36
imsettings-xinput-xcompose.patch
Normal file
36
imsettings-xinput-xcompose.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff -pruN imsettings-1.6.1.orig/data/xinput.sh.in.in imsettings-1.6.1/data/xinput.sh.in.in
|
||||||
|
--- imsettings-1.6.1.orig/data/xinput.sh.in.in 2013-04-03 19:23:22.000000000 +0900
|
||||||
|
+++ imsettings-1.6.1/data/xinput.sh.in.in 2013-04-03 19:23:50.000000000 +0900
|
||||||
|
@@ -53,9 +53,10 @@ if [ -r "$USER_XINPUTRC" -a "x$IMSETTING
|
||||||
|
fi
|
||||||
|
elif [ -r "$SYS_XINPUTRC" ]; then
|
||||||
|
# FIXME: This hardcoded list has to be gone in the future.
|
||||||
|
- _language_list="as bn gu hi ja kn ko mai ml mr ne or pa si ta te th ur vi zh"
|
||||||
|
+ # Locales that normally use input-method for native input
|
||||||
|
+ _im_language_list="as bn gu hi ja kn ko mai ml mr ne or pa si ta te th ur vi zh"
|
||||||
|
_sourced_xinputrc=0
|
||||||
|
- for i in $_language_list; do
|
||||||
|
+ for i in $_im_language_list; do
|
||||||
|
if echo $tmplang | grep -q -E "^$i"; then
|
||||||
|
source "$SYS_XINPUTRC"
|
||||||
|
READ_XINPUTRC=$SYS_XINPUTRC
|
||||||
|
@@ -63,6 +64,19 @@ elif [ -r "$SYS_XINPUTRC" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
+ # Locales that usually use X locale compose
|
||||||
|
+ # FIXME: which other locales should be included here?
|
||||||
|
+ if [ $_sourced_xinputrc -eq 0 ]; then
|
||||||
|
+ _xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU"
|
||||||
|
+ for i in $_xcompose_language_list; do
|
||||||
|
+ if echo $tmplang | grep -q -E "^$i"; then
|
||||||
|
+ source @XINPUT_PATH@/xcompose.conf
|
||||||
|
+ READ_XINPUTRC=@XINPUT_PATH@/xcompose.conf
|
||||||
|
+ _sourced_xinputrc=1
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ fi
|
||||||
|
if [ $_sourced_xinputrc -eq 0 ]; then
|
||||||
|
# Read none.conf to set up properly for locales not listed the above.
|
||||||
|
source @XINPUT_PATH@/none.conf
|
||||||
146
imsettings.spec
Normal file
146
imsettings.spec
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
Name: imsettings
|
||||||
|
Version: 1.7.3
|
||||||
|
Release: 7
|
||||||
|
License: LGPLv2+
|
||||||
|
Summary: Delivery framework for general Input Method configuration
|
||||||
|
URL: https://bitbucket.org/tagoh/imsettings/src/master/
|
||||||
|
Source0: https://bitbucket.org/tagoh/imsettings/downloads/imsettings-%{version}.tar.bz2
|
||||||
|
Patch0000: imsettings-constraint-of-language.patch
|
||||||
|
Patch0001: imsettings-disable-xim.patch
|
||||||
|
Patch0002: imsettings-xinput-xcompose.patch
|
||||||
|
Patch0003: imsettings-force-enable-for-cinnamon.patch
|
||||||
|
Patch0004: imsettings-fix-unbound-var.patch
|
||||||
|
BuildRequires: desktop-file-utils intltool gettext libtool automake autoconf glib2 >= 2.32.0 gobject-introspection-devel
|
||||||
|
BuildRequires: libnotify-devel libX11-devel libgxim-devel >= 0.5.0 gtk3-devel >= 3.3.3
|
||||||
|
Requires: xorg-x11-xinit >= 1.0.2-22
|
||||||
|
Requires: imsettings-desktop-module = %{version}-%{release}
|
||||||
|
Requires(post): systemd %{_sbindir}/alternatives
|
||||||
|
Requires(postun): systemd %{_sbindir}/alternatives
|
||||||
|
Provides: imsettings-libs = %{version}-%{release}
|
||||||
|
Obsoletes: imsettings-libs < %{version}-%{release}
|
||||||
|
%global _description \
|
||||||
|
IMSettings is a framework that delivers Input Method settings and\
|
||||||
|
applies the changes so they take effect immediately without any\
|
||||||
|
need to restart applications or the desktop.\
|
||||||
|
|
||||||
|
|
||||||
|
%description %_description
|
||||||
|
Shared library for imsettings and the core DBus services and some utilities.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for imsettings
|
||||||
|
Requires: imsettings = %{version}-%{release} pkgconfig glib2-devel >= 2.32.0
|
||||||
|
|
||||||
|
%description devel %_description
|
||||||
|
Development files to make any applications with imsettings.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Help documentation for the imsettings
|
||||||
|
|
||||||
|
%description help
|
||||||
|
Help documentation for the imsettings.
|
||||||
|
|
||||||
|
%package xim
|
||||||
|
Summary: XIM support on imsettings
|
||||||
|
Requires: imsettings = %{version}-%{release} im-chooser
|
||||||
|
|
||||||
|
%description xim %_description
|
||||||
|
A module to get this working with XIM.
|
||||||
|
|
||||||
|
%package gsettings
|
||||||
|
Summary: GSettings support on imsettings
|
||||||
|
Requires: imsettings = %{version}-%{release} dconf
|
||||||
|
Provides: imsettings-desktop-module = %{version}-%{release} imsettings-gnome = %{version}-%{release}
|
||||||
|
Obsoletes: imsettings-gnome < 1.5.1-3
|
||||||
|
|
||||||
|
%description gsettings %_description
|
||||||
|
A module to get this working on GNOME and Cinnamon which requires
|
||||||
|
GSettings in their own XSETTINGS daemons.
|
||||||
|
|
||||||
|
%package qt
|
||||||
|
Summary: Qt support on imsettings
|
||||||
|
Requires: imsettings = %{version}-%{release} im-chooser
|
||||||
|
Provides: imsettings-desktop-module%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description qt %_description
|
||||||
|
A module to get this working on Qt applications.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoreconf -f
|
||||||
|
%configure --with-xinputsh=50-xinput.sh --disable-static --disable-schemas-install
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
for i in %{_libexecdir}/imsettings-target-checker %{_libexecdir}/xinputinfo \
|
||||||
|
%{_sysconfdir}/X11/xinit/xinitrc.d/50-xinput;
|
||||||
|
do
|
||||||
|
chmod 0755 $RPM_BUILD_ROOT$i.sh
|
||||||
|
done
|
||||||
|
|
||||||
|
%delete_la
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/imsettings/libimsettings-{gconf,mateconf}.so
|
||||||
|
desktop-file-validate $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/imsettings-start.desktop
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/imsettings/libimsettings-{lxde,xfce,mate-gsettings,cinnamon-gsettings}.so
|
||||||
|
|
||||||
|
%find_lang imsettings
|
||||||
|
|
||||||
|
%post
|
||||||
|
num=10
|
||||||
|
for i in none xcompose xim;
|
||||||
|
do
|
||||||
|
alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_sysconfdir}/X11/xinit/xinput.d/$i.conf $num
|
||||||
|
let num+=10
|
||||||
|
done
|
||||||
|
systemctl reload dbus.service 2>&1 || :
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [ "$1" = 0 ]; then
|
||||||
|
for i in none xcompose xim;
|
||||||
|
do
|
||||||
|
alternatives --remove xinputrc %{_sysconfdir}/X11/xinit/xinput.d/$i.conf
|
||||||
|
done
|
||||||
|
systemctl reload dbus.service 2>&1 || :
|
||||||
|
fi
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%files -f imsettings.lang
|
||||||
|
%license COPYING
|
||||||
|
%dir %{_libdir}/imsettings
|
||||||
|
%{_bindir}/imsettings-[^x]*
|
||||||
|
%{_libexecdir}/*
|
||||||
|
%{_datadir}/dbus-1/services/*.service
|
||||||
|
%{_datadir}/pixmaps/*.png
|
||||||
|
%{_sysconfdir}/*
|
||||||
|
%{_libdir}/libimsettings.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/imsettings
|
||||||
|
%{_libdir}/libimsettings.so
|
||||||
|
%{_libdir}/pkgconfig/imsettings.pc
|
||||||
|
%{_libdir}/girepository-*/IMSettings-*.typelib
|
||||||
|
%{_datadir}/g*
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%doc AUTHORS ChangeLog NEWS README
|
||||||
|
%{_mandir}/man1/imsettings-*.1*
|
||||||
|
|
||||||
|
%files xim
|
||||||
|
%{_bindir}/imsettings-xim
|
||||||
|
%{_libdir}/imsettings/libimsettings-xim.so
|
||||||
|
|
||||||
|
%files gsettings
|
||||||
|
%{_libdir}/imsettings/libimsettings-gsettings.so
|
||||||
|
|
||||||
|
%files qt
|
||||||
|
%{_libdir}/imsettings/libimsettings-qt.so
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Dec 21 2019 likexin <likexin4@huawei.com> - 1.7.3-6
|
||||||
|
- package init
|
||||||
Loading…
x
Reference in New Issue
Block a user