[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] gnu: Add gdk-pixbuf+svg.
From: |
宋文武 |
Subject: |
[PATCH 1/2] gnu: Add gdk-pixbuf+svg. |
Date: |
Mon, 14 Mar 2016 20:38:12 +0800 |
* gnu/packages/gtk.scm (gdk-pixbuf+svg): New variable.
---
gnu/packages/gtk.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 1a10e9b..79983d2 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -433,6 +433,33 @@ in the GNOME project.")
(license license:lgpl2.0+)
(home-page "https://developer.gnome.org/gdk-pixbuf/")))
+(define-public gdk-pixbuf+svg
+ (package (inherit gdk-pixbuf)
+ (name "gdk-pixbuf+svg")
+ (inputs
+ `(("librsvg" ,librsvg)
+ ,@(package-inputs gdk-pixbuf)))
+ (arguments
+ '(#:configure-flags '("--with-x11")
+ #:tests? #f ; tested by the gdk-pixbuf package already
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'register-svg-loader
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (librsvg (assoc-ref inputs "librsvg"))
+ (loaders
+ (append
+ (find-files out "^libpixbufloader-.*\\.so$")
+ (find-files librsvg "^libpixbufloader-.*\\.so$")))
+ (gdk-pixbuf-query-loaders
+ (string-append out "/bin/gdk-pixbuf-query-loaders")))
+ (zero? (apply system* `(,gdk-pixbuf-query-loaders
+ "--update-cache" ,@loaders)))))))))
+ (description (string-append
+ (package-description gdk-pixbuf)
+ " This version provides SVG support by default."))))
+
(define-public at-spi2-core
(package
(name "at-spi2-core")
--
2.6.3