gnu: libxml2: Rewrite using G-Expressions.

* gnu/packages/xml.scm (libxml2): Use G-Expressions.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Bruno Victal 2023-10-09 21:06:05 +01:00 committed by Ludovic Courtès
parent 268d3d09c1
commit 74dd1ab733
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -200,28 +200,28 @@ hierarchical form with variable field lengths.")
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out" "static" "doc")) (outputs '("out" "static" "doc"))
(arguments (arguments
`(#:phases (modify-phases %standard-phases (list
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'use-other-outputs (add-after 'install 'use-other-outputs
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((src (assoc-ref outputs "out")) (let ((doc (string-append #$output:doc "/share/"))
(doc (string-append (assoc-ref outputs "doc") "/share")) (static (string-append #$output:static "/lib/")))
(dst (string-append (assoc-ref outputs "static") (for-each mkdir-p (list doc static))
"/lib")))
(mkdir-p doc) (rename-file (string-append #$output "/share/gtk-doc")
(mkdir-p dst) (string-append doc "/gtk-doc"))
(for-each (lambda (dir)
(rename-file (string-append src "/share/" dir) (for-each
(string-append doc "/" dir))) (lambda (ar)
'("gtk-doc")) (rename-file ar
(for-each (lambda (ar) (string-append static (basename ar))))
(rename-file ar (string-append dst "/" (find-files (string-append #$output "/lib") "\\.a$"))
(basename ar))))
(find-files (string-append src "/lib") "\\.a$"))
;; Remove reference to the static library from the .la ;; Remove reference to the static library from the .la
;; file such that Libtool does the right thing when both ;; file such that Libtool does the right thing when both
;; the shared and static variants are available. ;; the shared and static variants are available.
(substitute* (string-append src "/lib/libxml2.la") (substitute* (string-append #$output "/lib/libxml2.la")
(("^old_library='libxml2.a'") "old_library=''")))))))) (("^old_library='libxml2.a'") "old_library=''"))))))))
(home-page "http://www.xmlsoft.org/") (home-page "http://www.xmlsoft.org/")
(synopsis "C parser for XML") (synopsis "C parser for XML")