Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830109 - app-i18n/ibus: consider gtk4 IM module support
Summary: app-i18n/ibus: consider gtk4 IM module support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-12-27 18:03 UTC by Mart Raudsepp
Modified: 2022-04-15 19:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2021-12-27 18:03:15 UTC
1.5.24 added IM module for GTK 4, so we should start thinking on supporting that as well. GTK4 is used by various things, and will be very widely used by many GNOME packages by March 2022.
How about adding a default enabled IUSE=+gtk4 to control this for now, as various things do use it already and missing ibus input can be sort of a big deal, I imagine. Meanwhile bug 769107 requests dropping gtk2 support, but not for me to decide if it's time or not - I guess we can keep that until we are ready to last-rite gtk2 (whenever that happens, maybe couple years realistically..), but maybe it's time to default-disable that one as we add gtk4.



I also wonder what happened with the appindicator deps, where it doesn't check for qt anymore in upstream configure?
Comment 1 Mart Raudsepp gentoo-dev 2021-12-27 18:08:11 UTC
I suspect we need to add a gnome2_query_immodules_gtk3 in gnome2-utils.eclass from gnome@ side as well to support this, or do something else. It doesn't look like gtk4 actually has a gtk-query-immodules binary, unlike gtk2 and gtk3, so some things have changed and we need to figure out what's up
Comment 2 Mart Raudsepp gentoo-dev 2021-12-27 18:08:57 UTC
I meant gnome2_query_immodules_gtk4 of course (would be nice to have a changed recorded edit feature for tiny things like that instead of adding a new comment..)
Comment 3 Yixun Lan archtester gentoo-dev 2021-12-28 13:18:59 UTC
(In reply to Mart Raudsepp from comment #0)
> 1.5.24 added IM module for GTK 4, so we should start thinking on supporting
> that as well. GTK4 is used by various things, and will be very widely used
> by many GNOME packages by March 2022.
> How about adding a default enabled IUSE=+gtk4 to control this for now, as
> various things do use it already and missing ibus input can be sort of a big
> deal, I imagine. Meanwhile bug 769107 requests dropping gtk2 support, but
> not for me to decide if it's time or not - I guess we can keep that until we
> are ready to last-rite gtk2 (whenever that happens, maybe couple years
> realistically..), but maybe it's time to default-disable that one as we add
> gtk4.
hey, first I'm not a gnome guru (not even actively using gnome) myself,
but generally, I'd welcome default enabled IUSE=gtk4 if you guys see this feasible, as more things require it..

and I'm not sure when we should drop gtk2, I wont mind keep for some time as long as it doesn't break anything, so let's see..

> 
> 
> 
> I also wonder what happened with the appindicator deps, where it doesn't
> check for qt anymore in upstream configure?
I think the ibus doesn't need qt to build, also see this
https://github.com/ibus/ibus/pull/2194
Comment 4 Arfrever Frehtes Taifersar Arahesis 2022-01-23 03:37:46 UTC
Some relevant commits in GTK 4:

・ https://gitlab.gnome.org/GNOME/gtk/-/commit/c481a773af9b66b6c6efddc89234f2c8bcfdcf52
   "Drop non-backend immodules"

・ https://gitlab.gnome.org/GNOME/gtk/-/commit/29bcc38ae62e73b76f0f663e2ecc5e85bfe4ca46
   "Convert immodules to use an extension point"

   This commit deleted tool gtk4-query-immodules
   (which existed in earlier history of GTK 4).

・ https://gitlab.gnome.org/GNOME/gtk/-/commit/15cc20e7b5d46656b83a39f086650555e369aa1b
   "Always include platform immodules"

   This commit moved code of some immodules to libgtk-4.so.

・ https://gitlab.gnome.org/GNOME/gtk/-/commit/ca794f909aa5c67822ae6575c5cfab55f3763bd1
   "Update docs for immodules"

・ https://gitlab.gnome.org/GNOME/gtk/-/commit/cc6d60afa436693ad9026eff7182b3b3ac9277ae
   "Use gio-querymodules"

   This commit added calls to tool gio-querymodules (from dev-libs/glib).

   In GTK 4, that code lives in file build-aux/meson/post-install.py:
   https://gitlab.gnome.org/GNOME/gtk/-/blob/4.6.0/meson.build#L903
   https://gitlab.gnome.org/GNOME/gtk/-/blob/4.6.0/build-aux/meson/post-install.py

   When DESTDIR environmental variable is not set, that code would call
   tool gio-querymodules for both:
      /usr/${libdir}/gtk-4.0/4.0.0/immodules
      /usr/${libdir}/gtk-4.0/4.0.0/printbackends

   So besides fixes related to immodules, there may be need to make some fixes
   related to printbackends (probably gui-libs/gtk:4 ebuilds should call gio-querymodules,
   maybe through new eclass function).


About IBus:

Currently ebuild has:
IUSE="... +gtk +gtk2 ...":
   "gtk" means GTK+ 3 here, and it also enables some UI (--enable-setup --enable-ui).
   "gtk2" means GTK+ 2 here, but REQUIRED_USE="... gtk2? ( gtk ) ...".

My suggestions:
- Split UI control to separate USE flag named "gui" (there is now such global USE flag).
- Rename remaining part of "gtk" USE flag to "gtk3":
- Disable "gtk2" USE flag by default.
- Add "gtk4" USE flag enabled by default.

IUSE="... gtk2 +gtk3 +gtk4 +gui ..."
Comment 5 Arfrever Frehtes Taifersar Arahesis 2022-01-23 09:28:04 UTC
(In reply to comment #4)
>    In GTK 4, that code lives in file build-aux/meson/post-install.py

s/GTK 4/GTK 4.6.0/


IBus UI tools are not yet ported to GTK 4:
   https://github.com/ibus/ibus/issues/2373
   https://github.com/ibus/ibus/issues/2375
Comment 6 Larry the Git Cow gentoo-dev 2022-04-15 19:25:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=900033e824860f3ae8d103725196b379e919369f

commit 900033e824860f3ae8d103725196b379e919369f
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-04-14 05:01:19 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-04-15 19:24:58 +0000

    app-i18n/ibus: Add IUSE=+gtk4
    
    Builds the GTK4 IM module; see upstream commit c7928b15 ("Add GTK4 IM
    module") first in v1.5.24.
    
    Closes: https://bugs.gentoo.org/830109
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 app-i18n/ibus/ibus-1.5.26.ebuild | 6 ++++--
 app-i18n/ibus/metadata.xml       | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)