me
/
guix
Archived
1
0
Fork 0

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>
master
Zheng Junjie 2023-12-28 21:57:58 +08:00 committed by Mathieu Othacehe
parent 375200111d
commit 2911aaa9ae
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 20 additions and 0 deletions

View File

@ -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))