gnu: patchage: Update to 1.0.2.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
index 369bd37..12ba6e9 100644 (file)
@@ -3,7 +3,7 @@
 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
@@ -11,7 +11,8 @@
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
-;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,6 +55,7 @@
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
@@ -165,7 +167,7 @@ shared NFS home directories.")
 (define glib
   (package
    (name "glib")
-   (version "2.60.6")
+   (version "2.62.6")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/"
@@ -173,7 +175,7 @@ shared NFS home directories.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0v7vpx2md1gn0wwiirn7g4bhf2csfvcr03y96q2zv97ain6sp3zz"))
+              "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh"))
             (patches (search-patches "glib-tests-timer.patch"))
             (modules '((guix build utils)))
             (snippet
@@ -188,11 +190,9 @@ shared NFS home directories.")
     `(("pcre" ,pcre)  ; in the Requires.private field of glib-2.0.pc
       ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
       ;; These are in the Requires.private field of gio-2.0.pc
-      ("util-linux" ,util-linux)  ; for libmount
+      ("util-linux" ,util-linux "lib")  ;for libmount
       ("libselinux" ,libselinux)
       ("zlib" ,zlib)))
-   (inputs
-    `(("coreutils" ,coreutils)))
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("m4" ,m4) ; for installing m4 macros
@@ -213,6 +213,15 @@ shared NFS home directories.")
                  (string-append "command_line = g_strdup_printf (\""
                                 dbus "/bin/dbus-launch")))
               #t)))
