diff mbox series

[bug#65479,core-updates,v2,11/62] gnu: libxml2: Rewrite using G-Expressions.

Message ID 6d301ace4eb593026feb0ef1e5bd3b8fedda764b.1695478390.git.mirai@makinata.eu
State New
Headers show
Series Docbook & XML/SGML improvements. | expand

Commit Message

Bruno Victal Sept. 23, 2023, 2:19 p.m. UTC
* gnu/packages/xml.scm (libxml2): Use G-Expressions.
---
 gnu/packages/xml.scm | 47 ++++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 23 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 01e48fda57..c0222f5518 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -33,6 +33,7 @@ 
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
 ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -196,29 +197,29 @@  (define-public libxml2
     (build-system gnu-build-system)
     (outputs '("out" "static" "doc"))
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-after 'install 'use-other-outputs
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((src (assoc-ref outputs "out"))
-                            (doc (string-append (assoc-ref outputs "doc") "/share"))
-                            (dst (string-append (assoc-ref outputs "static")
-                                                "/lib")))
-                        (mkdir-p doc)
-                        (mkdir-p dst)
-                        (for-each (lambda (dir)
-                                    (rename-file (string-append src "/share/" dir)
-                                                 (string-append doc "/" dir)))
-                                  '("gtk-doc"))
-                        (for-each (lambda (ar)
-                                    (rename-file ar (string-append dst "/"
-                                                                   (basename ar))))
-                                  (find-files (string-append src "/lib") "\\.a$"))
-
-                        ;; Remove reference to the static library from the .la
-                        ;; file such that Libtool does the right thing when both
-                        ;; the shared and static variants are available.
-                        (substitute* (string-append src "/lib/libxml2.la")
-                          (("^old_library='libxml2.a'") "old_library=''"))))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'use-other-outputs
+            (lambda _
+              (let ((doc (string-append #$output:doc "/share/"))
+                    (static (string-append #$output:static "/lib/")))
+                (for-each mkdir-p (list doc static))
+
+                (rename-file (string-append #$output "/share/gtk-doc")
+                             (string-append doc "/gtk-doc"))
+
+                (for-each
+                 (lambda (ar)
+                   (rename-file ar
+                                (string-append static (basename ar))))
+                 (find-files (string-append #$output "/lib") "\\.a$"))
+
+                ;; Remove reference to the static library from the .la
+                ;; file such that Libtool does the right thing when both
+                ;; the shared and static variants are available.
+                (substitute* (string-append #$output "/lib/libxml2.la")
+                  (("^old_library='libxml2.a'") "old_library=''"))))))))
     (home-page "http://www.xmlsoft.org/")
     (synopsis "C parser for XML")
     (inputs (list xz))