Subject: [PATCH gnome-team v2 1/9] gnu: gcr: Update to 4.0.0.

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 20 Aug 2023 09:00:33 +0200

* gnu/packages/gnome.scm (gcr): Update to 4.0.0.
(gcr-3): New variable for current version.
(libgdata)[propagated-inputs]: Replace gcr with gcr-3.
(gnome-keyring)[inputs]: Likewise.
(seahorse)[inputs]: Likewise.
(gnome-settings-daemon)[inputs]: Likewise.
(gvfs)[inputs]: Likewise.
(epiphany)[inputs]: Likewise.
(gexiv2)[inputs]: Likewise.
(shotwell)[inputs]: Likewise.
(gnome-online-accounts)[inputs]: Likewise.
(evolution-data-server)[inputs]: Likewise.
(network-manager-openconnect)[inputs]: Likewise.
(network-manager-applet)[inputs]: Likewise.
(gnome-shell)[inputs]: Likewise.
(evolution)[inputs]: Likewise.
(geary)[inputs]: Likewise.
* gnu/packages/gnome-xyz.scm (gpaste)[native-inputs]: Likewise.
* gnu/packages/gnupg.scm (pinentry-gnome3)[inputs]: Likewise.
* gnu/packages/suckless.scm (surf)[inputs]: Likewise.
* gnu/packages/web-browsers.scm (midori)[inputs]: Likewise.
---
 gnu/packages/gnome-xyz.scm    |  2 +-
 gnu/packages/gnome.scm        | 81 ++++++++++++++++++++++-------------
 gnu/packages/gnupg.scm        |  2 +-
 gnu/packages/suckless.scm     |  2 +-
 gnu/packages/web-browsers.scm |  2 +-
 5 files changed, 56 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index a1701aaa77..9e13bcb59d 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -1030,7 +1030,7 @@ (define-public gpaste
                (search-patches "gpaste-fix-paths.patch"))))
     (build-system meson-build-system)
     (native-inputs
-     (list gcr
+     (list gcr-3
            gettext-minimal
            gobject-introspection
            (list glib "bin")            ; for glib-compile-resources
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 922d6ba24b..6f49114893 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -1775,7 +1775,7 @@ (define-public libnma
            pkg-config
            vala))
     (inputs
-     (list gcr
+     (list gcr-3
            (if (supported-package? gtk) gtk gtk+)
            iso-codes
            mobile-broadband-provider-info
@@ -2021,7 +2021,7 @@ (define-public libgdata
     (inputs
      (list cyrus-sasl glib-networking vala))
     (propagated-inputs
-     `(("gcr" ,gcr)
+     `(("gcr" ,gcr-3)
        ("glib" ,glib)
        ("gnome-online-accounts" ,gnome-online-accounts)
        ("json-glib" ,json-glib)
@@ -2373,7 +2373,7 @@ (define-public gnome-font-viewer
 (define-public gcr
   (package
     (name "gcr")
-    (version "3.41.1")
+    (version "4.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -2381,7 +2381,7 @@ (define-public gcr
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0kx2pv272p0qc0nq1287gciyn34d95yxg41vq3lzxfzyqaijhwdv"))))
+                "0z7cviri25qy2v042hw6x731bj1azpx8plrd7ssbmrqf9y95an64"))))
     (build-system meson-build-system)
     (arguments
      (list
@@ -2394,11 +2394,11 @@ (define-public gcr
               (substitute* (find-files "." "^meson\\.build$")
                 ((".*'--fatal-warnings',.*") ""))))
           (add-after 'unpack 'skip-gtk-update-icon-cache
-            ;; Don't create 'icon-theme.cache'.
             (lambda _
-              (substitute* "meson_post_install.py"
-                (("gtk-update-icon-cache") "true"))))
-          (add-before 'check 'pre-check
+              (substitute* "meson.build"
+                (("gtk_update_icon_cache: true")
+                 "gtk_update_icon_cache: false"))))
+                    (add-before 'check 'pre-check
             (lambda _
               ;; Some tests expect to write to $HOME.
               (setenv "HOME" "/tmp")))
@@ -2432,11 +2432,9 @@ (define-public gcr
            pkg-config
            python-wrapper
            vala))
-    ;; mentioned in gck.pc, gcr.pc and gcr-ui.pc
-    (propagated-inputs
-     (list glib
-           gtk+
-           p11-kit))
+    ;; GLib and p11-kit are mentioned in gck.pc and gcr.pc
+    ;; GTK is kept for symmetry with gcr-3, which propagates gtk+.
+    (propagated-inputs (list glib gtk p11-kit))
     (home-page "https://www.gnome.org")
     (synopsis "Libraries for displaying certificates and accessing key stores")
     (description
@@ -2445,6 +2443,31 @@ (define-public gcr
 GNOME Desktop.")
     (license license:lgpl2.1+)))
 
+(define-public gcr-3
+  (package
+    (inherit gcr)
+    (name "gcr")
+    (version "3.41.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version)  "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0kx2pv272p0qc0nq1287gciyn34d95yxg41vq3lzxfzyqaijhwdv"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments gcr)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'skip-gtk-update-icon-cache
+              ;; Don't create 'icon-theme.cache'.
+              (lambda _
+                (substitute* "meson_post_install.py"
+                  (("gtk-update-icon-cache") "true"))))))))
+    ;; mentioned in gck.pc, gcr.pc and gcr-ui.pc
+    (propagated-inputs (list glib gtk+ p11-kit))))
+
 (define-public gdl
   (package
     (name "gdl")
@@ -2570,7 +2593,7 @@ (define-public gnome-keyring
                             "1"))))))))
     (inputs
      (list dbus
-           gcr
+           gcr-3
            libgcrypt
            linux-pam
            openssh))
