~ruther/guix-local

39dd387067797effcff547d65b6fe24daf9c0265 — Zheng Junjie 1 year, 1 month ago b1e6fd8
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
1 files changed, 15 insertions(+), 1 deletions(-)

M gnu/packages/xml.scm
M gnu/packages/xml.scm => gnu/packages/xml.scm +15 -1
@@ 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)