aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/gnome.scm27
1 files changed, 23 insertions, 4 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 1a746b066a..bd37b43901 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3583,11 +3583,19 @@ for dealing with different structured file formats.")
;; https://gitlab.gnome.org/GNOME/librsvg/-/issues/955).
(substitute* "gdk-pixbuf-loader/librsvg.thumbnailer.in"
(("@bindir@/gdk-pixbuf-thumbnailer")
- (search-input-file inputs "bin/gdk-pixbuf-thumbnailer")))))
+ (string-append #$(this-package-input "gdk-pixbuf")
+ "/bin/gdk-pixbuf-thumbnailer")))))
(add-after 'unpack 'prepare-for-build
(lambda _
;; In lieu of #:make-flags
(setenv "CC" #$(cc-for-target))
+ (setenv "PKG_CONFIG" #$(pkg-config-for-target))
+ (when #$(%current-target-system)
+ (setenv "RUST_TARGET"
+ (string-replace
+ #$(%current-target-system)
+ "-unknown-linux-gnu"
+ (string-index #$(%current-target-system) #\-))))
;; Something about the build environment resists building
;; successfully with the '--locked' flag.
(substitute* '("Makefile.am" "Makefile.in")
@@ -3620,7 +3628,18 @@ for dealing with different structured file formats.")
(apply (assoc-ref gnu:%standard-phases 'configure)
#:configure-flags
(list "--disable-static"
- "--enable-vala")
+ #$@(if (%current-target-system)
+ #~(;; g-ir-scanner can't import its modules
+ ;; and vala currently can't be cross-compiled.
+ "--enable-introspection=no"
+ "--enable-vala=no"
+ ;; These two are necessary for cross-compiling.
+ (string-append
+ "--build=" #$(nix-system->gnu-triplet
+ (%current-system)))
+ (string-append
+ "--host=" #$(%current-target-system)))
+ #~("--enable-vala")))
args)))
(add-after 'configure 'dont-vendor-self
(lambda* (#:key vendor-dir #:allow-other-keys)
@@ -3636,8 +3655,8 @@ for dealing with different structured file formats.")
#: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))
+ (native-inputs (list gdk-pixbuf `(,glib "bin") gobject-introspection pkg-config vala))
+ (inputs (list freetype gobject-introspection 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.