diff mbox series

[bug#51428,core-update-frozen,20/20] gnu: librsvg: Preserve the loaders.cache file.

Message ID 20211027045151.9889-20-maxim.cournoyer@gmail.com
State Accepted
Headers show
Series [bug#51428,core-update-frozen,01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Maxim Cournoyer Oct. 27, 2021, 4:51 a.m. UTC
Now that we have a search path that honors it on gdk-pixbuf, it is more
valuable to keep it.

* gnu/packages/gnome.scm (librsvg)[phases]{pre-configure}: Install loaders,
cache file to locations derived from %gdk-pixbuf-loaders-cache-file.
---
 gnu/packages/gnome.scm | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index a89cd8e7b4..7556b0cf84 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3487,17 +3487,20 @@  (define-public librsvg
              (substitute* '("Makefile.am" "Makefile.in")
                (("--locked") ""))))
          (add-before 'configure 'pre-configure
-           (lambda _
+           (lambda* (#:key outputs #:allow-other-keys)
              (substitute* "gdk-pixbuf-loader/Makefile.in"
                ;; By default the gdk-pixbuf loader is installed under
                ;; gdk-pixbuf's prefix.  Work around that.
                (("gdk_pixbuf_moduledir = .*$")
                 (string-append "gdk_pixbuf_moduledir = "
-                               "$(prefix)/lib/gdk-pixbuf-2.0/2.10.0/"
-                               "loaders\n"))
-               ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg.
-               (("gdk_pixbuf_cache_file = .*$")
-                "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))))
+                               "$(prefix)/"
+                               ,(dirname %gdk-pixbuf-loaders-cache-file) "/"
+                               "loaders\n")))
+             (substitute* "configure"
+               (("gdk_pixbuf_cache_file=.*")
+                (string-append "gdk_pixbuf_cache_file="
+                               (assoc-ref outputs "out") "/"
+                               ,%gdk-pixbuf-loaders-cache-file "\n")))))
          (add-after 'configure 'gnu-configure
            (lambda* (#:key outputs #:allow-other-keys #:rest args)
              (apply (assoc-ref gnu:%standard-phases 'configure)