* [PATCH 1/2] gnu: librsvg: Generate complete loaders.cache including support for SVG.
@ 2014-11-02 17:18 Federico Beffa
2014-11-03 22:07 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Federico Beffa @ 2014-11-02 17:18 UTC (permalink / raw
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
As mentioned in a previous email, the cache generated by default does
not include support for SVG provided by librsvg itself. With this
patch we generate a full cache file.
Regards,
Fede
[-- Attachment #2: 0001-gnu-librsvg-Generate-complete-loaders.cache-includin.patch --]
[-- Type: text/x-patch, Size: 2238 bytes --]
From 36c6d59180bdb2d80e169938097efca39431c122 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Sun, 2 Nov 2014 18:01:08 +0100
Subject: [PATCH 1/2] gnu: librsvg: Generate complete loaders.cache including
support for SVG.
* gnu/packages/gnome.scm (librsvg): Add 'generate-full-chage phase.
---
gnu/packages/gnome.scm | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f1f1918..22b73f9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -594,7 +594,10 @@ dealing with different structured file formats.")
"071959yjb2i1bja7ciy4bmpnd6fn2is9jjqsvvvnsqwl69j9n128"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:modules ((srfi srfi-1)
+ (guix build gnu-build-system)
+ (guix build utils))
+ #:phases
(alist-cons-before
'configure 'augment-gir-search-path
(lambda* (#:key inputs #:allow-other-keys)
@@ -608,7 +611,22 @@ dealing with different structured file formats.")
;; Likewise, create a separate 'loaders.cache' file.
(("gdk_pixbuf_cache_file = .*$")
"gdk_pixbuf_cache_file = $(gdk_pixbuf_moduledir).cache\n")))
- %standard-phases)))
+ (alist-cons-after
+ 'install 'generate-full-cache
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((loaders-directory
+ (string-append (assoc-ref outputs "out")
+ "/lib/gdk-pixbuf-2.0/2.0.10/loaders")))
+ (zero?
+ (system
+ (string-append
+ "gdk-pixbuf-query-loaders "
+ loaders-directory "/libpixbufloader-svg.so "
+ (fold (lambda (s p) (string-append s " " p)) ""
+ (find-files (assoc-ref inputs "gdk-pixbuf")
+ "libpixbufloader-.*\\.so"))
+ "> " loaders-directory ".cache")))))
+ %standard-phases))))
(native-inputs
`(("pkg-config" ,pkg-config)
("glib" ,glib "bin") ; glib-mkenums, etc.
--
1.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] gnu: librsvg: Generate complete loaders.cache including support for SVG.
2014-11-02 17:18 [PATCH 1/2] gnu: librsvg: Generate complete loaders.cache including support for SVG Federico Beffa
@ 2014-11-03 22:07 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-11-03 22:07 UTC (permalink / raw
To: Federico Beffa; +Cc: Guix-devel
Federico Beffa <beffa@ieee.org> skribis:
> As mentioned in a previous email, the cache generated by default does
> not include support for SVG provided by librsvg itself. With this
> patch we generate a full cache file.
Nice.
> From 36c6d59180bdb2d80e169938097efca39431c122 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Sun, 2 Nov 2014 18:01:08 +0100
> Subject: [PATCH 1/2] gnu: librsvg: Generate complete loaders.cache including
> support for SVG.
>
> * gnu/packages/gnome.scm (librsvg): Add 'generate-full-chage phase.
^^^^^^
Typo.
> + (system
> + (string-append
> + "gdk-pixbuf-query-loaders "
> + loaders-directory "/libpixbufloader-svg.so "
> + (fold (lambda (s p) (string-append s " " p)) ""
> + (find-files (assoc-ref inputs "gdk-pixbuf")
> + "libpixbufloader-.*\\.so"))
> + "> " loaders-directory ".cache")))))
It may be clearer to replace fold with ‘string-join’
(string-join (find-files ...))
... in which case the import of (srfi srfi-1) can also be removed.
OK to commit with these changes.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-03 22:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-02 17:18 [PATCH 1/2] gnu: librsvg: Generate complete loaders.cache including support for SVG Federico Beffa
2014-11-03 22:07 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.