Accepting request 923267 from home:ftake:branches:M17N

- Enable GTK 4 IM Module for Leap 15.4 and Tumbleweed
- Remove ibus-python-install-dir.patch
  * Not used for build anymore

OBS-URL: https://build.opensuse.org/request/show/923267
OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=257
This commit is contained in:
Takashi Iwai 2021-10-06 06:16:51 +00:00 committed by Git OBS Bridge
parent 6fbec4a187
commit fe8fca61f9
4 changed files with 66 additions and 17 deletions

View File

@ -9,7 +9,7 @@ ibus-gtk
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 --update-cache"
postun "%endif"
supplements "packageand(ibus:gtk2-<targettype>)"
supplements "(ibus and gtk2-<targettype>)"
ibus-gtk3
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-3.0-64 --update-cache"
@ -21,7 +21,21 @@ ibus-gtk3
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-3.0 --update-cache"
postun "%endif"
supplements "packageand(ibus:gtk3-<targettype>)"
supplements "(ibus and gtk3-<targettype>)"
ibus-gtk4
post "if [[ -x <prefix>%{_bindir}/gio-querymodules-64 ]]; then"
post " <prefix>%{_bindir}/gio-querymodules-64 %{_libdir}/gtk-4.0/4.0.0/immodules"
post "else"
post " <prefix>%{_bindir}/gio-querymodules %{_libdir}/gtk-4.0/4.0.0/immodules"
post "fi"
postun "if [ $1 -eq 0 ]; then"
postun " if [[ -x <prefix>%{_bindir}/gio-querymodules-64 ]]; then"
postun " <prefix>%{_bindir}/gio-querymodules-64 %{_libdir}/gtk-4.0/4.0.0/immodules"
postun " else"
postun " <prefix>%{_bindir}/gio-querymodules %{_libdir}/gtk-4.0/4.0.0/immodules"
postun " fi"
postun "fi"
supplements "(ibus and gtk4-<targettype>)"
libibus-1_0-5
obsoletes "libibus2-<targettype> < <version>"

View File

@ -1,13 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 9a502ec..42aaadf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -420,7 +420,7 @@ if test x"$enable_python_library" = x"yes"; then
PYTHON2_PREFIX=`$PYTHON2 -c "import sys; sys.stdout.write(sys.prefix)"`
PYTHON2_VERSION=`$PYTHON2 -c "import sys; sys.stdout.write(sys.version[[:3]])"`
- PYTHON2_LIBDIR="$PYTHON2_PREFIX/lib/python$PYTHON2_VERSION"
+ PYTHON2_LIBDIR="$libdir/python$PYTHON2_VERSION"
python2dir="$PYTHON2_LIBDIR/site-packages"
pkgpython2dir="$python2dir/ibus"
AC_SUBST(pkgpython2dir)

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Oct 3 13:51:18 UTC 2021 - Fuminobu Takeyama <ftake@geeko.jp>
- Enable GTK 4 IM Module for Leap 15.4 and Tumbleweed
- Remove ibus-python-install-dir.patch
* Not used for build anymore
-------------------------------------------------------------------
Wed Sep 8 13:04:55 UTC 2021 - Predrag Ivanović <predivan@mts.rs>

View File

@ -18,6 +18,11 @@
%define with_wayland 1
%define with_emoji 1
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
%define with_gtk4 1
%else
%define with_gtk4 0
%endif
%if ! %{defined _distconfdir}
%define _distconfdir %{_sysconfdir}
%else
@ -39,8 +44,6 @@ Source7: macros.ibus
Source10: ibus-autostart
Source11: ibus-autostart.desktop
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE ibus-python-install-dir.patch ftake@geeko.jp
Patch0: ibus-python-install-dir.patch
# PATFH-FIX-OPENSUSE ibus-xim-fix-re-focus-after-lock.patch bnc#874869 tiwai@suse.de
# Fix lost XIM input after screenlock
Patch4: ibus-xim-fix-re-focus-after-lock.patch
@ -166,6 +169,20 @@ Supplements: (ibus and gtk3)
%description gtk3
This package contains ibus im module for use by gtk3.
%if %{with_gtk4}
%package gtk4
Summary: IBus input method support for gtk4 applications
# on 15.4, both gtk4-devel and gtk4-devel-32bit provide pkgconfig(gtk4)
Group: System/I18n/Chinese
BuildRequires: gtk4-devel
Requires: %{name} = %{version}
Supplements: (ibus and gtk4)
%{gtk4_immodule_requires}
%description gtk4
This package contains ibus im module for use by gtk4.
%endif
%package devel
Summary: Development tools for ibus
Group: Development/Libraries/Other
@ -227,6 +244,9 @@ cp -r %{SOURCE11} .
--enable-wayland \
%endif
--enable-surrounding-text \
%if %{with_gtk4}
--enable-gtk4 \
%endif
--libexecdir=%{_libdir}/ibus
# non-parallel to have reproducible results in spite of non-deterministic build scripts https://github.com/ibus/ibus/issues/2272
@ -301,6 +321,21 @@ dconf update
%postun gtk3
%{gtk3_immodule_postun}
%if %{with_gtk4}
%post gtk4
%{gtk4_immodule_post}
%postun gtk4
#{gtk4_immodule_postun} there is a syntax error in the macro from gtk4-devel
if [ $1 -eq 0 ]; then
if [[ -x %{_bindir}/gio-querymodules-64 ]]; then
%{_bindir}/gio-querymodules-64 %{_libdir}/gtk-4.0/4.0.0/immodules
else
%{_bindir}/gio-querymodules %{_libdir}/gtk-4.0/4.0.0/immodules
fi
fi
%endif
%files
%doc AUTHORS README README.SUSE xim.ibus.suse.template
%license COPYING
@ -376,6 +411,12 @@ dconf update
%files gtk3
%{_libdir}/gtk-3.0/3.0.0/immodules/im-ibus.so
%if %{with_gtk4}
%files gtk4
%dir %{_libdir}/gtk-4.0/4.0.0/immodules
%{_libdir}/gtk-4.0/4.0.0/immodules/libim-ibus.so
%endif
%files devel
%{_libdir}/libibus-1.0.so
%{_includedir}/ibus-1.0