summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-03-26 17:39:11 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-04-30 12:35:00 +0200
commit666fc96858fdde39779f8371023cc6bb458d5b3b (patch)
tree2f8f2a0b67c9367b5e3b38916a5b3df9ef718d0c /gnu
parent3676e312aaf1ce10ed1d7844e871b54e04624098 (diff)
downloadguix-666fc96858fdde39779f8371023cc6bb458d5b3b.tar.gz
gnu: glib: Update to 2.76.1.
* gnu/packages/glib.scm (glib): Update to 2.76.1.
[source]<snippet>: Adjust accordingly.
[arguments]<#:phases>: Add ‘set-G_TEST_SRCDIR’.  Update ‘delete-failing-tests’.
[propagated-inputs]: Replace pcre with pcre2.
(glib-with-documentation): Inherit from glib.
* gnu/packages/gnome.scm (sysprof, gtranslator): Use glib.
* gnu/packages/gtk.scm (gtksourceview, libpanel): Use glib.
* gnu/packages/guile-xyz.scm (guile-g-golf): Use glib.
* gnu/packages/music.scm (zrythm): Use glib.
* gnu/packages/patches/glib-skip-failing-test.patch: Adjust accordingly.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/glib.scm159
-rw-r--r--gnu/packages/gnome.scm8
-rw-r--r--gnu/packages/gtk.scm6
-rw-r--r--gnu/packages/guile-xyz.scm2
-rw-r--r--gnu/packages/music.scm4
-rw-r--r--gnu/packages/patches/glib-skip-failing-test.patch3
6 files changed, 74 insertions, 108 deletions
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 1f3d3ef628..c90f178885 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -215,7 +215,7 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
 (define glib
   (package
     (name "glib")
-    (version "2.72.3")
+    (version "2.76.1")
     (source
      (origin
        (method url-fetch)
@@ -224,14 +224,14 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
                        name "/" (string-take version 4) "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "1w25sf2wxkkah2p2w189q58mza3zv8z1fh2q1m82sldq4kva4faa"))
+        (base32 "17x1zpr2avj8hjbpc6hp2sf2885lxac46v0kajsgan3929m0zp23"))
        (patches
         (search-patches "glib-appinfo-watch.patch"
                         "glib-skip-failing-test.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
-           (substitute* "tests/spawn-test.c"
+           (substitute* "glib/tests/spawn-test.c"
              (("/bin/sh") "sh"))))))
     (build-system meson-build-system)
     (outputs '("out"                    ;libraries, locales, etc
@@ -256,6 +256,9 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
                                                #$output:bin "/bin"))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-G_TEST_SRCDIR
+            (lambda _
+              (setenv "G_TEST_SRCDIR" (string-append (getcwd) "/gio/tests"))))
           ;; Needed to pass the test phase on slower ARM and i686 machines.
           (add-after 'unpack 'increase-test-timeout
             (lambda _
@@ -271,9 +274,19 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
                 (substitute* '("unix.c" "utils.c")
                   (("[ \t]*g_test_add_func.*;") "")))
               (with-directory-excursion "gio/tests"
-                (substitute* '("contenttype.c" "gdbus-address-get-session.c"
-                               "gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
-                  (("[ \t]*g_test_add_func.*;") "")))
+                (substitute* '("contenttype.c"
+                               "gdbus-address-get-session.c"
+                               "gdbus-server-auth.c"
+                               "gdbus-peer.c"
+                               "appinfo.c"
+                               "desktop-app-info.c")
+                  (("[ \t]*g_test_add_func.*;") ""))
+                (unless (which "update-desktop-database")
+                  (substitute* "file.c"
+                    (("[ \t]*g_test_add_func.*query-default-handler.*;") "")))
+                (substitute* '("portal-support-snap.c")
+                  (("g_test_init .*")
+                   "return EXIT_SUCCESS;")))
 
               #$@(if (target-x86-32?)
                      ;; Comment out parts of timer.c that fail on i686 due to
@@ -351,10 +364,10 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
       python
       python-wrapper))
     (propagated-inputs
-     (list libffi             ;in the Requires.private field of gobject-2.0.pc
-           pcre               ;in the Requires.private field of glib-2.0.pc
-           `(,util-linux "lib")  ;for libmount
-           zlib))                ;in the Requires.private field of glib-2.0.pc
+     (list libffi            ; in the Requires.private field of gobject-2.0.pc
+           pcre2             ; in the Requires.private field of glib-2.0.pc
+           `(,util-linux "lib") ;for libmount
+           zlib))               ; in the Requires.private field of glib-2.0.pc
     (native-search-paths
      ;; This variable is not really "owned" by GLib, but several related
      ;; packages refer to it: gobject-introspection's tools use it as a search
@@ -378,92 +391,47 @@ functions for strings and common data structures.")
     (license license:lgpl2.1+)
     (properties '((hidden? . #t)))))
 
-(define-public glib-next
-  (package
-    (inherit glib)
-    (name "glib")
-    (version "2.73.3")
-    (source
-     (origin
-       (inherit (package-source glib))
-       (uri
-        (string-append "mirror://gnome/sources/"
-                       name "/" (string-take version 4) "/"
-                       name "-" version ".tar.xz"))
-       (snippet
-        '(substitute* "glib/tests/spawn-test.c"
-           (("/bin/sh") "sh")))
-       (sha256
-        (base32 "1bgfch7zj1pq4rkqcibfky1470ijljyrx5pn5s5v9mk72s22n6nz"))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments glib)
-       ((#:test-options test-options ''())
-        ;; Skip flaky or slow tests.
-        `(cons* "--no-suite=slow" "--no-suite=flaky" ,test-options))
-       ((#:phases phases #~%standard-phases)
-        #~(modify-phases #$phases
-            (replace 'disable-failing-tests
-              (lambda _
-                (with-directory-excursion "glib/tests"
-                  (substitute* '("unix.c" "utils.c")
-                    (("[ \t]*g_test_add_func.*;") "")))
-                ;; The "glib:gio / file" test fails with the error "No
-                ;; application is registered as handling this file" (see:
-                ;; https://gitlab.gnome.org/GNOME/glib/-/issues/2742).
-                (with-directory-excursion "gio/tests"
-                  (substitute* '("appinfo.c"
-                                 "contenttype.c"
-                                 "desktop-app-info.c"
-                                 "file.c"
-                                 "gdbus-address-get-session.c"
-                                 "gdbus-peer.c")
-                    (("[ \t]*g_test_add_func.*;") "")))
-
-                #$@(if (target-x86-32?)
-                       ;; Comment out parts of timer.c that fail on i686 due to
-                       ;; excess precision when building with GCC 10:
-                       ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
-                       '((substitute* "glib/tests/timer.c"
-                           (("^  g_assert_cmpuint \\(micros.*" all)
-                            (string-append "//" all "\n"))
-                           (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
-                            (string-append "//" all "\n"))))
-                       '())))))))
-    (native-inputs
-     (modify-inputs (package-native-inputs glib)
-       (append desktop-file-utils)))
-    (propagated-inputs
-     (modify-inputs (package-propagated-inputs glib)
-       (replace "pcre" pcre2)))))
-
 (define-public glib-with-documentation
   ;; glib's doc must be built in a separate package since it requires gtk-doc,
   ;; which in turn depends on glib.
-  (package/inherit glib
-    (properties (alist-delete 'hidden? (package-properties glib)))
-    (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
-    (native-inputs
-     (modify-inputs (package-native-inputs glib)
-       (prepend docbook-xml-4.2
-                docbook-xml
-                docbook-xsl
-                gtk-doc
-                libxml2
-                libxslt)))
-    (arguments
-     (substitute-keyword-arguments (package-arguments glib)
-       ((#:configure-flags flags ''())
-        #~(cons "-Dgtk_doc=true"
-                (delete "-Dman=false" #$flags)))
-       ((#:phases phases)
-        #~(modify-phases #$phases
-            (add-after 'install 'move-doc
-              (lambda _
-                (let ((html "/share/gtk-doc"))
-                  (mkdir-p (string-append #$output:doc "/share"))
-                  (rename-file
-                   (string-append #$output html)
-                   (string-append #$output:doc html)))))))))))
+  (let ((base glib))
+    (package/inherit base
+      (properties (alist-delete 'hidden? (package-properties base)))
+      (outputs (cons "doc" (package-outputs base))) ; 20 MiB of GTK-Doc reference
+      (native-inputs
+       `(("docbook-xml-4.2" ,docbook-xml-4.2)
+         ("docbook-xml-4.5" ,docbook-xml)
+         ("docbook-xsl" ,docbook-xsl)
+         ("gtk-doc" ,gtk-doc)
+         ("libxml2" ,libxml2)
+         ("xsltproc" ,libxslt)
+         ,@(package-native-inputs base)))
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:configure-flags flags ''())
+          #~(cons "-Dgtk_doc=true"
+                  (delete "-Dman=false" #$flags)))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'patch-docbook-xml
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (with-directory-excursion "docs"
+                    (substitute* (find-files "." "\\.xml$")
+                      (("http://www.oasis-open.org/docbook/xml/4\\.5/")
+                       (string-append (assoc-ref inputs "docbook-xml-4.5")
+                                      "/xml/dtd/docbook/"))
+                      (("http://www.oasis-open.org/docbook/xml/4\\.2/")
+                       (string-append (assoc-ref inputs "docbook-xml-4.2")
+                                      "/xml/dtd/docbook/"))))))
+              (add-after 'install 'move-doc
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (let* ((out (assoc-ref outputs "out"))
+                         (doc (assoc-ref outputs "doc"))
+                         (html (string-append "/share/gtk-doc")))
+                    (mkdir-p (string-append doc "/share"))
+                    (rename-file
+                     (string-append out html)
+                     (string-append doc html))))))))))))
 
 (define (python-extension-suffix python triplet)
   "Determine the suffix for C extensions for PYTHON when compiled
@@ -602,10 +570,7 @@ provide bindings to call into the C library.")
               (patches (search-patches
                         "gobject-introspection-cc-1.72.patch"
                         "gobject-introspection-girepository.patch"
-                        "gobject-introspection-absolute-shlib-path-1.72.patch"))))
-    (propagated-inputs
-     (modify-inputs (package-propagated-inputs gobject-introspection)
-       (replace "glib" glib-next)))))
+                        "gobject-introspection-absolute-shlib-path-1.72.patch"))))))
 
 (define intltool
   (package
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 7aa7180f5e..ddbe86a39b 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -12856,7 +12856,7 @@ GObject introspection bindings.")
     (propagated-inputs
      (list polkit))
     (inputs
-     (list glib-next
+     (list glib
            gtk
            json-glib
            libadwaita
@@ -12865,7 +12865,7 @@ GObject introspection bindings.")
            polkit))
     (native-inputs
      (list gettext-minimal
-           `(,glib-next "bin")          ;for gdbus-codegen, etc.
+           `(,glib "bin")          ;for gdbus-codegen, etc.
            itstool
            libxml2
            pkg-config))
@@ -13133,7 +13133,7 @@ your data.")
                    (substitute* "build-aux/meson/meson_post_install.py"
                      (("gtk-update-icon-cache") (which "true"))))))))
     (native-inputs
-     (list `(,glib-next "bin")
+     (list `(,glib "bin")
            gettext-minimal
            itstool
            pkg-config))
