all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: 63081@debbugs.gnu.org
Cc: andreas@enge.fr, Bruno Victal <mirai@makinata.eu>,
	maxim.cournoyer@gmail.com
Subject: [bug#63081] [PATCH 8/8] gnu: docbook-dsssl: Switch to copy-build-system.
Date: Wed, 26 Apr 2023 01:57:00 +0100	[thread overview]
Message-ID: <10eb0782541de88bafd0dc1660ef43cc2220b7bf.1682470616.git.mirai@makinata.eu> (raw)
In-Reply-To: <aab5207ece8644dc3fc7d88198fc4e3acb5a9337.1682470616.git.mirai@makinata.eu>

* gnu/packages/docbook.scm
(docbook-dsssl)[build-system]: Switch to copy-build-system.
[arguments]: Add phase to install documentation as separate output.
(docbook-dsssl-doc)[build-system]: Switch to copy-build-system.
[arguments]: Adapt to new build-system.
---
 gnu/packages/docbook.scm | 54 ++++++++++++++--------------------------
 1 file changed, 18 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index ced174b3b8..4a911bcec7 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -514,25 +514,22 @@ (define-public docbook-dsssl
               (sha256
                (base32
                 "1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig"))))
-    (build-system trivial-build-system)
+    (build-system copy-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((source (assoc-ref %build-inputs "source"))
-               (dtd (string-append (assoc-ref %outputs "out")
-                                   "/sgml/dtd/docbook"))
-               (docbook-dsssl-doc (assoc-ref %build-inputs "docbook-dsssl-doc"))
-               (doc (assoc-ref %outputs "doc"))
-               (tar (assoc-ref %build-inputs "tar"))
-               (bzip2 (assoc-ref %build-inputs "bzip2")))
-           (setenv "PATH" (string-append tar "/bin" ":" bzip2 "/bin"))
-           (mkdir-p dtd)
-           (invoke "tar" "-xf" source "-C" dtd)
-           ;; The doc output contains 1.4 MiB of HTML documentation.
-           (symlink docbook-dsssl-doc doc)))))
+     (list
+      #:install-plan
+      #~`(("./" "sgml/dtd/docbook/"
+           #:exclude ("doc" "docsrc")))
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; The doc output contains 1.4 MiB of HTML documentation.
+          (add-after 'install 'install-doc
+            (lambda* (#:key inputs #:allow-other-keys)
+              (mkdir-p (string-append #$output:doc "/share/doc"))
+              (symlink (assoc-ref inputs "docbook-dsssl-doc")
+                       (format #f "~a/share/doc/~a-~a"
+                               #$output:doc #$name #$version)))))))
     (inputs
      (list docbook-dsssl-doc))
     (native-inputs
@@ -555,26 +552,11 @@ (define docbook-dsssl-doc
               (sha256
                (base32
                 "1plp5ngc96pbna4rwglp9glcadnirbm3hlcjb4gjvq1f8biic9lz"))))
-    (build-system trivial-build-system)
+    (build-system copy-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((source (assoc-ref %build-inputs "source"))
-               (docdir (string-append (assoc-ref %outputs "out")
-                                      "/share/doc/" "docbook-dsssl-" ,version))
-               (tar (assoc-ref %build-inputs "tar"))
-               (bzip2 (assoc-ref %build-inputs "bzip2")))
-           (setenv "PATH" (string-append tar "/bin" ":" bzip2 "/bin"))
-           (mkdir-p docdir)
-           ;; Extract the "doc" subdirectory.
-           (invoke "tar" "-xf" source "--strip-components=2"
-                   "--no-same-owner" "-C" docdir
-                   (string-append "docbook-dsssl-" ,version "/doc"))))))
-    (native-inputs
-     `(("bzip2" ,bzip2)
-       ("tar" ,tar)))
+     (list
+      #:install-plan
+      #~`(("doc/" #$(string-append "/share/doc/docbook-dsssl-" version)))))
     (home-page "https://docbook.org/")
     (synopsis "DocBook DSSSL style sheets documentation")
     (description "Documentation for the DocBook DSSSL style sheets.")
-- 
2.39.2





  parent reply	other threads:[~2023-04-26  0:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26  0:52 [bug#63081] [PATCH 0/8] Comprehensive DocBook refactoring Bruno Victal
2023-04-26  0:56 ` [bug#63081] [PATCH 1/8] gnu: docbook-xml: Fix installation paths Bruno Victal
2023-04-26  0:56   ` [bug#63081] [PATCH 2/8] gnu: Add docbook-xml-5.0.1 Bruno Victal
2023-04-26  0:56   ` [bug#63081] [PATCH 3/8] gnu: docbook-xsl: Refactor package Bruno Victal
2023-04-26  0:56   ` [bug#63081] [PATCH 4/8] gnu: docbook-xsl-1.79.1: " Bruno Victal
2023-04-26  0:56   ` [bug#63081] [PATCH 5/8] gnu: docbook-utils: " Bruno Victal
2023-04-26  0:56   ` [bug#63081] [PATCH 6/8] gnu: docbook: Refactor docbook-sgml packages Bruno Victal
2023-04-26  0:56   ` [bug#63081] [PATCH 7/8] gnu: docbook: Refactor dblatex packages Bruno Victal
2023-04-26  0:57   ` Bruno Victal [this message]
2023-07-27 16:21 ` [bug#63081] [PATCH 0/8] Comprehensive DocBook refactoring Maxim Cournoyer
2023-08-10 14:10 ` bug#63081: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10eb0782541de88bafd0dc1660ef43cc2220b7bf.1682470616.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=63081@debbugs.gnu.org \
    --cc=andreas@enge.fr \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.