@@ -2587,7 +2610,7 @@ (define-public gnome-keyring
            pkg-config
            python-wrapper))             ;for tests
     (propagated-inputs
-     (list gcr))
+     (list gcr-3))
 
     ;; XXX: There are concerning test failures on i686-linux and other 32-bit
     ;; platforms: <https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/124>.
@@ -4374,7 +4397,7 @@ (define-public seahorse
              (setenv "HOME" (getcwd)))))))
     (inputs
      (list gtk+
-           gcr
+           gcr-3
            gnupg
            gpgme
            openldap
@@ -5952,7 +5975,7 @@ (define-public gnome-settings-daemon
            baobab
            colord
            cups
-           gcr
+           gcr-3
            geoclue
            geocode-glib-with-libsoup2
            gnome-desktop
@@ -6939,7 +6962,7 @@ (define-public gvfs
            dbus
            elogind
            fuse
-           gcr
+           gcr-3
            glib
            gnome-online-accounts
            gsettings-desktop-schemas
@@ -7117,7 +7140,7 @@ (define-public epiphany
            xorg-server-for-tests))
     (inputs
      (list avahi
-           gcr
+           gcr-3
            glib-networking
            gnome-desktop
            gsettings-desktop-schemas
@@ -7402,7 +7425,7 @@ (define-public gexiv2
                              (python:site-packages %build-inputs %outputs)
                              "/gi/overrides"))))
     (native-inputs
-     (list gcr
+     (list gcr-3
            `(,glib "bin")
            pkg-config
            python
@@ -7454,7 +7477,7 @@ (define-public shotwell
            python
            vala))
     (inputs
-     (list gcr
+     (list gcr-3
            gexiv2
            gst-plugins-base
            gstreamer
@@ -7981,7 +8004,7 @@ (define-public gnome-online-accounts
            gtk+))                       ; required by goa-backend-1.0.pc
     (inputs
      (list docbook-xsl
-           gcr
+           gcr-3
            json-glib
            libsecret
            mit-krb5
@@ -8097,7 +8120,7 @@ (define-public evolution-data-server
     (inputs
      (list bdb
            boost
-           gcr
+           gcr-3
            gnome-online-accounts
            json-glib
            libcanberra
@@ -8503,7 +8526,7 @@ (define-public network-manager-openconnect
            libnma
            pkg-config))
     (inputs
-     (list gcr
+     (list gcr-3
            gtk
            gtk+
            kmod
@@ -8634,7 +8657,7 @@ (define-public network-manager-applet
            ;; nm-applet need by org.gnome.nm-applet.gschema.xml
            libnma))
     (inputs
-     (list gcr
+     (list gcr-3
            libappindicator
            libgudev
            libsecret
@@ -9047,7 +9070,7 @@ (define-public gnome-control-center
            colord-gtk
            cups
            dconf
-           gcr
+           gcr-3
            gnome-bluetooth
            gnome-desktop
            gnome-online-accounts
@@ -9226,7 +9249,7 @@ (define-public gnome-shell
            caribou
            docbook-xsl
            evolution-data-server
-           gcr
+           gcr-3
            gdm
            librsvg
            gjs
@@ -11659,7 +11682,7 @@ (define-public evolution
      (list cmark
            enchant
            evolution-data-server        ;must be the same version
-           gcr
+           gcr-3
            gsettings-desktop-schemas
            gnome-autoar
            gnome-desktop
@@ -12346,7 +12369,7 @@ (define-public geary
     (inputs
      (list enchant
            folks
-           gcr
+           gcr-3
            glib
            gmime
            gnome-online-accounts
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index a5b8587a14..00307ec270 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -866,7 +866,7 @@ (define-public pinentry-gnome3
     (name "pinentry-gnome3")
     (inputs
      (modify-inputs (package-inputs pinentry-tty)
-       (prepend gtk+-2 gcr glib)))
+       (prepend gtk+-2 gcr-3 glib)))
     (arguments
      `(#:configure-flags '("--enable-pinentry-gnome3"
                            "--enable-fallback-curses")))
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 400832045f..e8cf86f504 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -514,7 +514,7 @@ (define-public surf
              #t)))))
     (inputs
      `(("dmenu" ,dmenu)
-       ("gcr" ,gcr)
+       ("gcr" ,gcr-3)
        ("glib-networking" ,glib-networking)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("webkitgtk" ,webkitgtk-with-libsoup2)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index ac46cffb19..3003f16c83 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -138,7 +138,7 @@ (define-public midori
        ("which" ,which))) ;for tests
     (inputs
      `(("adwaita-icon-theme" ,adwaita-icon-theme)
-       ("gcr" ,gcr)
+       ("gcr" ,gcr-3)
        ("glib" ,glib)
        ("glib-networking" ,glib-networking)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)

base-commit: baf5b0745446dabe8166d860996dc54cfa09db3e
-- 
2.41.0