@@ -13141,7 +13141,7 @@ your data.")
      (list json-glib
            jsonrpc-glib
            gettext-minimal
-           glib-next
+           glib
            gsettings-desktop-schemas
            gspell
            libgda
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 1d547d6ac7..048d48a2bc 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -632,7 +632,7 @@ printing and other features typical of a source code editor.")
      ;; gtksourceview-5.pc refers to all these.
      (list fontconfig
            fribidi
-           glib-next
+           glib
            gtk
            libxml2
            pango
@@ -2928,11 +2928,11 @@ Unix desktop environment under X11 as well as Wayland.")
                             (substitute* "meson.build"
                               (("gtk_update_icon_cache: true")
                                "gtk_update_icon_cache: false")))))))
-    (native-inputs (list `(,glib-next "bin")
+    (native-inputs (list `(,glib "bin")
                          gobject-introspection
                          pkg-config
                          vala))
-    (inputs (list glib-next gtk libadwaita))
+    (inputs (list glib gtk libadwaita))
     (home-page "https://gitlab.gnome.org/GNOME/libpanel")
     (synopsis "Dock and panel library for GTK 4")
     (description "Libpanel provides a library to create IDE-like applications
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 1fb0bbcd26..1ca1753e46 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2327,7 +2327,7 @@ capabilities.")
               (setenv "DISPLAY" ":1")
               #t)))))
     (inputs
-     (list guile-3.0 guile-lib glib-next))
+     (list guile-3.0 guile-lib glib))
     (native-inputs
      (list autoconf
            automake
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 446580dc52..f180d3c1e2 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -6497,7 +6497,7 @@ and as an LV2 plugin.")
            flex
            font-dseg
            gettext-minimal
-           glib-next
+           glib
            glibc
            graphviz
            gtk
@@ -6535,7 +6535,7 @@ and as an LV2 plugin.")
      ;; XDG_DATA_DIRS.
      (list breeze-icons                 ;native because not executable
            help2man
-           `(,glib-next "bin")          ;for 'glib-compile-resources'
+           `(,glib "bin")               ;for 'glib-compile-resources'
            pkg-config
            python-sphinx
            python-sphinx-intl
diff --git a/gnu/packages/patches/glib-skip-failing-test.patch b/gnu/packages/patches/glib-skip-failing-test.patch
index c7706aaa74..3fde5cb1e2 100644
--- a/gnu/packages/patches/glib-skip-failing-test.patch
+++ b/gnu/packages/patches/glib-skip-failing-test.patch
@@ -10,12 +10,13 @@ diff --git a/gio/tests/meson.build b/gio/tests/meson.build
 index a926ae0..4fdbe7a 100644
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -317,10 +317,6 @@ if host_machine.system() != 'windows'
+@@ -317,11 +317,6 @@ if host_machine.system() != 'windows'
          'extra_sources' : [extra_sources, gdbus_test_codegen_generated, gdbus_test_codegen_generated_interface_info],
          'c_args' : ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32'],
        },
 -      'gdbus-threading' : {
 -        'extra_sources' : extra_sources,
+-        'extra_programs': extra_programs,
 -        'suite' : ['slow'],
 -      },
        'gmenumodel' : {