Subject: bug#49122: (No Subject)

From: John Kehayias <[email-masked]>
Date: Mon, 21 Jun 2021 02:04:06 +0000

Of course, saw right after my last message that the dependency cycle here is through poppler, and cairo-sans-poppler exists. So I think I've solved this problem and will submit a patch.

I've attached the current changes I've been working on and testing for now.

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 206222b578..fb3dbdecb5 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -496,6 +496,13 @@ dynamic loading, and an object system.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           ;; Patch for cairo library location
+           (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "gir/cairo-1.0.gir.in"
+                           (("shared-library=\"@CAIRO_SHARED_LIBRARY@\"")
+                            (string-append "shared-library=\""
+                                           (assoc-ref inputs "cairo") "/lib/@CAIRO_SHARED_LIBRARY@\"")))))
          (add-after 'unpack 'do-not-use-/usr/bin/env
            (lambda _
              (substitute* "tools/g-ir-tool-template.in"
@@ -507,6 +514,7 @@ dynamic loading, and an object system.")
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("bison" ,bison)
+       ("cairo" ,cairo-sans-poppler) ; break dependency loop via poppler
        ("flex" ,flex)
        ("glib" ,glib)
        ("python" ,python-wrapper)