+        (add-after 'unpack 'patch-gio-launch-desktop
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              ;; See also <https://gitlab.gnome.org/GNOME/glib/issues/1633>
+              ;; for another future fix.
+              (substitute* "gio/gdesktopappinfo.c"
+               (("gio-launch-desktop")
+                (string-append out "/libexec/gio-launch-desktop")))
+              #t)))
         (add-before 'build 'pre-build
           (lambda* (#:key inputs outputs #:allow-other-keys)
             ;; For tests/gdatetime.c.
@@ -293,7 +302,7 @@ shared NFS home directories.")
                       (;; Requires /etc/machine-id.
                        "/gdbus/codegen-peer-to-peer"))
 
-                     ("gio/tests/gdbus-unix-addresses.c"
+                     ("gio/tests/gdbus-address-get-session.c"
                       (;; Requires /etc/machine-id.
                        "/gdbus/x11-autolaunch"))
 
@@ -321,6 +330,13 @@ shared NFS home directories.")
               (mkdir-p bin)
               (rename-file (string-append out "/bin")
                            (string-append bin "/bin"))
+              ;; This one is an implementation detail of glib.
+              ;; It is wrong that that's in "/bin" in the first place,
+              ;; but that's what upstream is doing right now.
+              ;; See <https://gitlab.gnome.org/GNOME/glib/issues/1633>.
+              (mkdir (string-append out "/libexec"))
+              (rename-file (string-append bin "/bin/gio-launch-desktop")
+                           (string-append out "/libexec/gio-launch-desktop"))
               ;; Do not refer to "bindir", which points to "${prefix}/bin".
               ;; We don't patch "bindir" to point to "$bin/bin", because that
               ;; would create a reference cycle between the "out" and "bin"
@@ -389,14 +405,14 @@ dynamic loading, and an object system.")
 (define gobject-introspection
   (package
     (name "gobject-introspection")
-    (version "1.60.2")
+    (version "1.62.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/"
                    "gobject-introspection/" (version-major+minor version)
                    "/gobject-introspection-" version ".tar.xz"))
              (sha256
-              (base32 "172ymc1vbg2rclq1rszx4y32vm900nn1mc4qg1a4mqxjiwvf5pzz"))
+              (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi"))
              (patches (search-patches
                        "gobject-introspection-cc.patch"
                        "gobject-introspection-girepository.patch"
@@ -541,7 +557,7 @@ translated.")
 (define dbus-glib
   (package
     (name "dbus-glib")
-    (version "0.108")
+    (version "0.110")
     (source (origin
              (method url-fetch)
              (uri
@@ -549,7 +565,7 @@ translated.")
                              version ".tar.gz"))
              (sha256
               (base32
-               "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
+               "09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w"))))
     (build-system gnu-build-system)
     (propagated-inputs ; according to dbus-glib-1.pc
      `(("dbus" ,dbus)
@@ -569,7 +585,7 @@ by GDBus included in Glib.")
 (define libsigc++
   (package
     (name "libsigc++")
-    (version "2.10.2")
+    (version "2.10.3")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/libsigc++/"
@@ -577,7 +593,7 @@ by GDBus included in Glib.")
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
-               "163s14d1rqp82gc1vsm3q0wzsbdicb9q6307kz0zk5lm6x9h5jmi"))))
+               "11j7j1jv4z58d9s7jvl42fnqa1dzl4idgil9r45cjv1w673dys0b"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("m4" ,m4)))
@@ -596,7 +612,7 @@ has an ease of use unmatched by other C++ callback libraries.")
 (define glibmm
   (package
     (name "glibmm")
-    (version "2.60.0")
+    (version "2.62.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/glibmm/"
@@ -604,7 +620,7 @@ has an ease of use unmatched by other C++ callback libraries.")
                                  "/glibmm-" version ".tar.xz"))
              (sha256
               (base32
-               "1g7jxqd270dv2d83r7pf5893mwpz7d5xib0q01na2yalh34v38d3"))))
+               "1ziwx6r7k7wbvg4qq1rgrv8zninapgrmhn1hs6926a3krh9ryr9n"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -669,7 +685,7 @@ useful for C++.")
     (arguments
      `(#:tests? #f                      ;segfaults during tests
        #:configure-flags '("LIBS=-lcairo-gobject")))
-    (home-page "https://pypi.python.org/pypi/PyGObject")
+    (home-page "https://pypi.org/project/PyGObject/")
     (synopsis "Python bindings for GObject")
     (description
      "Python bindings for GLib, GObject, and GIO.")
@@ -678,7 +694,7 @@ useful for C++.")
 (define-public python-pygobject
   (package
     (name "python-pygobject")
-    (version "3.28.3")
+    (version "3.34.0")
     (source
      (origin
        (method url-fetch)
@@ -687,24 +703,20 @@ useful for C++.")
                            "/pygobject-" version ".tar.xz"))
        (sha256
         (base32
-         "1c6h3brzlyvzbpdsammnd957azmp6cbzqrd65r400vnh2l8f5lrx"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'delete-broken-tests
-           (lambda _
-             ;; FIXME: this test freezes and times out.
-             (delete-file "tests/test_mainloop.py")
-             ;; FIXME: this test fails with this kind of error:
-             ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler
-             (delete-file "tests/test_ossig.py")
+         "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; We disable these tests in a snippet so that they are inherited
+           ;; by the Python 2 variant which is built differently.
+           (with-directory-excursion "tests"
+             ;; FIXME: These tests require Gdk and/or Gtk 4.
+             (for-each delete-file
+                       '("test_atoms.py" "test_overrides_gtk.py"))
              #t)))))
+    (build-system meson-build-system)
     (native-inputs
-     `(("which" ,which)
-       ;for tests: dbus-run-session and glib-compile-schemas
-       ("dbus" ,dbus)
-       ("glib-bin" ,glib "bin")
+     `(("glib-bin" ,glib "bin")
        ("pkg-config" ,pkg-config)
        ("python-pytest" ,python-pytest)))
     (inputs
@@ -727,49 +739,35 @@ useful for C++.")
 (define-public python2-pygobject
   (package (inherit (strip-python2-variant python-pygobject))
     (name "python2-pygobject")
+
+    ;; Note: We use python-build-system here, because Meson only supports
+    ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it
+    ;; difficult to use for Python 2 projects.
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'delete-broken-tests
+           (lambda _
+             ;; FIXME: this test freezes and times out.
+             (delete-file "tests/test_mainloop.py")
+             ;; FIXME: this test fails with this kind of error:
+             ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler
+             (delete-file "tests/test_ossig.py")
+             #t)))))
     (inputs
-     `(("python" ,python-2)
-       ("python-pycairo" ,python2-pycairo)
+     `(("python-pycairo" ,python2-pycairo)
        ("gobject-introspection" ,gobject-introspection)))
     (native-inputs
-     `(("which" ,which)
-       ;for tests: dbus-run-session and glib-compile-schemas
-       ("dbus" ,dbus)
-       ("glib-bin" ,glib "bin")
+     `(("glib-bin" ,glib "bin")
        ("pkg-config" ,pkg-config)
        ("python-pytest" ,python2-pytest)))))
 
-;; Newer version of this core-updates package, for Lollypop.
-(define-public python-pygobject-3.34
-  (package/inherit
-   python-pygobject
-   (version "3.34.0")
-   (source
-    (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnome/sources/pygobject/"
-                          (version-major+minor version)
-                          "/pygobject-" version ".tar.xz"))
-      (sha256
-       (base32 "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7"))))
-   (build-system meson-build-system)
-   (arguments
-    `(#:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'delete-broken-tests
-          (lambda _
-            (with-directory-excursion "tests"
-              (for-each
-               delete-file
-               ;; FIXME: these tests require Gdk and/or Gtk 4.
-               '("test_atoms.py"
-                 "test_overrides_gtk.py")))
-            #t)))))))
-
 (define-public perl-glib
   (package
     (name "perl-glib")
-    (version "1.3291")
+    (version "1.3292")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -777,7 +775,7 @@ useful for C++.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "0whz5f87wvzq8zsva85h06mkfqim2ciq845ixlvmafwxggccv0xr"))))
+                "1q5075d6v2g5sm675hyzrcpxsrh09z83crfci8b0wl3jwmnz0frg"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-extutils-depends" ,perl-extutils-depends)
@@ -809,6 +807,7 @@ up the Gnome environment, and are used in many unrelated projects.")
          "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
        (patches
         (list
+         (search-patch "telepathy-glib-channel-memory-leak.patch")
          ;; Don't use the same test name for multiple tests.
          ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
          (origin
@@ -828,7 +827,18 @@ up the Gnome environment, and are used in many unrelated projects.")
        ;;
        ;;   EOFError: EOF read where object expected
        ;;   make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1
-       #:parallel-build? #f))
+       #:parallel-build? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             ;; None of the tests below are able to find the org.gtk.vfs.Daemon
+             ;; service file provided by gvfs.
+             (substitute* "tests/dbus/Makefile.in"
+               (("test-contacts\\$\\(EXEEXT\\)") "")
+               (("test-file-transfer-channel\\$\\(EXEEXT\\)") "")
+               (("test-stream-tube\\$\\(EXEEXT\\)") ""))
+             #t)))))
     (native-inputs
      `(("glib" ,glib "bin") ; uses glib-mkenums
        ("gobject-introspection" ,gobject-introspection)
@@ -897,7 +907,7 @@ programming language.  It also contains the utility
 (define-public appstream-glib
   (package
     (name "appstream-glib")
-    (version "0.7.16")
+    (version "0.7.17")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://people.freedesktop.org/~hughsient/"
@@ -905,7 +915,7 @@ programming language.  It also contains the utility
                                   "appstream-glib-" version ".tar.xz"))
               (sha256
                (base32
-                "14jr1psx5kxywdprgbqn79w309yz8lrqlsq7288hfrf87gbr1wh4"))))
+                "0jg58m1p5xfrh8zkpqhhg00nqs727z5i1qy6sb0a3vyc98fyk9vw"))))
     (build-system meson-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)
@@ -914,15 +924,14 @@ programming language.  It also contains the utility
     (propagated-inputs
      `(("gcab" ,gcab) ; for .pc file
        ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file
-       ("util-linux" ,util-linux))) ; for .pc file
+       ("libuuid" ,util-linux "lib"))) ; for .pc file
     (inputs
      `(("glib" ,glib)
        ("gperf" ,gperf)
        ("gtk+" ,gtk+)
        ("json-glib" ,json-glib)
        ("libarchive" ,libarchive)
-       ("libsoup" ,libsoup)
-       ("libyaml" ,libyaml)))
+       ("libsoup" ,libsoup)))
     (arguments
      `(#:configure-flags
        (list "-Ddep11=false"
@@ -1067,3 +1076,49 @@ simple methods via GObject-Introspection.")
 used to create D-Bus sockets inside a Linux container that forwards requests
 to the host system, optionally with filters applied.")
     (license license:lgpl2.1+)))
+
+(define-public dbus-test-runner
+  (package
+    (name "dbus-test-runner")
+    (version "19.04.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://launchpad.net/dbus-test-runner/"
+                    (version-major+minor version) "/" version
+                    "/+download/dbus-test-runner-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0xnbay58xn0hav208mdsg8dd176w57dcpw1q2k0g5fh9v7xk4nk4"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'fix-test-paths
+           ;; add missing space
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "Makefile.in"
+               (("#!/bin/bash") (string-append "#!" (which "bash"))))
+             (substitute* "tests/Makefile.in"
+               (("/bin/sh") (which "sh"))
+               (("#!/bin/bash") (string-append "#!" (which "bash")))
+               (("echo cat") (string-append "echo " (which "cat")))
+               (("/bin/true") (which "true")))
+             #t)))))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("glib" ,glib)
+       ("dbus-glib" ,dbus-glib)))
+    (native-inputs
+     `(("glib:bin" ,glib "bin")
+       ("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)
+       ;; following used for tests
+       ("python" ,python)
+       ("python-dbusmock" ,python-dbusmock)
+       ("xvfb" ,xorg-server-for-tests)))
+    (home-page "https://launchpad.net/dbus-test-runner")
+    (synopsis "Run a executables under a new DBus session for testing")
+    (description "A small little utility to run a couple of executables under a
+new DBus session for testing.")
+    (license license:gpl3)))