[PATCH]: Update GTK to 4.6.1.

  • Done
  • quality assurance status badge
Details
4 participants
  • Zhu Zihao
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Zhu Zihao
Severity
normal
Z
Z
Zhu Zihao wrote on 5 Mar 2022 16:00
(address . guix-patches@gnu.org)
86pmn04f4s.fsf@163.com
These patches add pango 1.50.4 and update GTK to 4.6.1.

I've test the celluloid and gnome-todo and they builts
successfully(depends on GTK4).

I also want to update libadwaita to 1.0.2, but it breaks gnome-todo.
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYiN7YxUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/l5/wD+MRikt5Mum9cdF/gW1J7z+WR5jW9W
wpHffHeuhjnoemQBAMuUI0JPUIpRwlUAcM0oD157iO1VWo6Y3dxOksNGtJgM
=7BFZ
-----END PGP SIGNATURE-----

From cdad10dfd07b2007d5b2d76098a4a36ab62ce3ec Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 5 Mar 2022 21:36:25 +0800
Subject: [PATCH 1/2] gnu: pango: Add version 1.50.4.

* gnu/packages/gtk.scm(pango-1.50): New variable.
---
gnu/packages/gtk.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 29302051c1..b9f8bc324f 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -409,6 +410,22 @@ (define-public pango
(home-page "https://pango.gnome.org/")
(license license:lgpl2.0+)))
+;; TODO: Make this the default package next in release cycle.
+(define-public pango-1.50
+ (package
+ (inherit pango)
+ (name "pango")
+ (version "1.50.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/pango/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (patches (search-patches "pango-skip-libthai-test.patch"))
+ (sha256
+ (base32
+ "0qn1a7ccs3p5vc6swbqm6hdzka879l0gp9220lq4bcf2gpl67bgl"))))))
+
(define-public pango-1.42
(package
(inherit pango)
--
2.34.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
Z
Z
Zhu Zihao wrote on 5 Mar 2022 16:55
Re: bug#54261: Acknowledgement ([PATCH]: Update GTK to 4.6.1.)
(address . 54261@debbugs.gnu.org)
864k4c4cmv.fsf@163.com
Typo: next in release cycle -> in next release cyle.

Maybe call pango-1.50 'pango-next'?
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYiOICBUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/kIWgD/X6RVNC8r9+N/qadzLUplvdxzSVHc
Ge6nqJp4IBHdf1oA/i1KTbemIJCR/8bBs2+YZ2CFPT1rRJGoRDjzor10KOYA
=Dewq
-----END PGP SIGNATURE-----

Z
Z
Zhu Zihao wrote on 11 Mar 2022 16:15
(address . 54261@debbugs.gnu.org)
86ilsky0xb.fsf@163.com
ping.
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYitn0BUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/nXigEAtZ+m/6thyiUCSGon+vQ4xvBxdVf4
8sHlEHpApb4nTDYBALbnmYNaFL/O6Jf309umQbsSs6spcTKUymosNx9ywwYM
=ig8G
-----END PGP SIGNATURE-----

From bd53ac3a162c1f5b53363126c125d826a5cb6a6e Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 5 Mar 2022 21:36:25 +0800
Subject: [PATCH 1/2] gnu: pango: Add version 1.50.4.

* gnu/packages/gtk.scm(pango-next): New variable.
---
gnu/packages/gtk.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 29302051c1..bc7b388a88 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -409,6 +410,22 @@ (define-public pango
(home-page "https://pango.gnome.org/")
(license license:lgpl2.0+)))
+;; TODO: Make this the default package in next release cycle.
+(define-public pango-next
+ (package
+ (inherit pango)
+ (name "pango")
+ (version "1.50.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/pango/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (patches (search-patches "pango-skip-libthai-test.patch"))
+ (sha256
+ (base32
+ "0qn1a7ccs3p5vc6swbqm6hdzka879l0gp9220lq4bcf2gpl67bgl"))))))
+
(define-public pango-1.42
(package
(inherit pango)
--
2.34.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
M
M
Maxime Devos wrote on 11 Mar 2022 16:59
Re: [bug#54261] Acknowledgement ([PATCH]: Update GTK to 4.6.1.)
8ff719da21c68f30093d4825d8491f0a6f9b92ba.camel@telenet.be
Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]:
Toggle quote (3 lines)
> +;; TODO: Make this the default package in next release cycle.
> +(define-public pango-next

Did you mean core-updates cycle here?

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYitx2RccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jk/AP4t35kEi861T6xaG1oucPn5cxuj
2acqhEvV/DcO8rNWqwEA1mWPObweY7YVet63PgXlt0GwJw3NTY0tvJyeIesIZAY=
=Ob3T
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 11 Mar 2022 17:01
149614fb88e1afab846783a5d3b1bbe0bde640f0.camel@telenet.be
Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]:
Toggle quote (6 lines)
> +(define-public pango-next
> +  (package
> +    (inherit pango)
> +    (name "pango")
> +    (version "1.50.4")

Due to pkg-config requiring propagation (*), this can probably
unfortunately often cause profile collisions.

Greetings,
Maxime

(*) Could be avoided by symlinking pkg-config files into the pkg-config
directories of their dependent libraries, as suggested by lilyp.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYityTBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kepAP0bLDtRo+8qvQZmr9y85JGUjbyx
CZq0CxTlDLKRHLSBiQD+Iah4LiiZfhNJ0+w6uIqhFritsjdLWgCKDWtiWa/fWAE=
=cDCS
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 11 Mar 2022 17:03
908be0498b9d2aa2d76f897c5f5f45ffe5261a71.camel@telenet.be
Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]:
Toggle quote (3 lines)
> -       ("pango" ,pango)
> +       ("pango" ,pango-next)

What if a program uses both 'pango' and gtk? Then IIUC, it would
simultanuously use pango and pango-next in the same process, which can
easily cause problems (see e.g. the bug report about segfaults
involving multiple libcairos).

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYityzBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iBKAQCjSbS2ZjuJ7wXruK9bR6WR+rqG
yO5AX0Wx2TciNVb8hgEAtMOQX5wt1z3hYo9d9mmIyAbaVV/e5ba1Ca0Q/ne1nAQ=
=qejG
-----END PGP SIGNATURE-----


Z
Z
Zhu Zihao wrote on 12 Mar 2022 03:38
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54261@debbugs.gnu.org)
865yojnb25.fsf@163.com
Yes, so many packages depend on pango, we'd better to update it in 'core-updates'.

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (19 lines)
> [[PGP Signed Part:Undecided]]
> Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]:
>> +(define-public pango-next
>> +  (package
>> +    (inherit pango)
>> +    (name "pango")
>> +    (version "1.50.4")
>
> Due to pkg-config requiring propagation (*), this can probably
> unfortunately often cause profile collisions.
>
> Greetings,
> Maxime
>
> (*) Could be avoided by symlinking pkg-config files into the pkg-config
> directories of their dependent libraries, as suggested by lilyp.
>
> [[End of PGP Signed Part]]

Not only for pkg-config files, but also for headers.

For example, the header of gtk4 may have following lines

#include <pango.h>

Toggle quote (5 lines)
> What if a program uses both 'pango' and gtk? Then IIUC, it would
> simultanuously use pango and pango-next in the same process, which can
> easily cause problems (see e.g. the bug report about segfaults
> involving multiple libcairos).

If package A propagates C@1.0 and package B propagates C@2.0. Guix will
raise an error. However, it doesn't care about something like

guix shell gtk pango@1.48

IDK which pango will win the game.

suggest to introduce priority mechanism like Nix. But Ludovic Courtès
doesn't accept my suggestion.

--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYiwJQhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/mxBQEAqTbEzBsxLhuFSOOESbsrZjz71M0K
ecp9PlXDsKMNc78BAL2b28c88aZZw5PQpcvXJjCPFqSv2bP5dkjywxpyGiMK
=wEmu
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 12 Mar 2022 10:17
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 54261@debbugs.gnu.org)
92b1ba8ff3cb574dae5e642186b25bf204829b2d.camel@telenet.be
Zhu Zihao schreef op za 12-03-2022 om 10:38 [+0800]:
Toggle quote (12 lines)
> > (*) Could be avoided by symlinking pkg-config files into the pkg-
> config
> > directories of their dependent libraries, as suggested by lilyp.
> >
> > [[End of PGP Signed Part]]
>
> Not only for pkg-config files, but also for headers.
>
> For example, the header of gtk4 may have following lines
>
> #include <pango.h>

This is getting a little off-topic, but for headers, symlinking is not
necessary, pango.h could be automatically replaced by the absolute file
name /gnu/store/.../include/pango.h in gtk4's header, see attachement.
(Idea suggested by lilyp on IRC). It needs some more work though,
see TODO's and lack of documentation.

Greetings,
Maxime.
;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (guix build absolute-inclusions) #:export (absolute-inclusions patch-header-inclusions) #:use-module (guix build utils) #:use-module (ice-9 match) #:use-module (rnrs exceptions)) (define (absolute-inclusions files header-locations) (substitute* files (("#include <(.*)>" original header-name) (guard (c ((search-error? c) original)) ;; TODO: libgcc & etc, maybe avoid increasing the closure size ;; by skipping glibc headers ... (format #f "#include <~a>" (search-input-file header-locations (string-append "include/" header-name))))))) (define* (patch-header-inclusions #:key inputs outputs #:allow-other-keys) "Patch inclusions in C headers in OUTPUTS to use absolute file names." (define header-locations (append outputs inputs)) (define header-file? (file-name-predicate "\\.(h|hpp)$")) (for-each (match-lambda ((_ . output) (absolute-inclusions (find-files (string-append output "/include") header-file?) header-locations))) outputs))
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYixlQxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7juOAP9NmvNFb2BQ+r8H69ZVHQHn6yNz
8i9B9fuOZlhI5ETIEgEA+BARbLfDPTpW8na8nNqUHxpu+wlC+vN/ucH9LMkmZw4=
=Bpl6
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 12 Mar 2022 10:32
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 54261@debbugs.gnu.org)
1d1cc9a4a82aec7dd23e954fa0a68167c5806a07.camel@telenet.be
Zhu Zihao schreef op za 12-03-2022 om 10:38 [+0800]:
Toggle quote (14 lines)
> > What if a program uses both 'pango' and gtk?  Then IIUC, it would
> > simultanuously use pango and pango-next in the same process, which
> can
> > easily cause problems (see e.g. the bug report about segfaults
> > involving multiple libcairos).
>
> If package A propagates C@1.0 and package B propagates C@2.0. Guix
> will
> raise an error. However, it doesn't care about something like
>
> guix shell gtk pango@1.48
>
> IDK which pango will win the game.

'guix install' and 'guix shell' might not care, but how would this stop
the segfaults caused by multiple versions of the same library in the
same process?

Also, gtk currently propagates pango@1.48.0, the same pango as
pango@1.48, so this doesn't seem a good test to me.

Instead:

$ guix shell gtk pango@1.42.4

Looks like $GUIX_ENVIRONMENT/share/doc/ only contains pango-1.42.4 and
not pango-1.48. Looks like a bug?

Next I tried:

$ guix shell pango@1.42.4 pango@1.48

this also does not complain and the share/doc only contains pango@42.4.
Also looks buggy? I'll send a bug report.

Toggle quote (5 lines)
>
> I've asked in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44327 and
> suggest to introduce priority mechanism like Nix. But Ludovic Courtès
> doesn't accept my suggestion

How could a priority mechanism solve the segfaults?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYixoxRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mUUAQD4sW8h+W3/LevS01QAQQu2zriY
U8NfbyfOpegIHLeuWwEA/4lNpMVM176dtVbQiorlO43HstE8gKlBIywUyZdnhwI=
=75VT
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 12 Mar 2022 10:40
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 54261@debbugs.gnu.org)
d21eed2fd1d4de89b13bf0111bda97a542fbded3.camel@telenet.be
Maxime Devos schreef op za 12-03-2022 om 10:32 [+0100]:
Toggle quote (4 lines)
> this also does not complain and the share/doc only contains
> pango@42.4.
> Also looks buggy?  I'll send a bug report.

