diff mbox series

[bug#65479,core-updates,v3,57/63] gnu: libstdc++-doc: Rewrite with G-Expressions.

Message ID 741edfc153734699a3c61c479244703515bdec68.1696881354.git.mirai@makinata.eu
State New
Headers show
Series Docbook & XML/SGML improvements | expand

Commit Message

Bruno Victal Oct. 9, 2023, 8:06 p.m. UTC
* gnu/packages/gcc.scm (make-libstdc++-doc): Rewrite arguments with
G-Expressions.
---
 gnu/packages/gcc.scm | 61 ++++++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 30 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 5c6ef8ccbf..2bb76c0a02 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -13,6 +13,7 @@ 
 ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -1328,36 +1329,36 @@  (define (make-libstdc++-doc gcc)
     (inputs '())
     (propagated-inputs '())
     (arguments
-     '(#:out-of-source? #t
-       #:tests? #f                                ;it's just documentation
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'chdir
-                              (lambda _
-                                (chdir "libstdc++-v3")))
-                  (add-before 'configure 'set-xsl-directory
-                              (lambda* (#:key inputs #:allow-other-keys)
-                                (let ((docbook (assoc-ref inputs "docbook-xsl")))
-                                  (substitute* (find-files "doc"
-                                                           "^Makefile\\.in$")
-                                    (("@XSL_STYLE_DIR@")
-                                     (string-append
-                                      docbook "/xml/xsl/"
-                                      (strip-store-file-name docbook)))))))
-                  (replace 'build
-                           (lambda _
-                             ;; XXX: There's also a 'doc-info' target, but it
-                             ;; relies on docbook2X, which itself relies on
-                             ;; DocBook 4.1.2, which is not really usable
-                             ;; (lacks a catalog.xml.)
-                             (invoke "make"
-                                     "doc-html"
-                                     "doc-man")))
-                  (replace 'install
-                           (lambda* (#:key outputs #:allow-other-keys)
-                             (let ((out (assoc-ref outputs "out")))
-                               (invoke "make"
-                                       "doc-install-html"
-                                       "doc-install-man")))))))
+     (list
+      #:out-of-source? #t
+      #:tests? #f                                ;it's just documentation
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'chdir
+            (lambda _
+              (chdir "libstdc++-v3")))
+          (add-before 'configure 'set-xsl-directory
+            (lambda _
+              (substitute* (find-files "doc"
+                                       "^Makefile\\.in$")
+                (("@XSL_STYLE_DIR@")
+                 (string-append #$(this-package-native-input "docbook-xsl")
+                                "/xml/xsl/"
+                                (strip-store-file-name docbook))))))
+          (replace 'build
+            (lambda _
+              ;; XXX: There's also a 'doc-info' target, but it
+              ;; relies on docbook2X, which itself relies on
+              ;; DocBook 4.1.2, which is not really usable
+              ;; (lacks a catalog.xml.)
+              (invoke "make"
+                      "doc-html"
+                      "doc-man")))
+          (replace 'install
+            (lambda _
+              (invoke "make"
+                      "doc-install-html"
+                      "doc-install-man"))))))
     (properties (alist-delete 'hidden? (package-properties gcc)))))
 
 (define-public libstdc++-doc-5