unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Raghav Gururajan via Guix-patches via <guix-patches@gnu.org>
To: "Danny Milosavljevic" <dannym@scratchpost.org>
Cc: 42958@debbugs.gnu.org, Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#42958]
Date: Fri, 04 Dec 2020 06:08:44 +0000	[thread overview]
Message-ID: <17d09dcc473fbea9ad54ff5dbf58a381@disroot.org> (raw)
In-Reply-To: <20201129132110.644acc27@scratchpost.org>

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

@Danny

> could you consider updating the patch to incorporate Efraim's changes,
> if desired?

Please find the revised patches attached, for glib and cairo.

Regards,
RG.

[-- Attachment #2: 0001-gnu-glib-Make-some-cosmetic-changes.patch --]
[-- Type: application/octet-stream, Size: 20568 bytes --]

From 107c649ff6c1db6e325217a2a7f8341b5526e1b5 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Tue, 1 Dec 2020 18:52:09 -0500
Subject: [PATCH 01/11] gnu: glib: Make some cosmetic changes.

* gnu/packages/glib.scm (glib): Make some cosmetic changes.
---
 gnu/packages/glib.scm | 401 ++++++++++++++++++++----------------------
 1 file changed, 193 insertions(+), 208 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 43523e516d..5ef0a4e515 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -179,214 +179,199 @@ shared NFS home directories.")
 
 (define glib
   (package
-   (name "glib")
-   (version "2.62.6")
-   (replacement glib-with-gio-patch)
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://gnome/sources/"
-                                name "/" (string-take version 4) "/"
-                                name "-" version ".tar.xz"))
-            (sha256
-             (base32
-              "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh"))
-            (patches (search-patches "glib-tests-timer.patch"))
-            (modules '((guix build utils)))
-            (snippet
-             '(begin
-                (substitute* "tests/spawn-test.c"
-                  (("/bin/sh") "sh"))
-                #t))))
-   (build-system meson-build-system)
-   (outputs '("out"           ; everything
-              "bin"))         ; glib-mkenums, gtester, etc.; depends on Python
-   (propagated-inputs
-    `(("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 "lib")  ;for libmount
-      ("libselinux" ,libselinux)
-      ("zlib" ,zlib)))
-   (native-inputs
-    `(("gettext" ,gettext-minimal)
-      ("m4" ,m4) ; for installing m4 macros
-      ("dbus" ,dbus)                              ; for GDBus tests
-      ("pkg-config" ,pkg-config)
-      ("python" ,python-wrapper)
-      ("perl" ,perl)                              ; needed by GIO tests
-      ("tzdata" ,tzdata-for-tests)))                  ; for tests/gdatetime.c
-   (arguments
-    `(#:disallowed-references (,tzdata-for-tests)
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'patch-dbus-launch-path
-          (lambda* (#:key inputs #:allow-other-keys)
-            (let ((dbus (assoc-ref inputs "dbus")))
-              (substitute* "gio/gdbusaddress.c"
-                (("command_line = g_strdup_printf \\(\"dbus-launch")
-                 (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.
-            (setenv "TZDIR"
-                    (string-append (assoc-ref inputs "tzdata")
-                                   "/share/zoneinfo"))
-
-            ;; Some tests want write access there.
-            (setenv "HOME" (getcwd))
-            (setenv "XDG_CACHE_HOME" (getcwd))
-            #t))
-        (add-after 'unpack 'disable-failing-tests
-          (lambda _
-            (let ((disable
-                   (lambda (test-file test-paths)
-                     (define pattern+procs
-                       (map (lambda (test-path)
-                              (cons
-                               ;; XXX: only works for single line statements.
-                               (format #f "g_test_add_func.*\"~a\".*" test-path)
-                               (const "")))
-                            test-paths))
-                     (substitute test-file pattern+procs)))
-                  (failing-tests
-                   '(("glib/tests/thread.c"
-                      (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
-                       ;; as found on hydra.gnu.org, and strace(1) doesn't
-                       ;; recognize it.
-                       "/thread/thread4"))
-
-                     ;; This tries to find programs in FHS directories.
-                     ("glib/tests/utils.c"
-                      ("/utils/find-program"))
-
-                     ;; This fails because "glib/tests/echo-script" cannot be
-                     ;; found.
-                     ("glib/tests/spawn-singlethread.c"
-                      ("/gthread/spawn-script"))
-
-                     ("glib/tests/timer.c"
-                      (;; fails if compiler optimizations are enabled, which they
-                       ;; are by default.
-                       "/timer/stop"))
-
-                     ("gio/tests/gapplication.c"
-                      (;; XXX: proven to be unreliable.  See:
-                       ;;  <https://bugs.debian.org/756273>
-                       ;;  <http://bugs.gnu.org/18445>
-                       "/gapplication/quit"
-
-                       ;; XXX: fails randomly for unknown reason. See:
-                       ;;  <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
-                       "/gapplication/local-actions"))
-
-                     ("gio/tests/contenttype.c"
-                      (;; XXX: requires shared-mime-info.
-                       "/contenttype/guess"
-                       "/contenttype/guess_svg_from_data"
-                       "/contenttype/subtype"
-                       "/contenttype/list"
-                       "/contenttype/icon"
-                       "/contenttype/symbolic-icon"
-                       "/contenttype/tree"))
-
-                     ("gio/tests/appinfo.c"
-                      (;; XXX: requires update-desktop-database.
-                       "/appinfo/associations"))
-
-                     ("gio/tests/desktop-app-info.c"
-                      (;; XXX: requires update-desktop-database.
-                       "/desktop-app-info/delete"
-                       "/desktop-app-info/default"
-                       "/desktop-app-info/fallback"
-                       "/desktop-app-info/lastused"
-                       "/desktop-app-info/search"))
-
-                     ("gio/tests/gdbus-peer.c"
-                      (;; Requires /etc/machine-id.
-                       "/gdbus/codegen-peer-to-peer"))
-
-                     ("gio/tests/gdbus-address-get-session.c"
-                      (;; Requires /etc/machine-id.
-                       "/gdbus/x11-autolaunch"))
-
-                     ("gio/tests/gsocketclient-slow.c"
-                      (;; These tests tries to resolve "localhost", and fails.
-                       "/socket-client/happy-eyeballs/slow"
-                       "/socket-client/happy-eyeballs/cancellation/delayed"))
-
-                     )))
-              (for-each (lambda (x) (apply disable x)) failing-tests)
-              #t)))
-        (replace 'check
-          (lambda _
-            (setenv "MESON_TESTTHREADS"
-                    (number->string (parallel-job-count)))
-            ;; Do not run tests marked as "flaky".
-            (invoke "meson" "test" "--no-suite" "flaky")))
-        ;; TODO: meson does not permit the bindir to be outside of prefix.
-        ;; See https://github.com/mesonbuild/meson/issues/2561
-        ;; We can remove this once meson is patched.
-        (add-after 'install 'move-executables
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out"))
-                  (bin (assoc-ref outputs "bin")))
-              (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"
-              ;; outputs.
-              (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc")
-                                 (string-append out "/lib/pkgconfig/glib-2.0.pc"))
-                (("bindir=\\$\\{prefix\\}/bin") "")
-                (("=\\$\\{bindir\\}/") "="))
-              #t))))))
-      ;; TODO: see above for explanation.
-      ;; #:configure-flags (list (string-append "--bindir="
-      ;;                                        (assoc-ref %outputs "bin")
-      ;;                                        "/bin"))
-
-   (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
-    ;; path for .gir files, and it's also a search path for schemas produced
-    ;; by 'glib-compile-schemas'.
-    (list (search-path-specification
-           (variable "XDG_DATA_DIRS")
-           (files '("share")))
-          ;; To load extra gio modules from glib-networking, etc.
-          (search-path-specification
-           (variable "GIO_EXTRA_MODULES")
-           (files '("lib/gio/modules")))))
-   (search-paths native-search-paths)
-   (properties '((hidden? . #t)))
-
-   (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
-   (description
-    "GLib provides data structure handling for C, portability wrappers,
-and interfaces for such runtime functionality as an event loop, threads,
-dynamic loading, and an object system.")
-   (home-page "https://developer.gnome.org/glib/")
-   (license license:lgpl2.1+)))
+    (name "glib")
+    (version "2.62.6")
+    (properties '((hidden? . #t)))
+    (replacement glib-with-gio-patch)
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/"
+                       name "/" (string-take version 4) "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh"))
+       (patches
+        (search-patches "glib-tests-timer.patch"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "tests/spawn-test.c"
+             (("/bin/sh") "sh"))
+           #t))))
+    (build-system meson-build-system)
+    (outputs '("out"  ; everything
+               "bin")) ; glib-mkenums, gtester, etc.; depends on Python
+    (arguments
+     `(#:disallowed-references (,tzdata-for-tests)
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-dbus-launch-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((dbus (assoc-ref inputs "dbus")))
+               (substitute* "gio/gdbusaddress.c"
+                 (("command_line = g_strdup_printf \\(\"dbus-launch")
+                  (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.
+             (setenv "TZDIR"
+                     (string-append (assoc-ref inputs "tzdata")
+                                    "/share/zoneinfo"))
+             ;; Some tests want write access there.
+             (setenv "HOME" (getcwd))
+             (setenv "XDG_CACHE_HOME" (getcwd))
+             #t))
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (let ((disable
+                    (lambda (test-file test-paths)
+                      (define pattern+procs
+                        (map (lambda (test-path)
+                               (cons
+                                ;; XXX: only works for single line statements.
+                                (format #f "g_test_add_func.*\"~a\".*" test-path)
+                                (const "")))
+                             test-paths))
+                      (substitute test-file pattern+procs)))
+                   (failing-tests
+                    '(("glib/tests/thread.c"
+                       ( ;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
+                        ;; as found on hydra.gnu.org, and strace(1) doesn't
+                        ;; recognize it.
+                        "/thread/thread4"))
+                      ;; This tries to find programs in FHS directories.
+                      ("glib/tests/utils.c"
+                       ("/utils/find-program"))
+                      ;; This fails because "glib/tests/echo-script" cannot be
+                      ;; found.
+                      ("glib/tests/spawn-singlethread.c"
+                       ("/gthread/spawn-script"))
+                      ("glib/tests/timer.c"
+                       ( ;; fails if compiler optimizations are enabled, which they
+                        ;; are by default.
+                        "/timer/stop"))
+                      ("gio/tests/gapplication.c"
+                       ( ;; XXX: proven to be unreliable.  See:
+                        ;;  <https://bugs.debian.org/756273>
+                        ;;  <http://bugs.gnu.org/18445>
+                        "/gapplication/quit"
+                        ;; XXX: fails randomly for unknown reason. See:
+                        ;;  <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
+                        "/gapplication/local-actions"))
+                      ("gio/tests/contenttype.c"
+                       ( ;; XXX: requires shared-mime-info.
+                        "/contenttype/guess"
+                        "/contenttype/guess_svg_from_data"
+                        "/contenttype/subtype"
+                        "/contenttype/list"
+                        "/contenttype/icon"
+                        "/contenttype/symbolic-icon"
+                        "/contenttype/tree"))
+                      ("gio/tests/appinfo.c"
+                       ( ;; XXX: requires update-desktop-database.
+                        "/appinfo/associations"))
+                      ("gio/tests/desktop-app-info.c"
+                       ( ;; XXX: requires update-desktop-database.
+                        "/desktop-app-info/delete"
+                        "/desktop-app-info/default"
+                        "/desktop-app-info/fallback"
+                        "/desktop-app-info/lastused"
+                        "/desktop-app-info/search"))
+                      ("gio/tests/gdbus-peer.c"
+                       ( ;; Requires /etc/machine-id.
+                        "/gdbus/codegen-peer-to-peer"))
+                      ("gio/tests/gdbus-address-get-session.c"
+                       ( ;; Requires /etc/machine-id.
+                        "/gdbus/x11-autolaunch"))
+                      ("gio/tests/gsocketclient-slow.c"
+                       ( ;; These tests tries to resolve "localhost", and fails.
+                        "/socket-client/happy-eyeballs/slow"
+                        "/socket-client/happy-eyeballs/cancellation/delayed")))))
+               (for-each (lambda (x) (apply disable x)) failing-tests)
+               #t)))
+         (replace 'check
+           (lambda _
+             (setenv "MESON_TESTTHREADS"
+                     (number->string (parallel-job-count)))
+             ;; Do not run tests marked as "flaky".
+             (invoke "meson" "test" "--no-suite" "flaky")))
+         ;; TODO: meson does not permit the bindir to be outside of prefix.
+         ;; See https://github.com/mesonbuild/meson/issues/2561
+         ;; We can remove this once meson is patched.
+         (add-after 'install 'move-executables
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (bin (assoc-ref outputs "bin")))
+               (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"
+               ;; outputs.
+               (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc")
+                                  (string-append out "/lib/pkgconfig/glib-2.0.pc"))
+                 (("bindir=\\$\\{prefix\\}/bin") "")
+                 (("=\\$\\{bindir\\}/") "="))
+               #t))))))
+    ;; TODO: see above for explanation.
+    ;; #:configure-flags (list (string-append "--bindir="
+    ;;                                        (assoc-ref %outputs "bin")
+    ;;                                        "/bin"))
+    (native-inputs
+     `(("dbus" ,dbus)                   ; for GDBus tests
+       ("gettext" ,gettext-minimal)
+       ("m4" ,m4)                       ; for installing m4 macros
+       ("perl" ,perl)                   ; needed by GIO tests
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("tzdata" ,tzdata-for-tests)))   ; for tests/gdatetime.c
+    (propagated-inputs
+     `(("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
+       ("libselinux" ,libselinux) ; in the Requires.private field of gio-2.0.pc
+       ("pcre" ,pcre)   ; in the Requires.private field of glib-2.0.pc
+       ("util-linux" ,util-linux "lib") ;for libmount
+       ("zlib" ,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
+     ;; path for .gir files, and it's also a search path for schemas produced
+     ;; by 'glib-compile-schemas'.
+     (list
+      (search-path-specification
+       (variable "XDG_DATA_DIRS")
+       (files '("share")))
+      ;; To load extra gio modules from glib-networking, etc.
+      (search-path-specification
+       (variable "GIO_EXTRA_MODULES")
+       (files '("lib/gio/modules")))))
+    (search-paths native-search-paths)
+    (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
+    (description "GLib provides data structure handling for C, portability
+wrappers, and interfaces for such runtime functionality as an event loop,
+threads, dynamic loading, and an object system.")
+    (home-page "https://developer.gnome.org/glib/")
+    (license license:lgpl2.1+)))
 
 (define glib-with-gio-patch
   ;; GLib with a fix for <https://bugs.gnu.org/35594>.
-- 
2.29.2


[-- Attachment #3: 0002-gnu-glib-Update-to-2.64.3.patch --]
[-- Type: application/octet-stream, Size: 17123 bytes --]

From ed6500a8bed1b364e530593dae4e46b19d9fa6d0 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 3 Dec 2020 23:43:36 -0500
Subject: [PATCH 02/11] gnu: glib: Update to 2.64.3.

* gnu/packages/glib.scm (glib) [version]: Update to 2.64.3.
[source]<origin>[sha256]: Modify base32.
[patches]: Add glib-disable-failing-tests.patch.
Remove glib-tests-timer.patch.
[arguments]<#:disallowed-references>: Remove argument.
<#:phases>['patch-python-references]: New phase.
['pre-check]: New phase.
['move-bin]: New phase.
['patch-dbus-launch-path]: Remove phase.
['patch-gio-launch-desktop]: Remove phase.
['pre-build]: Remove phase.
['disable-failing-tests]: Remove phase.
['check]: Remove phase.
['move-executables]: Remove phase.
[native-inputs]: Add intltool, python, libxml2 and libxslt.
Remove dbus.
[inputs]: Add dbus and libelf.
* gnu/packages/patches/glib-disable-failing-tests.patch: New file.
* gnu/packages/patches/glib-tests-timer.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Adjust.
---
 gnu/local.mk                                  |   2 +-
 gnu/packages/glib.scm                         | 174 +++++-------------
 .../patches/glib-disable-failing-tests.patch  |  84 +++++++++
 gnu/packages/patches/glib-tests-timer.patch   |  15 --
 4 files changed, 132 insertions(+), 143 deletions(-)
 create mode 100644 gnu/packages/patches/glib-disable-failing-tests.patch
 delete mode 100644 gnu/packages/patches/glib-tests-timer.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 45a396368f..06dc6ba9ac 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1057,7 +1057,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ghostscript-no-header-uuid.patch		\
   %D%/packages/patches/ghostscript-no-header-creationdate.patch \
   %D%/packages/patches/glib-appinfo-watch.patch			\
-  %D%/packages/patches/glib-tests-timer.patch			\
+  %D%/packages/patches/glib-disable-failing-tests.patch             \
   %D%/packages/patches/glibc-CVE-2018-11236.patch		\
   %D%/packages/patches/glibc-CVE-2018-11237.patch		\
   %D%/packages/patches/glibc-CVE-2019-7309.patch		\
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 5ef0a4e515..df355d50b7 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages elf)
   #:use-module (gnu packages enlightenment)
   #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
@@ -180,7 +181,7 @@ shared NFS home directories.")
 (define glib
   (package
     (name "glib")
-    (version "2.62.6")
+    (version "2.64.3")
     (properties '((hidden? . #t)))
     (replacement glib-with-gio-patch)
     (source
@@ -191,9 +192,9 @@ shared NFS home directories.")
                        name "/" (string-take version 4) "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh"))
+        (base32 "08pbgiv5m3rica4ydvwvpq5mrxbyswx7l1jzjc2ch52xjabvr77y"))
        (patches
-        (search-patches "glib-tests-timer.patch"))
+        (search-patches "glib-disable-failing-tests.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -201,30 +202,27 @@ shared NFS home directories.")
              (("/bin/sh") "sh"))
            #t))))
     (build-system meson-build-system)
-    (outputs '("out"  ; everything
+    (outputs '("out"   ; everything
                "bin")) ; glib-mkenums, gtester, etc.; depends on Python
     (arguments
      `(#:disallowed-references (,tzdata-for-tests)
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-dbus-launch-path
+         ;; Python references are not being patched in patch-phase of build,
+         ;; despite using python-wrapper as input. So we patch them manually.
+         (add-after 'unpack 'patch-python-references
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((dbus (assoc-ref inputs "dbus")))
-               (substitute* "gio/gdbusaddress.c"
-                 (("command_line = g_strdup_printf \\(\"dbus-launch")
-                  (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
+             (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in"
+                            "glib/gtester-report.in"
+                            "gobject/glib-genmarshal.in"
+                            "gobject/glib-mkenums.in")
+               (("@PYTHON@")
+                (string-append (assoc-ref inputs "python")
+                               "/bin/python"
+                               ,(version-major+minor
+                                 (package-version python)))))
+             #t))
+         (add-before 'check 'pre-check
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; For tests/gdatetime.c.
              (setenv "TZDIR"
@@ -234,124 +232,46 @@ shared NFS home directories.")
              (setenv "HOME" (getcwd))
              (setenv "XDG_CACHE_HOME" (getcwd))
              #t))
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (let ((disable
-                    (lambda (test-file test-paths)
-                      (define pattern+procs
-                        (map (lambda (test-path)
-                               (cons
-                                ;; XXX: only works for single line statements.
-                                (format #f "g_test_add_func.*\"~a\".*" test-path)
-                                (const "")))
-                             test-paths))
-                      (substitute test-file pattern+procs)))
-                   (failing-tests
-                    '(("glib/tests/thread.c"
-                       ( ;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
-                        ;; as found on hydra.gnu.org, and strace(1) doesn't
-                        ;; recognize it.
-                        "/thread/thread4"))
-                      ;; This tries to find programs in FHS directories.
-                      ("glib/tests/utils.c"
-                       ("/utils/find-program"))
-                      ;; This fails because "glib/tests/echo-script" cannot be
-                      ;; found.
-                      ("glib/tests/spawn-singlethread.c"
-                       ("/gthread/spawn-script"))
-                      ("glib/tests/timer.c"
-                       ( ;; fails if compiler optimizations are enabled, which they
-                        ;; are by default.
-                        "/timer/stop"))
-                      ("gio/tests/gapplication.c"
-                       ( ;; XXX: proven to be unreliable.  See:
-                        ;;  <https://bugs.debian.org/756273>
-                        ;;  <http://bugs.gnu.org/18445>
-                        "/gapplication/quit"
-                        ;; XXX: fails randomly for unknown reason. See:
-                        ;;  <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
-                        "/gapplication/local-actions"))
-                      ("gio/tests/contenttype.c"
-                       ( ;; XXX: requires shared-mime-info.
-                        "/contenttype/guess"
-                        "/contenttype/guess_svg_from_data"
-                        "/contenttype/subtype"
-                        "/contenttype/list"
-                        "/contenttype/icon"
-                        "/contenttype/symbolic-icon"
-                        "/contenttype/tree"))
-                      ("gio/tests/appinfo.c"
-                       ( ;; XXX: requires update-desktop-database.
-                        "/appinfo/associations"))
-                      ("gio/tests/desktop-app-info.c"
-                       ( ;; XXX: requires update-desktop-database.
-                        "/desktop-app-info/delete"
-                        "/desktop-app-info/default"
-                        "/desktop-app-info/fallback"
-                        "/desktop-app-info/lastused"
-                        "/desktop-app-info/search"))
-                      ("gio/tests/gdbus-peer.c"
-                       ( ;; Requires /etc/machine-id.
-                        "/gdbus/codegen-peer-to-peer"))
-                      ("gio/tests/gdbus-address-get-session.c"
-                       ( ;; Requires /etc/machine-id.
-                        "/gdbus/x11-autolaunch"))
-                      ("gio/tests/gsocketclient-slow.c"
-                       ( ;; These tests tries to resolve "localhost", and fails.
-                        "/socket-client/happy-eyeballs/slow"
-                        "/socket-client/happy-eyeballs/cancellation/delayed")))))
-               (for-each (lambda (x) (apply disable x)) failing-tests)
-               #t)))
-         (replace 'check
-           (lambda _
-             (setenv "MESON_TESTTHREADS"
-                     (number->string (parallel-job-count)))
-             ;; Do not run tests marked as "flaky".
-             (invoke "meson" "test" "--no-suite" "flaky")))
-         ;; TODO: meson does not permit the bindir to be outside of prefix.
-         ;; See https://github.com/mesonbuild/meson/issues/2561
-         ;; We can remove this once meson is patched.
-         (add-after 'install 'move-executables
+         ;; Meson does not permit the bindir to be outside of prefix.
+         (add-after 'install 'move-bin
            (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (bin (assoc-ref outputs "bin")))
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (assoc-ref outputs "bin")))
                (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"))
+               (rename-file
+                (string-append out "/bin")
+                (string-append bin "/bin"))
                ;; 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"
                ;; outputs.
-               (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc")
-                                  (string-append out "/lib/pkgconfig/glib-2.0.pc"))
+               (substitute*
+                   (list
+                    (string-append out "/lib/pkgconfig/gio-2.0.pc")
+                    (string-append out "/lib/pkgconfig/glib-2.0.pc"))
                  (("bindir=\\$\\{prefix\\}/bin") "")
                  (("=\\$\\{bindir\\}/") "="))
                #t))))))
-    ;; TODO: see above for explanation.
-    ;; #:configure-flags (list (string-append "--bindir="
-    ;;                                        (assoc-ref %outputs "bin")
-    ;;                                        "/bin"))
     (native-inputs
-     `(("dbus" ,dbus)                   ; for GDBus tests
-       ("gettext" ,gettext-minimal)
-       ("m4" ,m4)                       ; for installing m4 macros
-       ("perl" ,perl)                   ; needed by GIO tests
+     `(("gettext" ,gettext-minimal)
+       ("libintl" ,intltool)
+       ("m4" ,m4)
+       ("perl" ,perl)
        ("pkg-config" ,pkg-config)
-       ("python" ,python-wrapper)
-       ("tzdata" ,tzdata-for-tests)))   ; for tests/gdatetime.c
+       ("python-wrapper" ,python-wrapper)
+       ("python" ,python)               ; For 'patch-python-references
+       ("tzdata" ,tzdata-for-tests)
+       ("xmllint" ,libxml2)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("dbus" ,dbus)
+       ("libelf" ,libelf)))
     (propagated-inputs
-     `(("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
-       ("libselinux" ,libselinux) ; in the Requires.private field of gio-2.0.pc
-       ("pcre" ,pcre)   ; in the Requires.private field of glib-2.0.pc
-       ("util-linux" ,util-linux "lib") ;for libmount
-       ("zlib" ,zlib))) ; in the Requires.private field of glib-2.0.pc
+     `(("libffi" ,libffi)
+       ("libselinux" ,libselinux)
+       ("pcre" ,pcre)
+       ("util-linux" ,util-linux "lib")
+       ("zlib" ,zlib)))
     (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
diff --git a/gnu/packages/patches/glib-disable-failing-tests.patch b/gnu/packages/patches/glib-disable-failing-tests.patch
new file mode 100644
index 0000000000..3601c42030
--- /dev/null
+++ b/gnu/packages/patches/glib-disable-failing-tests.patch
@@ -0,0 +1,84 @@
+From a2e6783f2278ed32b1e552691ec5d67d6940757e Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <raghavgururajan@disroot.org>
+Date: Tue, 9 Jun 2020 05:17:53 -0400
+Subject: [PATCH] PATCH: Disable failing tests.
+
+---
+ gio/tests/meson.build  | 19 -------------------
+ glib/tests/meson.build |  2 --
+ 2 files changed, 21 deletions(-)
+
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index c7c3e3035..6e38eb39e 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -34,7 +34,6 @@ gio_tests = {
+   'buffered-output-stream' : {},
+   'cancellable' : {},
+   'contexts' : {},
+-  'contenttype' : {},
+   'converter-stream' : {},
+   'credentials' : {},
+   'data-input-stream' : {},
+@@ -78,7 +77,6 @@ gio_tests = {
+   'tls-certificate' : {'extra_sources' : ['gtesttlsbackend.c']},
+   'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']},
+   'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']},
+-  'gdbus-address-get-session' : {},
+   'win32-appinfo' : {},
+ }
+ 
+@@ -135,10 +133,6 @@ endif
+ if host_machine.system() != 'windows'
+   gio_tests += {
+     'file' : {},
+-    'gdbus-peer' : {
+-      'dependencies' : [libgdbus_example_objectmanager_dep],
+-      'install_rpath' : installed_tests_execdir
+-    },
+     'gdbus-peer-object-manager' : {},
+     'live-g-file' : {},
+     'socket-address' : {},
+@@ -173,19 +167,6 @@ if host_machine.system() != 'windows'
+     }
+   endif
+ 
+-  # Uninstalled because of the check-for-executable logic in DesktopAppInfo
+-  # unable to find the installed executable
+-  if not glib_have_cocoa
+-    gio_tests += {
+-      'appinfo' : {
+-        'install' : false,
+-      },
+-      'desktop-app-info' : {
+-        'install' : false,
+-      },
+-    }
+-  endif
+-
+   test_extra_programs += {
+     'basic-application' : {},
+     'dbus-launch' : {},
+diff --git a/glib/tests/meson.build b/glib/tests/meson.build
+index 8da477d19..9fa24dd49 100644
+--- a/glib/tests/meson.build
++++ b/glib/tests/meson.build
+@@ -103,7 +103,6 @@ glib_tests = {
+   'utf8-pointer' : {},
+   'utf8-validate' : {},
+   'utf8-misc' : {},
+-  'utils' : {},
+   'unicode' : {},
+   'uri' : {},
+   '1bit-mutex' : {},
+@@ -151,7 +150,6 @@ if host_machine.system() == 'windows'
+ else
+   glib_tests += {
+     'include' : {},
+-    'unix' : {},
+   }
+   if have_rtld_next
+     glib_tests += {
+-- 
+2.26.2
+
diff --git a/gnu/packages/patches/glib-tests-timer.patch b/gnu/packages/patches/glib-tests-timer.patch
deleted file mode 100644
index e37425c0c8..0000000000
--- a/gnu/packages/patches/glib-tests-timer.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-* On i686 floating-point roundoff errors could sometimes cause this check to
-  fail depending on the elapsed microseconds.  Improve rounding by adding a
-  fractional bit.
-
---- glib-2.40.0/glib/tests/timer.c	2014-03-05 08:05:42.000000000 -0600
-+++ glib-2.40.0/glib/tests/timer.c	2014-07-10 16:33:12.746862822 -0500
-@@ -35,7 +35,7 @@
-   elapsed = g_timer_elapsed (timer, &micros);
- 
-   g_assert_cmpfloat (elapsed, <, 1.0);
--  g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 1000000);
-+  g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6 + 0.5)) % 1000000);
- 
-   g_timer_destroy (timer);
- }
-- 
2.29.2


[-- Attachment #4: 0003-gnu-glib-Update-synopsis-description-and-home-page.patch --]
[-- Type: application/octet-stream, Size: 1271 bytes --]

From 0b76a46ee68c0cd816470af4370adc734d1a2188 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 3 Dec 2020 23:48:25 -0500
Subject: [PATCH 03/11] gnu: glib: Update synopsis, description and home-page.

* gnu/packages/glib.scm (glib) [synopsis]: Modify.
[description]: Modify.
[home-page]: Modify.
---
 gnu/packages/glib.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index df355d50b7..9ecf91ec81 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -286,11 +286,11 @@ shared NFS home directories.")
        (variable "GIO_EXTRA_MODULES")
        (files '("lib/gio/modules")))))
     (search-paths native-search-paths)
-    (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
+    (synopsis "Low-level core library for GNOME projects")
     (description "GLib provides data structure handling for C, portability
 wrappers, and interfaces for such runtime functionality as an event loop,
 threads, dynamic loading, and an object system.")
-    (home-page "https://developer.gnome.org/glib/")
+    (home-page "https://wiki.gnome.org/Projects/GLib")
     (license license:lgpl2.1+)))
 
 (define glib-with-gio-patch
-- 
2.29.2


[-- Attachment #5: 0004-gnu-glib-with-gio-patch-Make-some-cosmetic-changes.patch --]
[-- Type: application/octet-stream, Size: 1302 bytes --]

From b1128db7b5f8b0c1ce139c984169fa2eec70a71e Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 3 Dec 2020 23:52:54 -0500
Subject: [PATCH 04/11] gnu: glib-with-gio-patch: Make some cosmetic changes.

* gnu/packages/glib.scm (glib-with-gio-patch): Make some cosmetic changes.
---
 gnu/packages/glib.scm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 9ecf91ec81..b9e8fe96f5 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -298,10 +298,15 @@ threads, dynamic loading, and an object system.")
   ;; TODO: Fold into 'glib' above in the next rebuild cycle.
   (package
     (inherit glib)
-    (source (origin
-              (inherit (package-source glib))
-              (patches (cons (search-patch "glib-appinfo-watch.patch")
-                             (origin-patches (package-source glib))))))))
+    (source
+     (origin
+       (inherit
+        (package-source glib))
+       (patches
+        (cons
+         (search-patch "glib-appinfo-watch.patch")
+         (origin-patches
+          (package-source glib))))))))
 
 (define-public glib-with-documentation
   ;; glib's doc must be built in a separate package since it requires gtk-doc,
-- 
2.29.2


[-- Attachment #6: 0005-gnu-glib-with-documentation-Make-some-cosmetic-chang.patch --]
[-- Type: application/octet-stream, Size: 2615 bytes --]

From cbf980670c8551fd14bc3b58a4893353f2ebff4b Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 4 Dec 2020 00:07:45 -0500
Subject: [PATCH 05/11] gnu: glib-with-documentation: Make some cosmetic
 changes.

* gnu/packages/glib.scm (glib-with-documentation): Make some cosmetic changes.
---
 gnu/packages/glib.scm | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index b9e8fe96f5..c06e1c78e0 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -311,28 +311,35 @@ threads, dynamic loading, and an object system.")
 (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
+  (package
+    (inherit glib)
+    (properties
+     (alist-delete 'hidden?
+                   (package-properties glib)))
     (native-inputs
-     `(("gtk-doc" ,gtk-doc)             ; for the doc
-       ("docbook-xml" ,docbook-xml)
+     `(("docbook-xml" ,docbook-xml)
+       ("gtk-doc" ,gtk-doc)
        ("libxml2" ,libxml2)
        ,@(package-native-inputs glib)))
+    (outputs
+     (cons "doc"
+           (package-outputs glib)))
     (arguments
-     (substitute-keyword-arguments (package-arguments glib)
+     (substitute-keyword-arguments
+         (package-arguments glib)
        ((#:configure-flags flags ''())
         `(cons "-Dgtk_doc=true" ,flags))
        ((#:phases phases)
         `(modify-phases ,phases
            (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")))
-                 (copy-recursively (string-append out html)
-                                   (string-append doc html))
-                 (delete-file-recursively (string-append out html))
+               (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))
                  #t)))))))))
 
 (define gobject-introspection
-- 
2.29.2


[-- Attachment #7: 0006-gnu-glib-with-documentation-Fix-documentation-build.patch --]
[-- Type: application/octet-stream, Size: 2201 bytes --]

From a7d5d6c720c10e12ffb2df95be3ae7b9115ddcdc Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 4 Dec 2020 00:10:22 -0500
Subject: [PATCH 06/11] gnu: glib-with-documentation: Fix documentation build.

* gnu/packages/glib.scm (glib-with-documentation) [native-inputs]:
Add docbook-4.2. Remove libxml2.
[arguments]<#:phases>['patch-docbook-xml]: New phase.
---
 gnu/packages/glib.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index c06e1c78e0..759be7194e 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -317,9 +317,9 @@ threads, dynamic loading, and an object system.")
      (alist-delete 'hidden?
                    (package-properties glib)))
     (native-inputs
-     `(("docbook-xml" ,docbook-xml)
+     `(("docbook-xml-4.2" ,docbook-xml-4.2)
+       ("docbook-xml-4.5" ,docbook-xml)
        ("gtk-doc" ,gtk-doc)
-       ("libxml2" ,libxml2)
        ,@(package-native-inputs glib)))
     (outputs
      (cons "doc"
@@ -331,6 +331,19 @@ threads, dynamic loading, and an object system.")
         `(cons "-Dgtk_doc=true" ,flags))
        ((#:phases phases)
         `(modify-phases ,phases
+           (add-after 'unpack 'patch-docbook-xml
+             (lambda* (#:key inputs #:allow-other-keys)
+               (with-directory-excursion "docs/reference"
+                 (substitute* '("gio/gdbus-object-manager-example/.*\\.xml"
+                                "gio/.*\\.xml" "glib/.*\\.xml" "gobject/.*\\.xml")
+                   (("http://www.oasis-open.org/docbook/xml/4.5/")
+                    (string-append (assoc-ref inputs "docbook-xml-4.5")
+                                   "/xml/dtd/docbook/")))
+                 (substitute* "gio/gio.xml"
+                   (("http://www.oasis-open.org/docbook/xml/4.2/")
+                    (string-append (assoc-ref inputs "docbook-xml-4.2")
+                                   "/xml/dtd/docbook/"))))
+               #t))
            (add-after 'install 'move-doc
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
-- 
2.29.2


[-- Attachment #8: 0007-gnu-cairo-Make-some-cosmetic-changes.patch --]
[-- Type: application/octet-stream, Size: 4561 bytes --]

From b56d0004177465a18d82b0131c54a53885bc6ae7 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 4 Dec 2020 00:49:10 -0500
Subject: [PATCH 07/11] gnu: cairo: Make some cosmetic changes.

* gnu/packages/gtk.scm (cairo): Make some cosmetic changes.
---
 gnu/packages/gtk.scm | 82 ++++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 4e58c65ead..94fc52b7d0 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -121,57 +121,57 @@ tools have full access to view and control running applications.")
 
 (define-public cairo
   (package
-   (name "cairo")
-   (version "1.16.0")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "https://cairographics.org/releases/cairo-"
-                                version ".tar.xz"))
-            (sha256
-             (base32
-              "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
-   (build-system gnu-build-system)
-   (propagated-inputs
-    `(("fontconfig" ,fontconfig)
-      ("freetype" ,freetype)
-      ("glib" ,glib)
-      ("libpng" ,libpng)
-      ("libx11" ,libx11)
-      ("libxext" ,libxext)
-      ("libxrender" ,libxrender)
-      ("pixman" ,pixman)))
-   (inputs
-    `(("ghostscript" ,ghostscript)
-      ("libspectre" ,libspectre)
-      ("poppler" ,poppler)
-      ("xorgproto" ,xorgproto)
-      ("zlib" ,zlib)))
-   (native-inputs
-     `(("pkg-config" ,pkg-config)
-      ("python" ,python-wrapper)))
+    (name "cairo")
+    (version "1.16.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://cairographics.org/releases/cairo-"
+                       version ".tar.xz"))
+       (sha256
+        (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
+    (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f  ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
-       #:configure-flags '("--enable-tee"      ;needed for GNU Icecat
-                           "--enable-xml"      ;for cairo-xml support
-                           "--disable-static")))
-   (synopsis "2D graphics library")
-   (description
-    "Cairo is a 2D graphics library with support for multiple output devices.
-Currently supported output targets include the X Window System (via both
-Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
+     `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
+       #:configure-flags
+       (list
+        "--enable-tee"                    ;needed for GNU Icecat
+        "--enable-xml"                    ;for cairo-xml support
+        "--disable-static")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("ghostscript" ,ghostscript)
+       ("libspectre" ,libspectre)
+       ("poppler" ,poppler)
+       ("xorgproto" ,xorgproto)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("glib" ,glib)
+       ("libpng" ,libpng)
+       ("libx11" ,libx11)
+       ("libxext" ,libxext)
+       ("libxrender" ,libxrender)
+       ("pixman" ,pixman)))
+    (synopsis "2D graphics library")
+    (description "Cairo is a 2D graphics library with support for multiple output
+devices.  Currently supported output targets include the X Window System (via
+both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
 output.  Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
-
 Cairo is designed to produce consistent output on all output media while
 taking advantage of display hardware acceleration when available
 eg. through the X Render Extension).
-
 The cairo API provides operations similar to the drawing operators of
 PostScript and PDF.  Operations in cairo including stroking and filling cubic
 Bézier splines, transforming and compositing translucent images, and
 antialiased text rendering.  All drawing operations can be transformed by any
 affine transformation (scale, rotation, shear, etc.).")
-   (license license:lgpl2.1) ; or Mozilla Public License 1.1
-   (home-page "https://cairographics.org/")))
+    (home-page "https://cairographics.org/")
+    (license license:lgpl2.1))) ; or Mozilla Public License 1.1
 
 (define-public cairo-sans-poppler
   ;; Variant used to break the dependency cycle between Poppler and Cairo.
-- 
2.29.2


[-- Attachment #9: 0008-gnu-cairo-Change-build-system.patch --]
[-- Type: application/octet-stream, Size: 975 bytes --]

From 4ad9203253f820ee8e251126c2052ec4e7696f86 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 4 Dec 2020 00:51:10 -0500
Subject: [PATCH 08/11] gnu: cairo: Change build-system.

* gnu/packages/gtk.scm (cairo) [build-system]: Change from gnu to glib-or-gtk.
---
 gnu/packages/gtk.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 94fc52b7d0..a09a81184c 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -131,7 +131,7 @@ tools have full access to view and control running applications.")
                        version ".tar.xz"))
        (sha256
         (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (arguments
      `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
        #:configure-flags
-- 
2.29.2


[-- Attachment #10: 0009-gnu-cairo-Move-documentation-to-separate-output.patch --]
[-- Type: application/octet-stream, Size: 1564 bytes --]

From abf4160f4c68bd8c42d372b2ff103868ea88693c Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 4 Dec 2020 00:53:16 -0500
Subject: [PATCH 09/11] gnu: cairo: Move documentation to separate output.

* gnu/packages/gtk.scm (cairo) [outputs]: New output "doc".
[arguments]<#:configure-flags>[--with-html-dir]: New flag.
---
 gnu/packages/gtk.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index a09a81184c..6371d71471 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -132,13 +132,17 @@ tools have full access to view and control running applications.")
        (sha256
         (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
     (build-system glib-or-gtk-build-system)
+    (outputs '("out" "doc"))
     (arguments
      `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
        #:configure-flags
        (list
-        "--enable-tee"                    ;needed for GNU Icecat
-        "--enable-xml"                    ;for cairo-xml support
-        "--disable-static")))
+        "--enable-tee"                  ;needed for GNU Icecat
+        "--enable-xml"                  ;for cairo-xml support
+        "--disable-static"
+        (string-append "--with-html-dir="
+                       (assoc-ref %outputs "doc")
+                       "/share/gtk-doc/html"))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)))
-- 
2.29.2


[-- Attachment #11: 0010-gnu-cairo-Enable-some-features.patch --]
[-- Type: application/octet-stream, Size: 2758 bytes --]

From 98b4c6b936d323ddfbce426b04267d65fd9e5722 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 4 Dec 2020 01:02:00 -0500
Subject: [PATCH 10/11] gnu: cairo: Enable some features.

* gnu/packages/gtk.scm (cairo) [native-inputs]: Add gobject-introspection.
[inputs]: Add libdrm. Remove xorgproto and zlib.
[propagated-inputs]: Add libxcb.
---
 gnu/packages/gtk.scm | 39 +++++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 6371d71471..4f40672127 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -137,30 +137,45 @@ tools have full access to view and control running applications.")
      `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
        #:configure-flags
        (list
-        "--enable-tee"                  ;needed for GNU Icecat
-        "--enable-xml"                  ;for cairo-xml support
         "--disable-static"
+        ;; XXX: To be enabled.
+        ;; "--enable-gallium=yes"
+        ;; "--enable-gl=yes"
+        ;; " --enable-glesv2=yes"
+        ;; "--enable-glesv3=yes"
+        ;; "--enable-cogl=yes"
+        ;; "--enable-directfb=yes"
+        ;; "--enable-vg=yes"
+        "--enable-tee=yes"
+        "--enable-xml=yes"
         (string-append "--with-html-dir="
                        (assoc-ref %outputs "doc")
                        "/share/gtk-doc/html"))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
+     `(("gobject-introspection" ,gobject-introspection)
+       ("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)))
     (inputs
-     `(("ghostscript" ,ghostscript)
+     `(("drm" ,libdrm)
+       ("ghostscript" ,ghostscript)
        ("libspectre" ,libspectre)
-       ("poppler" ,poppler)
-       ("xorgproto" ,xorgproto)
-       ("zlib" ,zlib)))
+       ("poppler" ,poppler)))
     (propagated-inputs
-     `(("fontconfig" ,fontconfig)
+     `( ;; ("cogl" ,cogl)
+       ;; ("directfb" ,directfb)
+       ("fontconfig" ,fontconfig)
+       ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("glib" ,glib)
+       ;; ("gtk+" ,gtk+)
        ("libpng" ,libpng)
-       ("libx11" ,libx11)
-       ("libxext" ,libxext)
-       ("libxrender" ,libxrender)
-       ("pixman" ,pixman)))
+       ;; ("librsvg" ,librsvg)
+       ;; ("opengl" ,mesa)
+       ("pixman" ,pixman)
+       ("x11" ,libx11)
+       ("xcb" ,libxcb)
+       ("xext" ,libxext)
+       ("xrender" ,libxrender)))
     (synopsis "2D graphics library")
     (description "Cairo is a 2D graphics library with support for multiple output
 devices.  Currently supported output targets include the X Window System (via
-- 
2.29.2


[-- Attachment #12: 0011-gnu-cairo-Update-synopsis-description-and-license.patch --]
[-- Type: application/octet-stream, Size: 2124 bytes --]

From df853bd7c74ee3d73fff19decb1a8cd2e8e42c47 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 4 Dec 2020 01:04:37 -0500
Subject: [PATCH 11/11] gnu: cairo: Update synopsis, description and license.

* gnu/packages/gtk.scm (cairo) [synopsis]: Modify.
[description]: Modify.
[license]: Modify.
---
 gnu/packages/gtk.scm | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 4f40672127..6d040ff2e1 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -176,21 +176,17 @@ tools have full access to view and control running applications.")
        ("xcb" ,libxcb)
        ("xext" ,libxext)
        ("xrender" ,libxrender)))
-    (synopsis "2D graphics library")
+    (synopsis "Multi-platform 2D graphics library")
     (description "Cairo is a 2D graphics library with support for multiple output
 devices.  Currently supported output targets include the X Window System (via
 both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
-output.  Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
-Cairo is designed to produce consistent output on all output media while
-taking advantage of display hardware acceleration when available
-eg. through the X Render Extension).
-The cairo API provides operations similar to the drawing operators of
-PostScript and PDF.  Operations in cairo including stroking and filling cubic
-Bézier splines, transforming and compositing translucent images, and
-antialiased text rendering.  All drawing operations can be transformed by any
-affine transformation (scale, rotation, shear, etc.).")
+output.  Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.")
     (home-page "https://cairographics.org/")
-    (license license:lgpl2.1))) ; or Mozilla Public License 1.1
+    (license
+     ;; This project is dual-licensed.
+     (list
+      license:lgpl2.1+
+      license:mpl1.1))))
 
 (define-public cairo-sans-poppler
   ;; Variant used to break the dependency cycle between Poppler and Cairo.
-- 
2.29.2


  parent reply	other threads:[~2020-12-04  6:09 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 15:09 [bug#42958] [PATCH core-updates 00/29] Big changes from wip-desktop Danny Milosavljevic
2020-08-20 15:10 ` [bug#42958] [PATCH core-updates 01/29] gnu: yelp-xsl: Update package definition Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 02/29] gnu: yelp-tools: " Danny Milosavljevic
2020-08-30 20:54     ` Ludovic Courtès
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 03/29] gnu: glib: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 04/29] gnu: glib-with-documentation: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 05/29] gnu: gobject-introspection: " Danny Milosavljevic
2020-09-23 13:40     ` Danny Milosavljevic
2020-09-23 13:45       ` Danny Milosavljevic
2020-09-24 11:36         ` Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 06/29] gnu: gobject-introspection: Propagate glib Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 07/29] gnu: gobject-introspection: Add patches back Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 08/29] gnu: pixman: Update package definition Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 09/29] gnu: openjpeg: " Danny Milosavljevic
2020-08-20 16:45     ` Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 10/29] gnu: cairo: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 11/29] gnu: pango: " Danny Milosavljevic
2020-08-20 16:27     ` Danny Milosavljevic
2020-08-20 16:29       ` Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 12/29] gnu: gdk-pixbuf: " Danny Milosavljevic
2020-08-24  0:19     ` Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 13/29] gnu: gdk-pixbuf: Disable failing tests Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 14/29] gnu: gdk-pixbuf+svg: Update package definition Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 15/29] gnu: vala: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 16/29] gnu: libgsf: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 17/29] gnu: librsvg@2.40.21: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 18/29] gnu: atk: Update to 2.36.0 Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 19/29] gnu: gtk+-2: Update package definition Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 20/29] gnu: wayland: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 21/29] gnu: wayland-protocols: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 22/29] gnu: atkmm: " Danny Milosavljevic
2020-08-20 16:45     ` Danny Milosavljevic
2020-08-20 16:48     ` Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 23/29] gnu: gtk-doc: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 24/29] gnu: json-glib: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 25/29] gnu: at-spi2-core: " Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 26/29] gnu: at-spi2-atk: Update to 2.34.2 Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 27/29] gnu: gtk+: Update package definition Danny Milosavljevic
2020-08-20 16:44     ` Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 28/29] gnu: gtk+: Propagate libcloudproviders Danny Milosavljevic
2020-08-20 15:10   ` [bug#42958] [PATCH core-updates 29/29] gnu: gtk+: Add missing input Danny Milosavljevic
2020-09-24 12:26 ` [bug#42958] [PATCH core-updates 01/29] gnu: yelp-xsl: Update package definition Raghav Gururajan
2020-09-24 12:27 ` [bug#42958] [PATCH core-updates 02/29] gnu: yelp-tools: " Raghav Gururajan
2020-09-24 12:28 ` [bug#42958] [PATCH core-updates 03/29] gnu: glib: " Raghav Gururajan
2020-09-24 12:55   ` Efraim Flashner
2020-11-29 12:21     ` Danny Milosavljevic
2020-12-04  6:08     ` Raghav Gururajan via Guix-patches via [this message]
2020-09-27 10:12   ` Danny Milosavljevic
2020-09-24 12:41 ` [bug#42958] [PATCH core-updates 04/29] gnu: glib-with-documentation: Update, " Raghav Gururajan
2020-09-24 12:50   ` Efraim Flashner
2020-09-24 13:14 ` [bug#42958] [PATCH core-updates 05/29] gnu: gobject-introspection: Update package, definition Raghav Gururajan
2020-09-24 13:32   ` Raghav Gururajan
2020-09-24 13:52   ` Danny Milosavljevic
2020-09-24 14:17     ` Raghav Gururajan
2020-09-24 13:20 ` [bug#42958] [PATCH core-updates 06/29] gnu: gobject-introspection: Propagate glib Raghav Gururajan
2020-09-24 13:33 ` [bug#42958] [PATCH core-updates 07/29] gnu: gobject-introspection: Add patches, back Raghav Gururajan
2020-09-24 14:33 ` [bug#42958] [PATCH core-updates 08/29] gnu: pixman: Update package definition Raghav Gururajan
2020-09-24 15:03 ` [bug#42958] [PATCH core-updates 09/29] gnu: openjpeg: " Raghav Gururajan
2020-09-24 15:35 ` [bug#42958] [PATCH core-updates 10/29] gnu: cairo: " Raghav Gururajan
     [not found] ` <handler.42958.B.159793618623098.ack@debbugs.gnu.org>
2020-12-01 21:07   ` [bug#42958] ([PATCH core-updates 00/29] Big changes from wip-desktop.) Danny Milosavljevic
2021-03-11 14:45 ` [bug#42958] Raghav Gururajan via Guix-patches via
2021-03-12 16:37 ` [bug#42958] Big changes from wip-desktop Raghav Gururajan via Guix-patches via
2021-03-12 17:19   ` Raghav Gururajan via Guix-patches via
2021-03-25 12:08     ` Raghav Gururajan via Guix-patches via
2021-03-26  1:00       ` Raghav Gururajan via Guix-patches via
2021-03-26 20:12         ` Raghav Gururajan via Guix-patches via
2021-03-26 20:38           ` Raghav Gururajan via Guix-patches via
2021-03-26 21:22             ` bug#42958: " Léo Le Bouter via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17d09dcc473fbea9ad54ff5dbf58a381@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=42958@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    --cc=efraim@flashner.co.il \
    --cc=raghavgururajan@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).