[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/05: gnu: libmng: Fix cross-compiling to riscv64-linux.
From: |
guix-commits |
Subject: |
01/05: gnu: libmng: Fix cross-compiling to riscv64-linux. |
Date: |
Fri, 29 Dec 2023 13:49:57 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit 2911aaa9ae54cf86d2a776c441f3559d4a838f16
Author: Zheng Junjie <zhengjunjie@iscas.ac.cn>
AuthorDate: Thu Dec 28 21:57:58 2023 +0800
gnu: libmng: Fix cross-compiling to riscv64-linux.
* gnu/packages/image.scm (libmng)
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
[arguments]: When target riscv64-linux-gnu, add update-config-scripts phase.
Change-Id: I906a2b7b7691ae53592cfa35ba64fc7e7d735664
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
gnu/packages/image.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index ebabd1c973..79f1a293ec 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1483,6 +1483,26 @@ channels.")
(base32
"1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
(build-system gnu-build-system)
+ (arguments
+ (if (and (target-riscv64?)
+ (%current-target-system))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.guess and config.sub.
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub"))))))
+ '()))
+ (native-inputs
+ (if (and (target-riscv64?)
+ (%current-target-system))
+ (list config)
+ '()))
(propagated-inputs
;; These are all in the 'Libs.private' field of libmng.pc.
(list lcms libjpeg-turbo zlib))