gnu: maradns: Fix cross compilation.

* gnu/packages/dns.scm (maradns)[arguments]: Build make_32bit_tables for the
host.
This commit is contained in:
Arun Isaac 2020-04-25 15:53:52 +05:30
parent 796b387bc2
commit 018114baa7
No known key found for this signature in database
GPG key ID: 2E25EE8B61802BB3

View file

@ -43,6 +43,7 @@ (define-module (gnu packages dns)
#:use-module (gnu packages crypto)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages flex)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages groff)
#:use-module (gnu packages groff)
@ -979,7 +980,15 @@ (define-public maradns
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda _
(lambda* (#:key native-inputs target #:allow-other-keys)
;; make_32bit_tables generates a header file that is used during
;; compilation. Hence, during cross compilation, it should be
;; built for the host system.
(when target
(substitute* "rng/Makefile"
(("\\$\\(CC\\) -o make_32bit_tables")
(string-append (assoc-ref native-inputs "gcc")
"/bin/gcc -o make_32bit_tables"))))
(invoke "./configure")))
(add-before 'install 'create-install-directories
(lambda* (#:key outputs #:allow-other-keys)