Package: guix-patches;
Reported by: Zhu Zihao <all_but_last <at> 163.com>
Date: Sat, 5 Mar 2022 15:18:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Message #44 received at 54261 <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 54261 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be> Subject: Re: bug#54261: [PATCH]: Update GTK to 4.6.1. Date: Mon, 21 Mar 2022 09:17:47 +0800
[Message part 1 (text/plain, inline)]
Here is a draft patch, it now works. But some part may need polish. Can you give me some suggestions? Thanks.
[signature.asc (application/pgp-signature, inline)]
[0001-gnu-pango-Add-version-1.50.4.patch (text/x-patch, inline)]
From bd53ac3a162c1f5b53363126c125d826a5cb6a6e Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 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(+) 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 <at> netpanic.org> ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be> ;;; Copyright © 2021 Wamm K. D. <jaft.r <at> outlook.com> +;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 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
[0002-gnu-gtk-Update-to-4.6.1.patch (text/x-patch, inline)]
From 0c22cbd070d47b8c3b534caceb3eb05c8f7f6d41 Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 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. --- gnu/local.mk | 1 - gnu/packages/gtk.scm | 17 +++++++++----- .../patches/gtk-introspection-test.patch | 22 ------------------- 3 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/gtk-introspection-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index c8026a1ec1..1e0bb0c00c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1244,7 +1244,6 @@ dist_patch_DATA = \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtk-doc-respect-xml-catalog.patch \ - %D%/packages/patches/gtk-introspection-test.patch \ %D%/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/gtksourceview-2-add-default-directory.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index bc7b388a88..3d7706b9ee 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1076,7 +1076,7 @@ (define-public gtk+ (define-public gtk (package (name "gtk") - (version "4.4.1") + (version "4.6.1") (source (origin (method url-fetch) @@ -1084,10 +1084,9 @@ (define-public gtk (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 - (base32 "1x6xlc063nqp7cg6py4kq1kpw9pkq49ifk5kki0brc667ncdmahg")) + (base32 "0pzcs24j67f90kjcp6apgn6rffynxksjm1m7d3an7kdv3k90hmfq")) (patches - (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch" - "gtk-introspection-test.patch")))) + (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch")))) (build-system meson-build-system) (outputs '("out" "bin" "doc")) (arguments @@ -1117,6 +1116,10 @@ (define-public gtk (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file)) + (add-after 'unpack 'patch-rst2man + (lambda _ + (substitute* "docs/reference/gtk/meson.build" + (("find_program\\('rst2man'") "find_program('rst2man.py'")))) (add-after 'unpack 'patch (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) ;; Correct DTD resources of docbook. @@ -1194,6 +1197,7 @@ (define-public gtk ("pkg-config" ,pkg-config) ("python-pygobject" ,python-pygobject) ;; These python modules are required for building documentation. + ("python-docutils" ,python-docutils) ("python-jinja2" ,python-jinja2) ("python-markdown" ,python-markdown) ("python-markupsafe" ,python-markupsafe) @@ -1216,7 +1220,10 @@ (define-public gtk iso-codes json-glib libcloudproviders ;for cloud-providers support + libjpeg-turbo + libpng librsvg + libtiff python rest tracker)) ;for filechooser search support @@ -1239,7 +1246,7 @@ (define-public gtk ("libxkbcommon" ,libxkbcommon) ("libxrandr" ,libxrandr) ("libxrender" ,libxrender) - ("pango" ,pango) + ("pango" ,pango-next) ("vulkan-headers" ,vulkan-headers) ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support ("wayland" ,wayland) ;for wayland display-backend diff --git a/gnu/packages/patches/gtk-introspection-test.patch b/gnu/packages/patches/gtk-introspection-test.patch deleted file mode 100644 index 570ea806a9..0000000000 --- a/gnu/packages/patches/gtk-introspection-test.patch +++ /dev/null @@ -1,22 +0,0 @@ -# Extend rather than stomp environment variables. -# Upstream status: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4268 -diff --git a/testsuite/introspection/meson.build b/testsuite/introspection/meson.build -index 6202fb7446..b59191eb0f 100644 ---- a/testsuite/introspection/meson.build -+++ b/testsuite/introspection/meson.build -@@ -1,9 +1,10 @@ -+env = environment() -+env.prepend('GI_TYPELIB_PATH', -+ join_paths(project_build_root, 'gtk'), -+ gi_dep.get_pkgconfig_variable('typelibdir')) -+env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so')) - - test('api', - find_program('api.py', dirs: meson.current_source_dir()), - suite: ['introspection'], -- env: [ -- 'GI_TYPELIB_PATH=@0@/gtk:@1@'.format(project_build_root, -- gi_dep.get_pkgconfig_variable('typelibdir')), -- 'LD_PRELOAD=@0@/gtk/libgtk-4.so'.format(project_build_root), -- ]) -+ env: env) -- 2.34.0
[0003-gnu-pangomm-Update-to-2.50.0.patch (text/x-patch, inline)]
From 216abd161ce06d49f7586203281dcf1ba523a8af Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 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(-) 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
[0004-gnu-gtkmm-Update-to-4.6.0.patch (text/x-patch, inline)]
From dc4aabc7831c00526f0b2b2c3e69cab4aa5f3459 Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 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(-) 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
[0005-gnu-fcitx5-gtk-Remove-GTK4-support.patch (text/x-patch, inline)]
From e1cc0e4054cc34320ed1ff8d35c64bc5db6b0e28 Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 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(-) 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
[0006-gnu-Add-fcitx5-gtk4.patch (text/x-patch, inline)]
From 84da7d385c7759fbf9defdfa5e573bfe57c00c4b Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 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(+) 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 <at> 1.50, it will conflict with GTK3 and GTK2 +;; (propagates pango <at> 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
[Message part 9 (text/plain, inline)]
-- Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.