build-system/meson: Define build variables when cross-compiling.

Fixes <https://issues.guix.gnu.org/52574>.
Reported by L  p R n  d n    <guix@lprndn.info>.

* guix/build-system/meson.scm (meson-cross-build)[builder]: Define
'%build-host-inputs', '%build-target-inputs', '%build-inputs', and
'%outputs'.
This commit is contained in:
Ludovic Courtès 2021-12-20 14:37:40 +01:00
parent b9e5e93342
commit bdaf38a6e0
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -287,6 +287,19 @@ (define builder
#~(begin
(use-modules #$@(sexp->gexp modules))
(define %build-host-inputs
#+(input-tuples->gexp build-inputs))
(define %build-target-inputs
(append #$(input-tuples->gexp host-inputs)
#+(input-tuples->gexp target-inputs)))
(define %build-inputs
(append %build-host-inputs %build-target-inputs))
(define %outputs
#$(outputs->gexp outputs))
(define build-phases
#$(let ((phases (if (pair? phases) (sexp->gexp phases) phases)))
(if glib-or-gtk?