diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-05-06 22:29:55 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-05-06 22:29:55 +0200 |
commit | 63016e7cd0c1a0a75dd40c44b4cf496aa3c85328 (patch) | |
tree | c13ab0c2f057f302a78b7a93f77d27859b10b360 /gnu | |
parent | 26a728eb091daf89a01986eac2d51dc8f0b58b6a (diff) | |
download | guix-63016e7cd0c1a0a75dd40c44b4cf496aa3c85328.tar.gz |
gnu: Add librsvg.
* gnu/packages/gnome.scm (librsvg): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/gnome.scm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 221c16ca57..24f018d222 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -589,3 +589,71 @@ dealing with different structured file formats.") ;; LGPLv2.1-only. (license license:lgpl2.1))) + +(define-public librsvg + (package + (name "librsvg") + (version "2.40.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnome/sources/librsvg/2.40/librsvg-" + version ".tar.xz")) + (sha256 + (base32 + "071959yjb2i1bja7ciy4bmpnd6fn2is9jjqsvvvnsqwl69j9n128")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnome) + (guix build gnu-build-system) + (guix build utils)) + #:imported-modules ((guix build gnome) + (guix build gnu-build-system) + (guix build utils)) + #:phases + (alist-cons-before + 'configure 'augment-gir-search-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (find-files "." "Makefile\\.in") + (("INTROSPECTION_SCANNER_ARGS = ") + (string-append "INTROSPECTION_SCANNER_ARGS = " + "--add-include-path=" + (gir-directory inputs "gdk-pixbuf") + " ")) + (("INTROSPECTION_COMPILER_ARGS = ") + (string-append "INTROSPECTION_COMPILER_ARGS = " + "--includedir=" + (gir-directory inputs "gdk-pixbuf") + " "))) + + (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.0.10/" + "loaders\n")) + ;; Likewise, create a separate 'loaders.cache' file. + (("gdk_pixbuf_cache_file = .*$") + "gdk_pixbuf_cache_file = $(gdk_pixbuf_moduledir).cache\n"))) + %standard-phases))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. + (inputs + `(("pango" ,pango) + ("libcroco" ,libcroco) + ("bzip2" ,bzip2) + ("libgsf" ,libgsf) + ("libxml2" ,libxml2))) + (propagated-inputs + ;; librsvg-2.0.pc refers to all of that. + `(("cairo" ,cairo) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib))) + (home-page "https://wiki.gnome.org/LibRsvg") + (synopsis "Render SVG files using Cairo") + (description + "librsvg is a C library to render SVG files using the Cairo 2D graphics +library.") + (license license:lgpl2.0+))) |