gnu: libxml2: Fix build to loongarch64.

* gnu/packages/xml.scm (libxml2)[native-inputs]: When target is loongarch64, add
config.
[arguments]: When target is loongarch64, Add update-config-scripts phase.

Change-Id: Icd2fbfbb321842933ddb9935fd8c3121beb2ad8c
This commit is contained in:
Zheng Junjie 2025-01-25 10:24:07 +08:00
parent b1e6fd8278
commit 39dd387067
No known key found for this signature in database
GPG key ID: 3B5AA993E1A2DFF0

View file

@ -218,6 +218,17 @@ hierarchical form with variable field lengths.")
(list
#:phases
#~(modify-phases %standard-phases
#$@(if (target-loongarch64?)
#~((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")))))
#~())
(add-after 'install 'use-other-outputs
(lambda _
(let ((doc (string-append #$output:doc "/share/"))
@ -242,7 +253,10 @@ hierarchical form with variable field lengths.")
(synopsis "C parser for XML")
(inputs (list xz))
(propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
(native-inputs (list perl))
(native-inputs (append (if (target-loongarch64?)
(list config)
'())
(list perl)))
(native-search-paths
(list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
(search-paths native-search-paths)