[PATCH 0/3] Build ibus with GTK4

  • Done
  • quality assurance status badge
Details
One participant
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 18 Sep 2022 17:28
(address . guix-patches@gnu.org)
52ca9e62f2178980d2e15734511967b85895fd48.camel@gmail.com
Hi Guix,

after updating my system to the new GNOME 42, I noticed that my ibus input
methods broke. Now obviously, this is due to the bump to GTK4, which is not
an ibus input (yet). To make it one without sending Guix into an endless
loop, a little more is required, though.

Note that this series is as of yet untested; I will test it once I refreshed
all the broken extensions, so I only need to create one VM for all the tests.

Cheers

Liliana Marie Prikler (3):
gnu: Add ibus-minimal.
gnu: sdl2: Use ibus-minimal instead of ibus.
gnu: ibus: Build with GTK4.

gnu/packages/ibus.scm | 17 ++++++++++++++---
gnu/packages/sdl.scm | 2 +-
2 files changed, 15 insertions(+), 4 deletions(-)

--
2.37.3
L
L
Liliana Marie Prikler wrote on 18 Sep 2022 17:16
[PATCH 1/3] gnu: Add ibus-minimal.
(address . 57912@debbugs.gnu.org)
322bbfec64845576b78c91ab349c736e450c535a.camel@gmail.com
* gnu/packages/ibus.scm (ibus-minimal): New variable.
(ibus): Inherit from ibus-minimal.
---
gnu/packages/ibus.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 4be80ecbe0..e4662901f3 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -67,9 +67,10 @@ (define-module (gnu packages ibus)
#:use-module (gnu packages textutils)
#:use-module (gnu packages unicode)
#:use-module (gnu packages xorg)
- #:use-module (gnu packages xdisorg))
+ #:use-module (gnu packages xdisorg)
+ #:use-module (srfi srfi-1))
-(define-public ibus
+(define-public ibus-minimal
(package
(name "ibus")
(version "1.5.27")
@@ -233,7 +234,12 @@ (define-public ibus
input method user interface. It comes with multilingual input support. It
may also simplify input method development.")
(home-page "https://github.com/ibus/ibus/wiki")
- (license lgpl2.1+)))
+ (license lgpl2.1+)
+ (properties '((hidden? . #t)))))
+
+(define-public ibus
+ (package/inherit ibus-minimal
+ (properties (alist-delete 'hidden? (package-properties ibus-minimal)))))
(define-public ibus-libpinyin
(package
--
2.37.3
L
L
Liliana Marie Prikler wrote on 18 Sep 2022 17:27
[PATCH 3/3] gnu: ibus: Build with GTK4.
(address . 57912@debbugs.gnu.org)
126ad2e2966fb72880d8b5955144fc51cbc0f12b.camel@gmail.com
* gnu/packages/ibus.scm (ibus)[arguments]: Add “--enable-gtk4”.
[inputs]: Add gtk and pango-next.
---
gnu/packages/ibus.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (18 lines)
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index e4662901f3..29bfc44e4a 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -239,6 +239,11 @@ (define-public ibus-minimal
(define-public ibus
(package/inherit ibus-minimal
+ (arguments (substitute-keyword-arguments (package-arguments ibus-minimal)
+ ((#:configure-flags flags)
+ #~(cons* "--enable-gtk4" #$flags))))
+ (inputs (modify-inputs (package-inputs ibus-minimal)
+ (prepend gtk pango-next)))
(properties (alist-delete 'hidden? (package-properties ibus-minimal)))))
(define-public ibus-libpinyin
--
2.37.3
L
L
Liliana Marie Prikler wrote on 18 Sep 2022 17:18
[PATCH 2/3] gnu: sdl2: Use ibus-minimal instead of ibus.
(address . 57912@debbugs.gnu.org)
c679b4d4c803ec499857e7e5b309f06c81143184.camel@gmail.com
This prevents an input cycle between GTK -> ffmpeg -> sdl2 -> ibus -> GTK.

* gnu/packages/sdl.scm (sdl2)[inputs]: Replace ibus with ibus-minimal.
---
gnu/packages/sdl.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 2523889a8d..8d1a9613da 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -148,7 +148,7 @@ (define-public sdl2
eudev ;for discovering input devices
fcitx ;helps with CJK input
glib
- ibus
+ ibus-minimal
libxkbcommon
libxcursor ;enables X11 cursor support
wayland
--
2.37.3
L
L
Liliana Marie Prikler wrote on 4 Oct 2022 20:46
Re: [PATCH 3/3] gnu: ibus: Build with GTK4.
(address . 57912-done@debbugs.gnu.org)
8cd201402b6d27781a6510f9ae73a0a9f1a12ee1.camel@gmail.com
Am Sonntag, dem 18.09.2022 um 17:27 +0200 schrieb Liliana Marie
Prikler:
Toggle quote (2 lines)
> * gnu/packages/ibus.scm (ibus)[arguments]: Add “--enable-gtk4”.
> [inputs]: Add gtk and pango-next.
Pushed now.

The reason this took so long was because the ibus registry really hates
me. See also https://issues.guix.gnu.org/22707. The series of
command that led me to success was

$ rm ~/.cache/ibus -rf
$ ibus write-cache
$ pkill ibus
$ ibus-setup

Note that this was more or less required thanks to a stale cache and
not due to the lack of GTK4 support; the GTK4 support just makes it so
that GTK4 apps can actually use ibus.

Hopefully there's a more sane way to do this and hopefully this isn't
required per reboot.

Cheers
Closed
?