diff mbox series

[bug#62467,gnome-team,v2,10/12] gnu: gtk+: Update to 3.24.37.

Message ID 95f94cbe9b3f1cee46e75577f9aac5cb751c83a4.camel@gmail.com
State New
Headers show
Series Update fundamental packages | expand

Commit Message

Liliana Marie Prikler March 30, 2023, 4:28 a.m. UTC
* gnu/packages/gtk.scm (gtk+): Update to 3.24.37.
[native-inputs]: Add docbook-xsl.
[build-system]: Use meson-build-system.
[arguments]: Add ‘glib-or-gtk?’.  Adjust configure-flags accordingly.
<#:phases>: Remove ‘generate-gdk-pixbuf-loaders-cache-file’.
Adjust ‘disable-failing-tests’.
Rename ‘move-desktop-files’ to ‘move-files’ and move documentation as well.
---
 gnu/packages/gtk.scm | 85 +++++++++++++++++++++++---------------------
 1 file changed, 44 insertions(+), 41 deletions(-)

Comments

Maxim Cournoyer April 8, 2023, 7:34 p.m. UTC | #1
Hi,

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

> * gnu/packages/gtk.scm (gtk+): Update to 3.24.37.
> [native-inputs]: Add docbook-xsl.
> [build-system]: Use meson-build-system.
> [arguments]: Add ‘glib-or-gtk?’.  Adjust configure-flags accordingly.
> <#:phases>: Remove ‘generate-gdk-pixbuf-loaders-cache-file’.
> Adjust ‘disable-failing-tests’.
> Rename ‘move-desktop-files’ to ‘move-files’ and move documentation as well.
> ---
>  gnu/packages/gtk.scm | 85 +++++++++++++++++++++++---------------------
>  1 file changed, 44 insertions(+), 41 deletions(-)
>
> diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
> index 196d767160..75e56d4166 100644
> --- a/gnu/packages/gtk.scm
> +++ b/gnu/packages/gtk.scm
> @@ -1101,7 +1101,7 @@ (define-public gtk+
>    (package
>      (inherit gtk+-2)
>      (name "gtk+")
> -    (version "3.24.30")
> +    (version "3.24.37")
>      (source
>       (origin
>         (method url-fetch)
> @@ -1110,7 +1110,7 @@ (define-public gtk+
>                             name "-" version ".tar.xz"))
>         (sha256
>          (base32
> -         "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
> +         "0mvzzgjrzzir7nzx379yz3swzk3pn1s283hgzm8l2yakq2sg0ib7"))
>         (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
>                                  "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
>      (propagated-inputs
> @@ -1152,6 +1152,7 @@ (define-public gtk+
>             rest))
>      (native-inputs
>       (list docbook-xml-4.1.2
> +           docbook-xsl
>             gettext-minimal
>             `(,glib "bin")
>             gobject-introspection
> @@ -1164,47 +1165,29 @@ (define-public gtk+
>             ;; of updating xorg-server directly on the master branch.
>             xorg-server-for-tests
>             libxslt))
> +    (build-system meson-build-system)
>      (arguments
> -     `(#:imported-modules ((guix build glib-or-gtk-build-system)
> -                           ,@%gnu-build-system-modules)
> -       #:modules ((guix build utils)
> -                  (guix build gnu-build-system)
> -                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
> +     `(#:glib-or-gtk? #t
>         #:disallowed-references (,xorg-server-for-tests)
> -       ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
> -       ;; to "doc".
> -       #:configure-flags (list (string-append "--with-html-dir="
> -                                              (assoc-ref %outputs "doc")
> -                                              "/share/gtk-doc/html")
> -                               "--enable-cloudproviders"
> +       #:configure-flags (list "-Dcloudproviders=true"
>                                 ;; The header file <gdk/gdkwayland.h> is required
>                                 ;; by gnome-control-center
> -                               "--enable-wayland-backend"
> +                               "-Dwayland_backend=true"
>                                 ;; This is necessary to build both backends.
> -                               "--enable-x11-backend"
> +                               "-Dx11_backend=true"
>                                 ;; This enables the HTML5 websocket backend.
> -                               "--enable-broadway-backend")
> +                               "-Dbroadway_backend=true"
> +                               "-Dman=true")
>         #:phases
>         (modify-phases %standard-phases
> -         (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 'disable-failing-tests
>             (lambda _
> -             (substitute* "testsuite/gtk/Makefile.in"
> -               (("builderparser cellarea check-icon-names check-cursor-names")
> -                "builderparser cellarea check-cursor-names")
> -               (("notify no-gtk-init object objects-finalize papersize rbtree")
> -                "no-gtk-init papersize rbtree")
> -               (("stylecontext templates textbuffer textiter treemodel treepath")
> -                "stylecontext textbuffer textiter treemodel treepath"))
> -             (substitute* "testsuite/a11y/Makefile.in"
> -               (("accessibility-dump tree-performance text children derive")
> -                "tree-performance text children derive"))
> -             (substitute* "testsuite/reftests/Makefile.in"
> -               (("TEST_PROGS = gtk-reftest")
> -                "TEST_PROGS = "))
> -             #t))
> +             (substitute* "testsuite/gtk/meson.build"
> +               (("\\['defaultvalue'\\],") "")
> +               (("\\['objects-finalize', .*\\],") ""))
> +             (substitute* "testsuite/reftests/meson.build"
> +               (("'flipping-icons(\\.[^.]*)?\\.ui',") "")
> +               (("'gtk-icontheme-sizing(\\.[^.]*)?\\.ui',") ""))))
>           (add-before 'check 'pre-check
>             (lambda _
>               ;; Tests require a running X server.
> @@ -1217,15 +1200,35 @@ (define-public gtk+
>               ;; For missing '/etc/machine-id'.
>               (setenv "DBUS_FATAL_WARNINGS" "0")
>               #t))
> -         (add-after 'install 'move-desktop-files
> -           ;; Move desktop files into 'bin' to avoid cycle references.
> +         (add-after 'install 'move-files
>             (lambda* (#:key outputs #:allow-other-keys)
> -             (let ((out (assoc-ref outputs "out"))
> -                   (bin (assoc-ref outputs "bin")))
> -               (mkdir-p (string-append bin "/share"))
> -               (rename-file (string-append out "/share/applications")
> -                            (string-append bin "/share/applications"))
> -               #t))))))
> +             (define-values (out bin doc)
> +               (values (assoc-ref outputs "out")
> +                       (assoc-ref outputs "bin")
> +                       (assoc-ref outputs "doc")))
> +             (for-each mkdir-p
> +                       (list
> +                        (string-append bin "/bin")
> +                        (string-append bin "/share/applications")
> +                        (string-append bin "/share/icons")
> +                        (string-append bin "/share/man")
> +                        (string-append bin "/share/metainfo")
> +                        (string-append doc "/share/doc")))
> +             ;; Move programs and related files to output 'bin'.
> +             (for-each (lambda (dir)
> +                         (rename-file
> +                          (string-append out dir)
> +                          (string-append bin dir)))
> +                       (list
> +                        "/bin"
> +                        "/share/applications"
> +                        "/share/icons"
> +                        "/share/man"))
> +             ;; Move HTML documentation to output 'doc'.
> +             (when (file-exists? (string-append out "/share/doc"))
> +               (rename-file
> +                (string-append out "/share/doc")
> +                (string-append doc "/share/doc"))))))))
>      (native-search-paths
>       (list (search-path-specification
>              (variable "GUIX_GTK3_PATH")

Sorry for not noticing about this earlier; I pushed a change to
core-updates already with the update, but failed to manually moved the
binaries to the "bin" output, expecting the meson build system to do
that for us (it didn't).

I'm not testing a change to the meson-build-system; will push if it
fixes this as I expect and doesn't seem to introduce new issues.
diff mbox series

Patch

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 196d767160..75e56d4166 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1101,7 +1101,7 @@  (define-public gtk+
   (package
     (inherit gtk+-2)
     (name "gtk+")
-    (version "3.24.30")
+    (version "3.24.37")
     (source
      (origin
        (method url-fetch)
@@ -1110,7 +1110,7 @@  (define-public gtk+
                            name "-" version ".tar.xz"))
        (sha256
         (base32
-         "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
+         "0mvzzgjrzzir7nzx379yz3swzk3pn1s283hgzm8l2yakq2sg0ib7"))
        (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
                                 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
     (propagated-inputs
@@ -1152,6 +1152,7 @@  (define-public gtk+
            rest))
     (native-inputs
      (list docbook-xml-4.1.2
+           docbook-xsl
            gettext-minimal
            `(,glib "bin")
            gobject-introspection
@@ -1164,47 +1165,29 @@  (define-public gtk+
            ;; of updating xorg-server directly on the master branch.
            xorg-server-for-tests
            libxslt))
+    (build-system meson-build-system)
     (arguments
-     `(#:imported-modules ((guix build glib-or-gtk-build-system)
-                           ,@%gnu-build-system-modules)
-       #:modules ((guix build utils)
-                  (guix build gnu-build-system)
-                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
+     `(#:glib-or-gtk? #t
        #:disallowed-references (,xorg-server-for-tests)
-       ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
-       ;; to "doc".
-       #:configure-flags (list (string-append "--with-html-dir="
-                                              (assoc-ref %outputs "doc")
-                                              "/share/gtk-doc/html")
-                               "--enable-cloudproviders"
+       #:configure-flags (list "-Dcloudproviders=true"
                                ;; The header file <gdk/gdkwayland.h> is required
                                ;; by gnome-control-center
-                               "--enable-wayland-backend"
+                               "-Dwayland_backend=true"
                                ;; This is necessary to build both backends.
-                               "--enable-x11-backend"
+                               "-Dx11_backend=true"
                                ;; This enables the HTML5 websocket backend.
-                               "--enable-broadway-backend")
+                               "-Dbroadway_backend=true"
+                               "-Dman=true")
        #:phases
        (modify-phases %standard-phases
-         (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 'disable-failing-tests
            (lambda _
-             (substitute* "testsuite/gtk/Makefile.in"
-               (("builderparser cellarea check-icon-names check-cursor-names")
-                "builderparser cellarea check-cursor-names")
-               (("notify no-gtk-init object objects-finalize papersize rbtree")
-                "no-gtk-init papersize rbtree")
-               (("stylecontext templates textbuffer textiter treemodel treepath")
-                "stylecontext textbuffer textiter treemodel treepath"))
-             (substitute* "testsuite/a11y/Makefile.in"
-               (("accessibility-dump tree-performance text children derive")
-                "tree-performance text children derive"))
-             (substitute* "testsuite/reftests/Makefile.in"
-               (("TEST_PROGS = gtk-reftest")
-                "TEST_PROGS = "))
-             #t))
+             (substitute* "testsuite/gtk/meson.build"
+               (("\\['defaultvalue'\\],") "")
+               (("\\['objects-finalize', .*\\],") ""))
+             (substitute* "testsuite/reftests/meson.build"
+               (("'flipping-icons(\\.[^.]*)?\\.ui',") "")
+               (("'gtk-icontheme-sizing(\\.[^.]*)?\\.ui',") ""))))
          (add-before 'check 'pre-check
            (lambda _
              ;; Tests require a running X server.
@@ -1217,15 +1200,35 @@  (define-public gtk+
              ;; For missing '/etc/machine-id'.
              (setenv "DBUS_FATAL_WARNINGS" "0")
              #t))
-         (add-after 'install 'move-desktop-files
-           ;; Move desktop files into 'bin' to avoid cycle references.
+         (add-after 'install 'move-files
            (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (bin (assoc-ref outputs "bin")))
-               (mkdir-p (string-append bin "/share"))
-               (rename-file (string-append out "/share/applications")
-                            (string-append bin "/share/applications"))
-               #t))))))
+             (define-values (out bin doc)
+               (values (assoc-ref outputs "out")
+                       (assoc-ref outputs "bin")
+                       (assoc-ref outputs "doc")))
+             (for-each mkdir-p
+                       (list
+                        (string-append bin "/bin")
+                        (string-append bin "/share/applications")
+                        (string-append bin "/share/icons")
+                        (string-append bin "/share/man")
+                        (string-append bin "/share/metainfo")
+                        (string-append doc "/share/doc")))
+             ;; Move programs and related files to output 'bin'.
+             (for-each (lambda (dir)
+                         (rename-file
+                          (string-append out dir)
+                          (string-append bin dir)))
+                       (list
+                        "/bin"
+                        "/share/applications"
+                        "/share/icons"
+                        "/share/man"))
+             ;; Move HTML documentation to output 'doc'.
+             (when (file-exists? (string-append out "/share/doc"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))))))))
     (native-search-paths
      (list (search-path-specification
             (variable "GUIX_GTK3_PATH")