diff options
author | Zheng Junjie <zhengjunjie@iscas.ac.cn> | 2023-12-28 21:57:58 +0800 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2023-12-29 19:48:16 +0100 |
commit | 2911aaa9ae54cf86d2a776c441f3559d4a838f16 (patch) | |
tree | f43a7f1388d6f5397711ce0861c0d6e1e451285c /gnu | |
parent | 375200111db1c90dcb3cd179609f0aab96360bed (diff) |
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>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/image.scm | 20 |
1 files changed, 20 insertions, 0 deletions
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)) |