Nevermind about the second part, looks like pango does not have a
share/doc directory.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYixqcBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tczAQDWFrV2D0mlDPev6IY3tbvbfnW7
SNue/zmxZP7iczbH0wD+N0oBD0/BShgptSSYZZpeDxNNpM8jNI7yOUddijDzzgA=
=15R7
-----END PGP SIGNATURE-----


Z
Z
Zhu Zihao wrote on 15 Mar 2022 16:42
Re: bug#54261: Acknowledgement ([PATCH]: Update GTK to 4.6.1.)
(address . 54261@debbugs.gnu.org)
8635jjfcgz.fsf@163.com
Also update gtkmm and pangomm.
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYjC0HBUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/n4HwD/UT/TzpMMLXuanDSgrPILNKqKU2Ip
eCy8Hcwe494e1NoA+gMRKLIdAZt12+fvZmzbZYmA/+YJp2caENhl+JWuF10G
=K6bl
-----END PGP SIGNATURE-----

From bd53ac3a162c1f5b53363126c125d826a5cb6a6e Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 5 Mar 2022 21:36:25 +0800
Subject: [PATCH 1/4] gnu: pango: Add version 1.50.4.

* gnu/packages/gtk.scm(pango-next): New variable.
---
gnu/packages/gtk.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 29302051c1..bc7b388a88 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -409,6 +410,22 @@ (define-public pango
(home-page "https://pango.gnome.org/")
(license license:lgpl2.0+)))
+;; TODO: Make this the default package in next release cycle.
+(define-public pango-next
+ (package
+ (inherit pango)
+ (name "pango")
+ (version "1.50.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/pango/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (patches (search-patches "pango-skip-libthai-test.patch"))
+ (sha256
+ (base32
+ "0qn1a7ccs3p5vc6swbqm6hdzka879l0gp9220lq4bcf2gpl67bgl"))))))
+
(define-public pango-1.42
(package
(inherit pango)
--
2.34.0
From 216abd161ce06d49f7586203281dcf1ba523a8af Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Tue, 15 Mar 2022 22:39:43 +0800
Subject: [PATCH 3/4] gnu: pangomm: Update to 2.50.0.

* gnu/packages/gtk.scm (pangomm): Update to 2.50.0.

[propagated-inputs]: Replace 'pango' with 'pango-next'.
---
gnu/packages/gtk.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 3d7706b9ee..2ee273229f 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1627,7 +1627,7 @@ (define-public cairomm-1.14
(define-public pangomm
(package
(name "pangomm")
- (version "2.48.0")
+ (version "2.50.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1635,7 +1635,7 @@ (define-public pangomm
name "-" version ".tar.xz"))
(sha256
(base32
- "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
+ "0nrvvf1fyzlimh7rvxcblnrvn2l9rz8mpn2iwzlzr6kv05zafym2"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
@@ -1664,7 +1664,7 @@ (define-public pangomm
("python" ,python)
("xsltproc" ,libxslt)))
(propagated-inputs
- (list cairo cairomm glibmm pango))
+ (list cairo cairomm glibmm pango-next))
(home-page "https://pango.gnome.org//")
(synopsis "C++ interface to the Pango text rendering library")
(description
--
2.34.0
From dc4aabc7831c00526f0b2b2c3e69cab4aa5f3459 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Tue, 15 Mar 2022 22:40:27 +0800
Subject: [PATCH 4/4] gnu: gtkmm: Update to 4.6.0.

* gnu/packages/gtk.scm (gtkmm): Update to 4.6.0.
---
gnu/packages/gtk.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 2ee273229f..75d4120e7e 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1760,7 +1760,7 @@ (define-public atkmm-2.28
(define-public gtkmm
(package
(name "gtkmm")
- (version "4.4.0")
+ (version "4.6.0")
(source
(origin
(method url-fetch)
@@ -1769,7 +1769,7 @@ (define-public gtkmm
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f"))))
+ (base32 "07sch42iavk5fw3r9x5m0kb2l4xg1ch3vn85mksiwmybjf8a0lqk"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
--
2.34.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
L
L
Ludovic Courtès wrote on 18 Mar 2022 23:48
Re: bug#54261: [PATCH]: Update GTK to 4.6.1.
(name . Zhu Zihao)(address . all_but_last@163.com)
87y216op22.fsf_-_@gnu.org
Hi,

The patches all LGTM, but unfortunately they break fcitx5-gtk, which
pulls in both ‘pango’ and ‘pango-next’, leading to:

Toggle snippet (15 lines)
-- Checking for module 'gtk+-3.0'
-- Found gtk+-3.0, version 3.24.30
-- Checking for module 'gdk-3.0'
-- Found gdk-3.0, version 3.24.30
-- Checking for module 'gdk-x11-3.0'
-- Found gdk-x11-3.0, version 3.24.30
-- Checking for module 'gtk4>=4.2'
-- Package 'gtk4' requires 'pango >= 1.50.0' but version of pango is 1.48.10
CMake Error at /gnu/store/zga679c4nldah9l8dhd5a4hdy820hcyf-cmake-minimal-3.21.4/share/cmake-3.21/Modules/FindPkgConfig.cmake:562 (message):
A required package was not found
Call Stack (most recent call first):
/gnu/store/zga679c4nldah9l8dhd5a4hdy820hcyf-cmake-minimal-3.21.4/share/cmake-3.21/Modules/FindPkgConfig.cmake:784 (_pkg_check_modules_internal)
gtk4/CMakeLists.txt:10 (pkg_check_modules)

Solutions that come to mind:

1. Disable the GTK 4 backend of ‘fcitx5-gtk’.

2. Add ‘pango-next’ as an input of ‘fcitx5-gtk’, taking precedence
over ‘pango’, at the risk of breaking the GTK+2 and GTK+3
backends.

3. There is no 3rd idea.

Thoughts?

Ludo’.
Z
Z
Zhu Zihao wrote on 19 Mar 2022 04:00
(name . Ludovic Courtès)(address . ludo@gnu.org)
86mthmtzk5.fsf@163.com
Ludovic Courtès <ludo@gnu.org> writes:


Toggle quote (6 lines)
> 3. There is no 3rd idea.
>
> Thoughts?
>
> Ludo’.

3. I'll reconsider your proposal in recent fcitx5-gtk update that split
the gtk4 backend into a separated package.

--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYjVHuhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/ls+AEAwyrms2le2VUe2oGEFomvHRG4j2c+
HoQhUtLusxBEBYEBANRTWdSv9OiTasWSXqOj0RCpJBr7/hr67+4z7Yx6BsoI
=h0Xa
-----END PGP SIGNATURE-----

Z
Z
Zhu Zihao wrote on 21 Mar 2022 02:17
(name . Ludovic Courtès)(address . ludo@gnu.org)
864k3syudv.fsf@163.com
Here is a draft patch, it now works. But some part may need polish.
Can you give me some suggestions? Thanks.
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYjfSrBUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/lx/wD8DvgXDksIy0tL82MRF/kAd/9RmGCn
bTyqCJs0TAfQ/PcBAJW9E61s/piI46aPYzpJWBRWnQTpiIX9WNuifNSKPaQB
=vxy4
-----END PGP SIGNATURE-----

From bd53ac3a162c1f5b53363126c125d826a5cb6a6e Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 5 Mar 2022 21:36:25 +0800
Subject: [PATCH 1/6] gnu: pango: Add version 1.50.4.

* gnu/packages/gtk.scm(pango-next): New variable.
---
gnu/packages/gtk.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 29302051c1..bc7b388a88 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -409,6 +410,22 @@ (define-public pango
(home-page "https://pango.gnome.org/")
(license license:lgpl2.0+)))
+;; TODO: Make this the default package in next release cycle.
+(define-public pango-next
+ (package
+ (inherit pango)
+ (name "pango")
+ (version "1.50.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/pango/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (patches (search-patches "pango-skip-libthai-test.patch"))
+ (sha256
+ (base32
+ "0qn1a7ccs3p5vc6swbqm6hdzka879l0gp9220lq4bcf2gpl67bgl"))))))
+
(define-public pango-1.42
(package
(inherit pango)
--
2.34.0
From 216abd161ce06d49f7586203281dcf1ba523a8af Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Tue, 15 Mar 2022 22:39:43 +0800
Subject: [PATCH 3/6] gnu: pangomm: Update to 2.50.0.

* gnu/packages/gtk.scm (pangomm): Update to 2.50.0.

[propagated-inputs]: Replace 'pango' with 'pango-next'.
---
gnu/packages/gtk.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 3d7706b9ee..2ee273229f 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1627,7 +1627,7 @@ (define-public cairomm-1.14
(define-public pangomm
(package
(name "pangomm")
- (version "2.48.0")
+ (version "2.50.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1635,7 +1635,7 @@ (define-public pangomm
name "-" version ".tar.xz"))
(sha256
(base32
- "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
+ "0nrvvf1fyzlimh7rvxcblnrvn2l9rz8mpn2iwzlzr6kv05zafym2"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
@@ -1664,7 +1664,7 @@ (define-public pangomm
("python" ,python)
("xsltproc" ,libxslt)))
(propagated-inputs
- (list cairo cairomm glibmm pango))
+ (list cairo cairomm glibmm pango-next))
(home-page "https://pango.gnome.org//")
(synopsis "C++ interface to the Pango text rendering library")
(description
--
2.34.0
From dc4aabc7831c00526f0b2b2c3e69cab4aa5f3459 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Tue, 15 Mar 2022 22:40:27 +0800
Subject: [PATCH 4/6] gnu: gtkmm: Update to 4.6.0.

* gnu/packages/gtk.scm (gtkmm): Update to 4.6.0.
---
gnu/packages/gtk.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 2ee273229f..75d4120e7e 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1760,7 +1760,7 @@ (define-public atkmm-2.28
(define-public gtkmm
(package
(name "gtkmm")
- (version "4.4.0")
+ (version "4.6.0")
(source
(origin
(method url-fetch)
@@ -1769,7 +1769,7 @@ (define-public gtkmm
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f"))))
+ (base32 "07sch42iavk5fw3r9x5m0kb2l4xg1ch3vn85mksiwmybjf8a0lqk"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
--
2.34.0
From e1cc0e4054cc34320ed1ff8d35c64bc5db6b0e28 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 21 Mar 2022 09:11:10 +0800
Subject: [PATCH 5/6] gnu: fcitx5-gtk: Remove GTK4 support.

The GTK4 support will be separated and placed in a dedicated package.

* gnu/packages/fcitx5.scm (fcitx5-gtk)[arguments]: Disable GTK4 build.

<configure-flags>: Add "-DENABLE_GTK_IM_MODULE=OFF".

<phases>: In phase "patch-install-prefix", Remove GTK4 code.

[inputs]: Remove package gtk.

[outputs]: Remove output "gtk4".
---
gnu/packages/fcitx5.scm | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
index 0be5e53863..2d5917f3c0 100644
--- a/gnu/packages/fcitx5.scm
+++ b/gnu/packages/fcitx5.scm
@@ -203,7 +203,8 @@ (define-public fcitx5-gtk
#~(list (string-append "-DGOBJECT_INTROSPECTION_GIRDIR="
#$output "/share/gir-1.0")
(string-append "-DGOBJECT_INTROSPECTION_TYPELIBDIR="
- #$output "/lib/girepository-1.0"))
+ #$output "/lib/girepository-1.0")
+ "-DENABLE_GTK4_IM_MODULE=OFF")
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'patch-install-prefix
@@ -216,11 +217,10 @@ (define (split-immodule gtk-version output)
(string-append output "/lib"))))
(let ((gtk2 #$output:gtk2)
- (gtk3 #$output:gtk3)
- (gtk4 #$output:gtk4))
+ (gtk3 #$output:gtk3))
(for-each split-immodule
- '("gtk2" "gtk3" "gtk4")
- (list gtk2 gtk3 gtk4))))))))
+ '("gtk2" "gtk3")
+ (list gtk2 gtk3))))))))
(inputs
(list fcitx5
fmt
@@ -230,12 +230,11 @@ (define (split-immodule gtk-version output)
gobject-introspection
gtk+-2
gtk+
- gtk
glib))
(native-inputs
(list extra-cmake-modules pkg-config
`(,glib "bin"))) ;for glib-genmarshal
- (outputs '("out" "gtk2" "gtk3" "gtk4"))
+ (outputs '("out" "gtk2" "gtk3"))
(home-page "https://github.com/fcitx/fcitx5-gtk")
(synopsis "GLib-based D-Bus client and GTK IM module for Fcitx 5")
(description "Fcitx5-gtk provides the following functionality in the
@@ -248,8 +247,6 @@ (define (split-immodule gtk-version output)
IM module for GTK+2 applications.
@item gtk3
IM module for GTK+3 applications.
-@item gtk4
-IM module for GTK4 applications.
@end table")
(license license:lgpl2.1+)))
--
2.34.0
From 84da7d385c7759fbf9defdfa5e573bfe57c00c4b Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 21 Mar 2022 09:16:38 +0800
Subject: [PATCH 6/6] gnu: Add fcitx5-gtk4.

* gnu/packages/fcitx5.scm (fcitx5-gtk4): New variable.
---
gnu/packages/fcitx5.scm | 42 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
index 2d5917f3c0..be46a5036c 100644
--- a/gnu/packages/fcitx5.scm
+++ b/gnu/packages/fcitx5.scm
@@ -250,6 +250,48 @@ (define (split-immodule gtk-version output)
@end table")
(license license:lgpl2.1+)))
+;; XXX: This package is separated from fcitx5-gtk for following reasons.
+;; 1. GTK4 has a lot more dependencies, some of which maybe unavailable on
+;; platforms other than x86_64. See <https://issues.guix.gnu.org/53648>.
+;; 2. GTK4 now propagates pango@1.50, it will conflict with GTK3 and GTK2
+;; (propagates pango@1.48) if they're all in the inputs of same package.
+;; See <https://issues.guix.gnu.org/54261>.
+(define-public fcitx5-gtk4
+ (package
+ (inherit fcitx5-gtk)
+ (name "fcitx5-gtk4")
+ (arguments
+ (list
+ #:tests? #f ;No test
+ #:configure-flags
+ #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
+ #$(this-package-input "fcitx5-gtk")
+ "/include/Fcitx5/GClient"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-gclient
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define gclient
+ (search-input-file inputs "lib/libFcitx5GClient.so"))
+ ;; Force cmake search libFcitx5GClient.so in library search
+ ;; path instead of compiling again.
+ (substitute* "gtk4/CMakeLists.txt"
+ (("Fcitx5::GClient")
+ gclient))))
+ (add-before 'build 'enter-gtk4-subdirectory
+ (lambda _
+ (chdir "gtk4")))
+ (add-after 'install 'leave-gtk4-subdirectory
+ (lambda _
+ (chdir ".."))))))
+ (inputs
+ (modify-inputs (package-inputs fcitx5-gtk)
+ (delete "gtk+")
+ (prepend fcitx5-gtk gtk)))
+ (outputs '("out"))
+ (synopsis "GTK4 IM module for Fcitx 5")
+ (description "Fcitx5-gtk4 provides IM module for GTK4 applications.")))
+
(define-public fcitx5-qt
(package
(name "fcitx5-qt")
--
2.34.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
Z
Z
Zhu Zihao wrote on 27 Mar 2022 05:04
(name . Ludovic Courtès)(address . ludo@gnu.org)
86bkxsjdso.fsf@163.com
ping. Any thoughts?

--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYj/UZxUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/ksbgD/VcG/3beP8oO4pt0ewVpXHWJFRbRE
HxJOI610iN3pNYoA/R2Is4Hn8MxUIS2JxBEZbjzloaubcWoS1TVTHwgPUkYP
=/2af
-----END PGP SIGNATURE-----

L
L
Liliana Marie Prikler wrote on 27 Mar 2022 09:38
f64f6ccfee268e806b067c30a4e298bebef8c6ec.camel@gmail.com
Am Sonntag, dem 27.03.2022 um 11:04 +0800 schrieb Zhu Zihao:
Toggle quote (3 lines)
>
> ping. Any thoughts?
>
As far as I can see, the main issue (GTK propagating pango-next) has
not been addressed, we're just piling on workarounds. This is not the
way to go, as it will inevitably lead to more conflicts later on.

If possible, I'd suggest trying to build GTK against the old pango,
perhaps with a patch that can be removed on core-updates. WDYT?
Z
Z
Zhu Zihao wrote on 28 Mar 2022 17:37
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
86zglajd3u.fsf@163.com

-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYkHX5RUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/kFugD/RMNlMI/Sd2b1Aw7PKCJNBudwJGIr
mL/+48yZ1UpEOWkBAMNq/HEFhik4TUpM/EiFE7RcpFtcgBfFFKH6PNVKGBYO
=d/Bm
-----END PGP SIGNATURE-----

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (12 lines)
> Am Sonntag, dem 27.03.2022 um 11:04 +0800 schrieb Zhu Zihao:
>>
>> ping. Any thoughts?
>>
> As far as I can see, the main issue (GTK propagating pango-next) has
> not been addressed, we're just piling on workarounds. This is not the
> way to go, as it will inevitably lead to more conflicts later on.
>
> If possible, I'd suggest trying to build GTK against the old pango,
> perhaps with a patch that can be removed on core-updates. WDYT?


Try build GTK 4.6.1 with Pango 1.48 is so tricky IMO. GTK 4.6.1 may use
the API introduced in pango 1.50 series. Currently my idea's make GTK+ 2
& 3 use Pango 1.50. It'll triggeer 3000+ builds, and we can put it to
stage branch (if we update pango, it will trigger 7000+ builds)

--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYkHX8hUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/kq9gD/fIwTDU04PyAF2yC+LDGBeS8/+Gor
0oHP4hTqKsDZ90ABAN4QPi+vwG9RzkaqOU7noUl2k8gQTYMQVtE4GL7nIqAD
=GjVR
-----END PGP SIGNATURE-----

L
L
Liliana Marie Prikler wrote on 28 Mar 2022 20:19
(name . Zhu Zihao)(address . all_but_last@163.com)
dcff552692afa3a74355981249135cec6c0f9922.camel@gmail.com
Am Montag, dem 28.03.2022 um 23:37 +0800 schrieb Zhu Zihao:
Toggle quote (19 lines)
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Am Sonntag, dem 27.03.2022 um 11:04 +0800 schrieb Zhu Zihao:
> > > ping. Any thoughts?
> > As far as I can see, the main issue (GTK propagating pango-next)
> > has not been addressed, we're just piling on workarounds.  This is
> > not the way to go, as it will inevitably lead to more conflicts
> > later on.
> >
> > If possible, I'd suggest trying to build GTK against the old pango,
> > perhaps with a patch that can be removed on core-updates.  WDYT?
>
>
> Try build GTK 4.6.1 with Pango 1.48 is so tricky IMO. GTK 4.6.1 may
> use the API introduced in pango 1.50 series. Currently my idea's make
> GTK+ 2 & 3 use Pango 1.50. It'll triggeer 3000+ builds, and we can
> put it to stage branch (if we update pango, it will trigger 7000+
> builds)
3k rebuilds is still beyond the limit of 1.5k and doesn't address the
main issue (that being propagation).
Z
Z
Zhu Zihao wrote on 29 Mar 2022 07:56
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
865ynxjo3h.fsf@163.com
Ok, just update pango and queue these commits into the core-updates
branch :(

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (24 lines)
> Am Montag, dem 28.03.2022 um 23:37 +0800 schrieb Zhu Zihao:
>>
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>> > Am Sonntag, dem 27.03.2022 um 11:04 +0800 schrieb Zhu Zihao:
>> > > ping. Any thoughts?
>> > As far as I can see, the main issue (GTK propagating pango-next)
>> > has not been addressed, we're just piling on workarounds.  This is
>> > not the way to go, as it will inevitably lead to more conflicts
>> > later on.
>> >
>> > If possible, I'd suggest trying to build GTK against the old pango,
>> > perhaps with a patch that can be removed on core-updates.  WDYT?
>>
>>
>> Try build GTK 4.6.1 with Pango 1.48 is so tricky IMO. GTK 4.6.1 may
>> use the API introduced in pango 1.50 series. Currently my idea's make
>> GTK+ 2 & 3 use Pango 1.50. It'll triggeer 3000+ builds, and we can
>> put it to stage branch (if we update pango, it will trigger 7000+
>> builds)
> 3k rebuilds is still beyond the limit of 1.5k and doesn't address the
> main issue (that being propagation).


--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYkKgQhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/k8OAEAgjCy1w5b38gXJazqsY130D6ZNUBf
xL/teVh6WIAUv08A/jvDU1dsLd+oQCuWR5tBTeFkfRT757q+PZpPMpTeAvsJ
=qvwk
-----END PGP SIGNATURE-----

Z
Z
Zhu Zihao wrote on 29 Mar 2022 08:01
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
864k3hgur1.fsf@163.com
To Ludovic Courtès:

If you think this hack to fcitx5-gtk is bad, I'd like to update to pango
and make these changes on core-updates.


Please tell me your ideas on it. Thanks a lot!
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYkKhUhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/mnvgEAz0aXCm6yo4uf8fDVxUs+uas1c0v0
wL1squqxyXPcjcsBALfXSlG0bp1md+Ffkhnlkry/WIvBcgKmTd/GaKKAsasP
=6EWC
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 29 Mar 2022 15:34
(name . Zhu Zihao)(address . all_but_last@163.com)
87o81oyj9o.fsf@gnu.org
Hi,

Sorry for the delay.

Zhu Zihao <all_but_last@163.com> skribis:

Toggle quote (7 lines)
> From bd53ac3a162c1f5b53363126c125d826a5cb6a6e Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Sat, 5 Mar 2022 21:36:25 +0800
> Subject: [PATCH 1/6] gnu: pango: Add version 1.50.4.
>
> * gnu/packages/gtk.scm(pango-next): New variable.

[...]

Toggle quote (16 lines)
> From 0c22cbd070d47b8c3b534caceb3eb05c8f7f6d41 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Sat, 5 Mar 2022 22:40:46 +0800
> Subject: [PATCH 2/6] gnu: gtk: Update to 4.6.1.
>
> * gnu/local.mk (dist_patch_DATA): Remove gtk-introspection-test.patch.
> * gnu/packages/patches/gtk-introspection-test.patch: Remove.
>
> * gnu/packages/gtk.scm (gtk): Update to 4.6.1.
> [source]: Remove stale patch.
> [arguments]<phases>: Add 'patch-rst2man' phase, correct the binary name of
> rst2man to 'rst2man.py'
> [inputs]: Add libjpeg-turbo, libpng, libtiff.
> [native-inputs]: Add python-docutils.
> [propagated-inputs]: Use pango-next.

[...]

Toggle quote (9 lines)
> From 216abd161ce06d49f7586203281dcf1ba523a8af Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Tue, 15 Mar 2022 22:39:43 +0800
> Subject: [PATCH 3/6] gnu: pangomm: Update to 2.50.0.
>
> * gnu/packages/gtk.scm (pangomm): Update to 2.50.0.
>
> [propagated-inputs]: Replace 'pango' with 'pango-next'.

Only Ardour and gtkmm depend on it; are they find after this change?

Toggle quote (7 lines)
> From dc4aabc7831c00526f0b2b2c3e69cab4aa5f3459 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Tue, 15 Mar 2022 22:40:27 +0800
> Subject: [PATCH 4/6] gnu: gtkmm: Update to 4.6.0.
>
> * gnu/packages/gtk.scm (gtkmm): Update to 4.6.0.

If pangomm and gtkmm are meant to be updated in lockstep, you can merge
patches #3 and #4.

Toggle quote (17 lines)
> From e1cc0e4054cc34320ed1ff8d35c64bc5db6b0e28 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Mon, 21 Mar 2022 09:11:10 +0800
> Subject: [PATCH 5/6] gnu: fcitx5-gtk: Remove GTK4 support.
>
> The GTK4 support will be separated and placed in a dedicated package.
>
> * gnu/packages/fcitx5.scm (fcitx5-gtk)[arguments]: Disable GTK4 build.
>
> <configure-flags>: Add "-DENABLE_GTK_IM_MODULE=OFF".
>
> <phases>: In phase "patch-install-prefix", Remove GTK4 code.
>
> [inputs]: Remove package gtk.
>
> [outputs]: Remove output "gtk4".

Likewise, this one can be merged with the “gtk” package update since
otherwise it would be left temporarily broken.

(Nitpick: no need to leave empty lines like this in the commit log.)

Toggle quote (7 lines)
> From 84da7d385c7759fbf9defdfa5e573bfe57c00c4b Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Mon, 21 Mar 2022 09:16:38 +0800
> Subject: [PATCH 6/6] gnu: Add fcitx5-gtk4.
>
> * gnu/packages/fcitx5.scm (fcitx5-gtk4): New variable.

Sounds good to me.

Liliana suggests using the “old” Pango version, but my understanding is
that it’s not really feasible. Thus, I think the approach above is the
way to go.

Could you send an updated patch taking the cosmetic suggestions above
into account?

Thanks!

Ludo’.
Z
Z
Zhu Zihao wrote on 30 Mar 2022 05:45
(name . Ludovic Courtès)(address . ludo@gnu.org)
86czi4rtfu.fsf@163.com
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (3 lines)
>
> Only Ardour and gtkmm depend on it; are they find after this change?

I've tested ardour, it builds and runs successfully.

Ardour depends on gtkmm-2 (propagates pangomm-2.46) but also add pangomm
to the inputs. I don't know we need pangomm or not.

I also make some minor changes in these patches, Update gtkmm to 4.6.1
and remove atkmm from its propagated-inputs. GTK4 no longer use ATK.
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYkPTNRUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/m34QEAkACbCCUhZd6fo7/64FqleQNN62ny
hg2cDiz7UxKn3IwA/2wiSdl4RGs5vY1JWr/nRi6tIt7kzI2fdVCHNzUvdkAI
=jtGo
-----END PGP SIGNATURE-----

From a9be73a1723810dbcec0c4caa3a9d6669494f6d9 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 5 Mar 2022 21:36:25 +0800
Subject: [PATCH 1/4] gnu: pango 1.50: Add version 1.50.4.

* gnu/packages/gtk.scm(pango-next): New variable.
---
gnu/packages/gtk.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 29302051c1..bc7b388a88 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -409,6 +410,22 @@ (define-public pango
(home-page "https://pango.gnome.org/")
(license license:lgpl2.0+)))
+;; TODO: Make this the default package in next release cycle.
+(define-public pango-next
+ (package
+ (inherit pango)
+ (name "pango")
+ (version "1.50.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/pango/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (patches (search-patches "pango-skip-libthai-test.patch"))
+ (sha256
+ (base32
+ "0qn1a7ccs3p5vc6swbqm6hdzka879l0gp9220lq4bcf2gpl67bgl"))))))
+
(define-public pango-1.42
(package
(inherit pango)
--
2.34.0
From 62a640576ae1de9523fba593219fb50ac97b44c6 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 21 Mar 2022 09:16:38 +0800
Subject: [PATCH 3/4] gnu: Add fcitx5-gtk4.

* gnu/packages/fcitx5.scm (fcitx5-gtk4): New variable.
---
gnu/packages/fcitx5.scm | 42 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
index 2d5917f3c0..be46a5036c 100644
--- a/gnu/packages/fcitx5.scm
+++ b/gnu/packages/fcitx5.scm
@@ -250,6 +250,48 @@ (define (split-immodule gtk-version output)
@end table")
(license license:lgpl2.1+)))
+;; XXX: This package is separated from fcitx5-gtk for following reasons.
+;; 1. GTK4 has a lot more dependencies, some of which maybe unavailable on
+;; platforms other than x86_64. See <https://issues.guix.gnu.org/53648>.
+;; 2. GTK4 now propagates pango@1.50, it will conflict with GTK3 and GTK2
+;; (propagates pango@1.48) if they're all in the inputs of same package.
+;; See <https://issues.guix.gnu.org/54261>.
+(define-public fcitx5-gtk4
+ (package
+ (inherit fcitx5-gtk)
+ (name "fcitx5-gtk4")
+ (arguments
+ (list
+ #:tests? #f ;No test
+ #:configure-flags
+ #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
+ #$(this-package-input "fcitx5-gtk")
+ "/include/Fcitx5/GClient"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-gclient
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define gclient
+ (search-input-file inputs "lib/libFcitx5GClient.so"))
+ ;; Force cmake search libFcitx5GClient.so in library search
+ ;; path instead of compiling again.
+ (substitute* "gtk4/CMakeLists.txt"
+ (("Fcitx5::GClient")
+ gclient))))
+ (add-before 'build 'enter-gtk4-subdirectory
+ (lambda _
+ (chdir "gtk4")))
+ (add-after 'install 'leave-gtk4-subdirectory
+ (lambda _
+ (chdir ".."))))))
+ (inputs
+ (modify-inputs (package-inputs fcitx5-gtk)
+ (delete "gtk+")
+ (prepend fcitx5-gtk gtk)))
+ (outputs '("out"))
+ (synopsis "GTK4 IM module for Fcitx 5")
+ (description "Fcitx5-gtk4 provides IM module for GTK4 applications.")))
+
(define-public fcitx5-qt
(package
(name "fcitx5-qt")
--
2.34.0
From 78044067d76596736eba95a49cb9ebc8aa6d5424 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Tue, 15 Mar 2022 22:40:27 +0800
Subject: [PATCH 4/4] gnu: gtkmm: Update to 4.6.1.

* gnu/packages/gtk.scm (gtkmm): Update to 4.6.1.
[propagated-inputs]: Remove atkmm because it's no longer needed.
* gnu/packages/gtk.scm (pangomm): Update to 2.50.0.
[propagated-inputs]: Replace 'pango' with 'pango-next'.
---
gnu/packages/gtk.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 3d7706b9ee..8ec14e7bff 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1627,7 +1627,7 @@ (define-public cairomm-1.14
(define-public pangomm
(package
(name "pangomm")
- (version "2.48.0")
+ (version "2.50.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1635,7 +1635,7 @@ (define-public pangomm
name "-" version ".tar.xz"))
(sha256
(base32
- "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
+ "0nrvvf1fyzlimh7rvxcblnrvn2l9rz8mpn2iwzlzr6kv05zafym2"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
@@ -1664,7 +1664,7 @@ (define-public pangomm
("python" ,python)
("xsltproc" ,libxslt)))
(propagated-inputs
- (list cairo cairomm glibmm pango))
+ (list cairo cairomm glibmm pango-next))
(home-page "https://pango.gnome.org//")
(synopsis "C++ interface to the Pango text rendering library")
(description
@@ -1760,7 +1760,7 @@ (define-public atkmm-2.28
(define-public gtkmm
(package
(name "gtkmm")
- (version "4.4.0")
+ (version "4.6.1")
(source
(origin
(method url-fetch)
@@ -1769,7 +1769,7 @@ (define-public gtkmm
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f"))))
+ (base32 "1q6iycd7jfbn6rp4sq6r7ndm96dc21inq8mq1d9xsky6kv5gwphd"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
@@ -1809,7 +1809,7 @@ (define-public gtkmm
("xsltproc" ,libxslt)
("xorg-server" ,xorg-server-for-tests)))
(propagated-inputs
- (list atkmm cairomm glibmm gtk pangomm))
+ (list cairomm glibmm gtk pangomm))
(synopsis "C++ Interfaces for GTK+ and GNOME")
(description "GTKmm is the official C++ interface for the popular GUI
library GTK+. Highlights include typesafe callbacks, and a comprehensive set
--
2.34.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
L
L
Ludovic Courtès wrote on 30 Mar 2022 21:56
(name . Zhu Zihao)(address . all_but_last@163.com)
87h77ftdt3.fsf@gnu.org
Hi,

Zhu Zihao <all_but_last@163.com> skribis:

Toggle quote (5 lines)
> To Ludovic Courtès:
>
> If you think this hack to fcitx5-gtk is bad, I'd like to update to pango
> and make these changes on core-updates.

I think the fcitx5-gtk split is good; maybe it’s not idea, but it’s a
good middleground IMO.

Like I wrote, the patches LGTM for master, except that I’d suggest
merging the bits that go together:


Liliana suggests “doing the right thing”, which is to update the default
pango, but that would require delaying to ‘core-updates’. Instead, I
think it’s okay to have it the way you propose in ‘master’.

I hope this clarifies my view!

Thanks,
Ludo’.
Z
Z
Zhu Zihao wrote on 31 Mar 2022 07:13
(name . Ludovic Courtès)(address . ludo@gnu.org)
86zgl6k8li.fsf@163.com

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (27 lines)
> Hi,
>
> Zhu Zihao <all_but_last@163.com> skribis:
>
>> To Ludovic Courtès:
>>
>> If you think this hack to fcitx5-gtk is bad, I'd like to update to pango
>> and make these changes on core-updates.
>
> I think the fcitx5-gtk split is good; maybe it’s not idea, but it’s a
> good middleground IMO.
>
> Like I wrote, the patches LGTM for master, except that I’d suggest
> merging the bits that go together:
>
> https://issues.guix.gnu.org/54261#20
>
> Liliana suggests “doing the right thing”, which is to update the default
> pango, but that would require delaying to ‘core-updates’. Instead, I
> think it’s okay to have it the way you propose in ‘master’.
>
> I hope this clarifies my view!
>
> Thanks,
> Ludo’.


--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYkU4eRUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/lMRgEApbZ3rTjKgECiqMXSjY8Q4NY1IJnR
IklL7C0L9kBE8/YA/jU5DuIle3haKmvVFuN57bH60+5u77zk3VGIfWetS1kG
=V2rx
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 1 Apr 2022 17:54
(name . Zhu Zihao)(address . all_but_last@163.com)
87tubcn6ih.fsf@gnu.org
Hi,

Zhu Zihao <all_but_last@163.com> skribis:

Toggle quote (36 lines)
> From 62a640576ae1de9523fba593219fb50ac97b44c6 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Mon, 21 Mar 2022 09:16:38 +0800
> Subject: [PATCH 3/4] gnu: Add fcitx5-gtk4.
>
> * gnu/packages/fcitx5.scm (fcitx5-gtk4): New variable.
> ---
> gnu/packages/fcitx5.scm | 42 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
> index 2d5917f3c0..be46a5036c 100644
> --- a/gnu/packages/fcitx5.scm
> +++ b/gnu/packages/fcitx5.scm
> @@ -250,6 +250,48 @@ (define (split-immodule gtk-version output)
> @end table")
> (license license:lgpl2.1+)))
>
> +;; XXX: This package is separated from fcitx5-gtk for following reasons.
> +;; 1. GTK4 has a lot more dependencies, some of which maybe unavailable on
> +;; platforms other than x86_64. See <https://issues.guix.gnu.org/53648>.
> +;; 2. GTK4 now propagates pango@1.50, it will conflict with GTK3 and GTK2
> +;; (propagates pango@1.48) if they're all in the inputs of same package.
> +;; See <https://issues.guix.gnu.org/54261>.
> +(define-public fcitx5-gtk4
> + (package
> + (inherit fcitx5-gtk)
> + (name "fcitx5-gtk4")
> + (arguments
> + (list
> + #:tests? #f ;No test
> + #:configure-flags
> + #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
> + #$(this-package-input "fcitx5-gtk")
> + "/include/Fcitx5/GClient"))

This one fails to build for me:

Toggle snippet (22 lines)
-- Looking for shmat - found
-- Checking for module 'gtk+-2.0'
-- No package 'gtk+-2.0' found
CMake Error at /gnu/store/zga679c4nldah9l8dhd5a4hdy820hcyf-cmake-minimal-3.21.4/share/cmake-3.21/Modules/FindPkgConfig.cmake:562 (message):
A required package was not found
Call Stack (most recent call first):
/gnu/store/zga679c4nldah9l8dhd5a4hdy820hcyf-cmake-minimal-3.21.4/share/cmake-3.21/Modules/FindPkgConfig.cmake:784 (_pkg_check_modules_internal)
gtk2/CMakeLists.txt:6 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
See also "/tmp/guix-build-fcitx5-gtk4-5.0.9.drv-0/build/CMakeFiles/CMakeOutput.log".
error: in phase 'configure': uncaught exception:
%exception #<&invoke-error program: "cmake" arguments: ("../fcitx5-gtk-5.0.9" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/5z0a2zrr19pmg4swzsb0jm5fwqh03x0y-fcitx5-gtk4-5.0.9" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/5z0a2zrr19pmg4swzsb0jm5fwqh03x0y-fcitx5-gtk4-5.0.9/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DCMAKE_CXX_FLAGS=-I/gnu/store/fkq1pgfp1r43f2131f8yvx543n7gb7ww-fcitx5-gtk-5.0.9/include/Fcitx5/GClient") exit-status: 1 term-signal: #f stop-signal: #f>
phase `configure' failed after 2.9 seconds
command "cmake" "../fcitx5-gtk-5.0.9" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/5z0a2zrr19pmg4swzsb0jm5fwqh03x0y-fcitx5-gtk4-5.0.9" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/5z0a2zrr19pmg4swzsb0jm5fwqh03x0y-fcitx5-gtk4-5.0.9/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DCMAKE_CXX_FLAGS=-I/gnu/store/fkq1pgfp1r43f2131f8yvx543n7gb7ww-fcitx5-gtk-5.0.9/include/Fcitx5/GClient" failed with status 1
builder for `/gnu/store/p9611ymj4mav45wi92fdyslb2p7854hl-fcitx5-gtk4-5.0.9.drv' failed with exit code 1
@ build-failed /gnu/store/p9611ymj4mav45wi92fdyslb2p7854hl-fcitx5-gtk4-5.0.9.drv - 1 builder for `/gnu/store/p9611ymj4mav45wi92fdyslb2p7854hl-fcitx5-gtk4-5.0.9.drv' failed with exit code 1
derivation '/gnu/store/p9611ymj4mav45wi92fdyslb2p7854hl-fcitx5-gtk4-5.0.9.drv' offloaded to 'localhost' failed: build of `/gnu/store/p9611ymj4mav45wi92fdyslb2p7854hl-fcitx5-gtk4-5.0.9.drv' failed
build of /gnu/store/p9611ymj4mav45wi92fdyslb2p7854hl-fcitx5-gtk4-5.0.9.drv failed

Could you take a look and send an updated patch?

Also, I find it surprising that ‘fcitx5-gtk4’ depends on ‘fcitx5-gtk’;
is it avoidable?

The rest LGTM, thanks!

Ludo’.
Z
Z
Zhu Zihao wrote on 2 Apr 2022 05:41
(name . Ludovic Courtès)(address . ludo@gnu.org)
86r16gjgft.fsf@163.com
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (6 lines)
> This one fails to build for me:
>
> -- Looking for shmat - found
> -- Checking for module 'gtk+-2.0'
> -- No package 'gtk+-2.0' found

I forget to disable GTK2 & GTK3 for this package. Now add it.
Toggle quote (3 lines)
> Also, I find it surprising that ‘fcitx5-gtk4’ depends on ‘fcitx5-gtk’;
> is it avoidable?

Because fcitx5-gtk4 use the Glib based D-Bus client. I'd prefer to reuse
existing one instead of build it again for fcitx5-gtk4.


BTW, How to remove gtk+ and gtk+-2 in same inputs via modify-inputs?

Do we need repeat (delete "gtk+") clause in the modify-inputs? If we
can't handle it without trick, IMO this is a fail of label-less style
input.
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYkfHBhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/n0KgEAihaNnVv9qmgLRVBvW3BGDkbD+NNR
0PBjpaXelicTLzsA/2ics0kbdicIDPr0KL11pHOaDADpm9w2Hj9eM6rE6ZoB
=Q7w8
-----END PGP SIGNATURE-----

From a9be73a1723810dbcec0c4caa3a9d6669494f6d9 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 5 Mar 2022 21:36:25 +0800
Subject: [PATCH 1/4] gnu: pango 1.50: Add version 1.50.4.

* gnu/packages/gtk.scm(pango-next): New variable.
---
gnu/packages/gtk.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 29302051c1..bc7b388a88 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -409,6 +410,22 @@ (define-public pango
(home-page "https://pango.gnome.org/")
(license license:lgpl2.0+)))
+;; TODO: Make this the default package in next release cycle.
+(define-public pango-next
+ (package
+ (inherit pango)
+ (name "pango")
+ (version "1.50.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/pango/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (patches (search-patches "pango-skip-libthai-test.patch"))
+ (sha256
+ (base32
+ "0qn1a7ccs3p5vc6swbqm6hdzka879l0gp9220lq4bcf2gpl67bgl"))))))
+
(define-public pango-1.42
(package
(inherit pango)
--
2.34.0
From b4318c10146a72d33dab4d6f9f49846a371a1745 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 21 Mar 2022 09:16:38 +0800
Subject: [PATCH 3/4] gnu: Add fcitx5-gtk4.

* gnu/packages/fcitx5.scm (fcitx5-gtk4): New variable.
---
gnu/packages/fcitx5.scm | 44 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
index 2d5917f3c0..46b9936e67 100644
--- a/gnu/packages/fcitx5.scm
+++ b/gnu/packages/fcitx5.scm
@@ -250,6 +250,50 @@ (define (split-immodule gtk-version output)
@end table")
(license license:lgpl2.1+)))
+;; XXX: This package is separated from fcitx5-gtk for following reasons.
+;; 1. GTK4 has a lot more dependencies, some of which maybe unavailable on
+;; platforms other than x86_64. See <https://issues.guix.gnu.org/53648>.
+;; 2. GTK4 now propagates pango@1.50, it will conflict with GTK3 and GTK2
+;; (propagates pango@1.48) if they're all in the inputs of same package.
+;; See <https://issues.guix.gnu.org/54261>.
+(define-public fcitx5-gtk4
+ (package
+ (inherit fcitx5-gtk)
+ (name "fcitx5-gtk4")
+ (arguments
+ (list
+ #:tests? #f ;No test
+ #:configure-flags
+ #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
+ #$(this-package-input "fcitx5-gtk")
+ "/include/Fcitx5/GClient")
+ "-DENABLE_GTK2_IM_MODULE=OFF"
+ "-DENABLE_GTK3_IM_MODULE=OFF")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-gclient
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define gclient
+ (search-input-file inputs "lib/libFcitx5GClient.so"))
+ ;; Force cmake search libFcitx5GClient.so in library search
+ ;; path instead of compiling again.
+ (substitute* "gtk4/CMakeLists.txt"
+ (("Fcitx5::GClient")
+ gclient))))
+ (add-before 'build 'enter-gtk4-subdirectory
+ (lambda _
+ (chdir "gtk4")))
+ (add-after 'install 'leave-gtk4-subdirectory
+ (lambda _
+ (chdir ".."))))))
+ (inputs
+ (modify-inputs (package-inputs fcitx5-gtk)
+ (delete "gtk+")
+ (prepend fcitx5-gtk gtk)))
+ (outputs '("out"))
+ (synopsis "GTK4 IM module for Fcitx 5")
+ (description "Fcitx5-gtk4 provides IM module for GTK4 applications.")))
+
(define-public fcitx5-qt
(package
(name "fcitx5-qt")
--
2.34.0
From 81ae5b2620d56d24ad1f38bd96d34b22407eb994 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Tue, 15 Mar 2022 22:40:27 +0800
Subject: [PATCH 4/4] gnu: gtkmm: Update to 4.6.1.

* gnu/packages/gtk.scm (gtkmm): Update to 4.6.1.
[propagated-inputs]: Remove atkmm because it's no longer needed.
* gnu/packages/gtk.scm (pangomm): Update to 2.50.0.
[propagated-inputs]: Replace 'pango' with 'pango-next'.
---
gnu/packages/gtk.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 3d7706b9ee..8ec14e7bff 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1627,7 +1627,7 @@ (define-public cairomm-1.14
(define-public pangomm
(package
(name "pangomm")
- (version "2.48.0")
+ (version "2.50.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1635,7 +1635,7 @@ (define-public pangomm
name "-" version ".tar.xz"))
(sha256
(base32
- "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
+ "0nrvvf1fyzlimh7rvxcblnrvn2l9rz8mpn2iwzlzr6kv05zafym2"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
@@ -1664,7 +1664,7 @@ (define-public pangomm
("python" ,python)
("xsltproc" ,libxslt)))
(propagated-inputs
- (list cairo cairomm glibmm pango))
+ (list cairo cairomm glibmm pango-next))
(home-page "https://pango.gnome.org//")
(synopsis "C++ interface to the Pango text rendering library")
(description
@@ -1760,7 +1760,7 @@ (define-public atkmm-2.28
(define-public gtkmm
(package
(name "gtkmm")
- (version "4.4.0")
+ (version "4.6.1")
(source
(origin
(method url-fetch)
@@ -1769,7 +1769,7 @@ (define-public gtkmm
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f"))))
+ (base32 "1q6iycd7jfbn6rp4sq6r7ndm96dc21inq8mq1d9xsky6kv5gwphd"))))
(build-system meson-build-system)
(outputs '("out" "doc"))
(arguments
@@ -1809,7 +1809,7 @@ (define-public gtkmm
("xsltproc" ,libxslt)
("xorg-server" ,xorg-server-for-tests)))
(propagated-inputs
- (list atkmm cairomm glibmm gtk pangomm))
+ (list cairomm glibmm gtk pangomm))
(synopsis "C++ Interfaces for GTK+ and GNOME")
(description "GTKmm is the official C++ interface for the popular GUI
library GTK+. Highlights include typesafe callbacks, and a comprehensive set
--
2.34.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
L
L
Ludovic Courtès wrote on 4 Apr 2022 22:12
(name . Zhu Zihao)(address . all_but_last@163.com)
87a6d0txp4.fsf@gnu.org
Hi,

Zhu Zihao <all_but_last@163.com> skribis:

[...]

Toggle quote (6 lines)
>> Also, I find it surprising that ‘fcitx5-gtk4’ depends on ‘fcitx5-gtk’;
>> is it avoidable?
>
> Because fcitx5-gtk4 use the Glib based D-Bus client. I'd prefer to reuse
> existing one instead of build it again for fcitx5-gtk4.

OK.

Toggle quote (3 lines)
>
> BTW, How to remove gtk+ and gtk+-2 in same inputs via modify-inputs?

The (delete "gtk+") clause removes all the inputs whose label is
“gtk+”—both GTK+ 3.x and 2.x in this case.

Toggle quote (2 lines)
> Do we need repeat (delete "gtk+") clause in the modify-inputs?

No.

Toggle quote (3 lines)
> If we can't handle it without trick, IMO this is a fail of label-less
> style input.

I must say I hadn’t thought about this situation, which is hopefully
quite rare (and questionable, even), but we can deal with it.

Toggle quote (7 lines)
> From a9be73a1723810dbcec0c4caa3a9d6669494f6d9 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Sat, 5 Mar 2022 21:36:25 +0800
> Subject: [PATCH 1/4] gnu: pango 1.50: Add version 1.50.4.
>
> * gnu/packages/gtk.scm(pango-next): New variable.

[...]

Toggle quote (20 lines)
> From 823fb5ae1d0cff0247baf6c4847555648c710e55 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Sat, 5 Mar 2022 22:40:46 +0800
> Subject: [PATCH 2/4] gnu: gtk: Update to 4.6.1.
>
> * gnu/local.mk (dist_patch_DATA): Remove gtk-introspection-test.patch.
> * gnu/packages/patches/gtk-introspection-test.patch: Remove.
> * gnu/packages/gtk.scm (gtk): Update to 4.6.1.
> [source]: Remove stale patch.
> [arguments]<phases>: Add 'patch-rst2man' phase, correct the binary name of
> rst2man to 'rst2man.py'
> [inputs]: Add libjpeg-turbo, libpng, libtiff.
> [native-inputs]: Add python-docutils.
> [propagated-inputs]: Use pango-next.
> * gnu/packages/fcitx5.scm (fcitx5-gtk)[arguments]: Disable GTK4 build.
> <configure-flags>: Add "-DENABLE_GTK_IM_MODULE=OFF".
> <phases>: In phase "patch-install-prefix", Remove GTK4 code.
> [inputs]: Remove package gtk.
> [outputs]: Remove output "gtk4".

[...]

Toggle quote (7 lines)
> From b4318c10146a72d33dab4d6f9f49846a371a1745 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Mon, 21 Mar 2022 09:16:38 +0800
> Subject: [PATCH 3/4] gnu: Add fcitx5-gtk4.
>
> * gnu/packages/fcitx5.scm (fcitx5-gtk4): New variable.

[...]

Toggle quote (10 lines)
> From 81ae5b2620d56d24ad1f38bd96d34b22407eb994 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Tue, 15 Mar 2022 22:40:27 +0800
> Subject: [PATCH 4/4] gnu: gtkmm: Update to 4.6.1.
>
> * gnu/packages/gtk.scm (gtkmm): Update to 4.6.1.
> [propagated-inputs]: Remove atkmm because it's no longer needed.
> * gnu/packages/gtk.scm (pangomm): Update to 2.50.0.
> [propagated-inputs]: Replace 'pango' with 'pango-next'.

Finally applied, thank you!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 54261@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54261
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch