gnu: librsvg: Use gexps.
* gnu/packages/gnome.scm (librsvg) [arguments]: Use gexps, #$output and search-input-directory in phases.
This commit is contained in:
parent
6de7e0e54c
commit
7c88cfdb01
1 changed files with 58 additions and 64 deletions
|
@ -3570,13 +3570,14 @@ (define-public librsvg
|
|||
(build-system cargo-build-system)
|
||||
(outputs '("out" "doc" "debug"))
|
||||
(arguments
|
||||
`(#:install-source? #f
|
||||
#:modules
|
||||
((guix build cargo-build-system)
|
||||
(list
|
||||
#:install-source? #f
|
||||
#:modules
|
||||
'((guix build cargo-build-system)
|
||||
(guix build utils)
|
||||
((guix build gnu-build-system) #:prefix gnu:))
|
||||
#:cargo-inputs
|
||||
(("rust-byteorder" ,rust-byteorder-1)
|
||||
#:cargo-inputs
|
||||
`(("rust-byteorder" ,rust-byteorder-1)
|
||||
("rust-cairo-rs" ,rust-cairo-rs-0.15)
|
||||
("rust-cast" ,rust-cast-0.3)
|
||||
("rust-chrono" ,rust-chrono-0.4)
|
||||
|
@ -3607,8 +3608,8 @@ (define-public librsvg
|
|||
("rust-tinyvec" ,rust-tinyvec-1)
|
||||
("rust-url" ,rust-url-2)
|
||||
("rust-xml5ever" ,rust-xml5ever-0.16))
|
||||
#:cargo-development-inputs
|
||||
(("rust-anyhow" ,rust-anyhow-1)
|
||||
#:cargo-development-inputs
|
||||
`(("rust-anyhow" ,rust-anyhow-1)
|
||||
("rust-assert-cmd" ,rust-assert-cmd-2)
|
||||
("rust-cairo-rs" ,rust-cairo-rs-0.15)
|
||||
("rust-chrono" ,rust-chrono-0.4)
|
||||
|
@ -3625,63 +3626,56 @@ (define-public librsvg
|
|||
("rust-tempfile" ,rust-tempfile-3)
|
||||
("rust-test-generator" ,rust-test-generator-0.3)
|
||||
("rust-yeslogic-fontconfig-sys" ,rust-yeslogic-fontconfig-sys-2))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'prepare-for-build
|
||||
(lambda _
|
||||
;; In lieu of #:make-flags
|
||||
(setenv "CC" ,(cc-for-target))
|
||||
;; Something about the build environment resists building
|
||||
;; successfully with the '--locked' flag.
|
||||
(substitute* '("Makefile.am" "Makefile.in")
|
||||
(("--locked") ""))))
|
||||
(add-before 'configure 'pre-configure
|
||||
(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)/"
|
||||
,(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)
|
||||
#:configure-flags
|
||||
(list "--disable-static"
|
||||
"--enable-vala"
|
||||
(string-append "--with-html-dir="
|
||||
(assoc-ref outputs "doc")
|
||||
"/share/gtk-doc/html"))
|
||||
args)))
|
||||
(add-after 'configure 'dont-vendor-self
|
||||
(lambda* (#:key vendor-dir #:allow-other-keys)
|
||||
;; Don't keep the whole tarball in the vendor directory
|
||||
(delete-file-recursively
|
||||
(string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))))
|
||||
(replace 'build
|
||||
(assoc-ref gnu:%standard-phases 'build))
|
||||
(replace 'check
|
||||
(lambda* args
|
||||
((assoc-ref gnu:%standard-phases 'check)
|
||||
#:test-target "check")))
|
||||
(replace 'install
|
||||
(assoc-ref gnu:%standard-phases 'install)))))
|
||||
(native-inputs
|
||||
(list `(,glib "bin")
|
||||
gobject-introspection
|
||||
pkg-config
|
||||
vala))
|
||||
(inputs
|
||||
(list freetype harfbuzz libxml2 pango))
|
||||
(propagated-inputs
|
||||
(list cairo gdk-pixbuf glib))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'prepare-for-build
|
||||
(lambda _
|
||||
;; In lieu of #:make-flags
|
||||
(setenv "CC" #$(cc-for-target))
|
||||
;; Something about the build environment resists building
|
||||
;; successfully with the '--locked' flag.
|
||||
(substitute* '("Makefile.am" "Makefile.in")
|
||||
(("--locked") ""))))
|
||||
(add-before 'configure 'pre-configure
|
||||
(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)/"
|
||||
#$(dirname %gdk-pixbuf-loaders-cache-file) "/"
|
||||
"loaders\n")))
|
||||
(substitute* "configure"
|
||||
(("gdk_pixbuf_cache_file=.*")
|
||||
(string-append "gdk_pixbuf_cache_file="
|
||||
#$output "/"
|
||||
#$%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)
|
||||
#:configure-flags
|
||||
(list "--disable-static"
|
||||
"--enable-vala"
|
||||
(string-append "--with-html-dir=" #$output
|
||||
"/share/gtk-doc/html"))
|
||||
args)))
|
||||
(add-after 'configure 'dont-vendor-self
|
||||
(lambda* (#:key vendor-dir #:allow-other-keys)
|
||||
;; Don't keep the whole tarball in the vendor directory
|
||||
(delete-file-recursively
|
||||
(string-append vendor-dir "/" #$name "-" #$version ".tar.xz"))))
|
||||
(replace 'build
|
||||
(assoc-ref gnu:%standard-phases 'build))
|
||||
(replace 'check
|
||||
(lambda* args
|
||||
((assoc-ref gnu:%standard-phases 'check)
|
||||
#:test-target "check")))
|
||||
(replace 'install
|
||||
(assoc-ref gnu:%standard-phases 'install)))))
|
||||
(native-inputs (list `(,glib "bin") gobject-introspection pkg-config vala))
|
||||
(inputs (list freetype harfbuzz libxml2 pango))
|
||||
(propagated-inputs (list cairo gdk-pixbuf glib))
|
||||
(synopsis "SVG rendering library")
|
||||
(description "Librsvg is a library to render SVG images to Cairo surfaces.
|
||||
GNOME uses this to render SVG icons. Outside of GNOME, other desktop
|
||||
|
|
Loading…
Reference in a new issue