unofficial mirror of guix-patches@gnu.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 5/8] gnu: docbook-utils: Refactor package.
Date: Wed, 26 Apr 2023 01:56:57 +0100	[thread overview]
Message-ID: <2b886bdc0bf4d36d565ac3702768dc0bb053f21c.1682470616.git.mirai@makinata.eu> (raw)
In-Reply-To: <aab5207ece8644dc3fc7d88198fc4e3acb5a9337.1682470616.git.mirai@makinata.eu>

* gnu/packages/docbook.scm (docbook-utils)[description]: Fix description.
[source]: Patch source in snippet.
[arguments]: Remove.
---
 gnu/packages/docbook.scm | 96 ++++++++++++++++++++--------------------
 1 file changed, 49 insertions(+), 47 deletions(-)

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index b3e53557e8..d4441bacee 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -780,45 +780,40 @@ (define-public docbook-utils
                                   version ".orig.tar.gz"))
               (sha256
                (base32
-                "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))))
+                "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   ;; Patch build system.
+                   (substitute* (find-files "." "\\.in$")
+                     ;; Do not hard-code SGML_CATALOG_FILES.
+                     ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
+                     ;; Use OpenSP and OpenJade.
+                     (("\\bjade\\b")
+                      "openjade")
+                     (("\\bnsgmls\\b")
+                      "onsgmls"))
+
+                   ;; Do not override the SGML_CATALOG_FILES environment
+                   ;; variable.
+                   (substitute* "bin/jw.in"
+                     ((".*SGML_CATALOG_FILES=`find.*")
+                      "")
+                     (("SGML_CATALOG_FILES=`echo.*")
+                      ":\n")
+                     (("SGML_CATALOG_FILES=\"\"")
+                      ":")
+                     (("\\bwhich\\b")
+                      "command -v"))
+
+                   ;; Locate lynx, links or w3m from the PATH, not from
+                   ;; /usr/bin.
+                   (substitute* "backends/txt"
+                     (("CONVERT=/usr/bin/")
+                      "CONVERT=")
+                     (("\\[ -x /usr/bin/([^ ]+) \\]" _ command)
+                      (format #f "command -v ~a > /dev/null" command)))))))
     (build-system gnu-build-system)
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'patch-build-system
-                    (lambda _
-                      (substitute* (find-files "." "\\.in$")
-                        ;; Do not hard-code SGML_CATALOG_FILES.
-                        ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
-                        ;; Use OpenSP and OpenJade.
-                        (("\\bjade\\b")
-                         "openjade")
-                        (("\\bnsgmls\\b")
-                         "onsgmls"))
-                      #t))
-                  (add-after 'unpack 'patch-jw.in
-                    ;; Do not override the SGML_CATALOG_FILES environment
-                    ;; variable.
-                    (lambda _
-                      (substitute* "bin/jw.in"
-                        ((".*SGML_CATALOG_FILES=`find.*")
-                         "")
-                        (("SGML_CATALOG_FILES=`echo.*")
-                         ":\n")
-                        (("SGML_CATALOG_FILES=\"\"")
-                         ":")
-                        (("\\bwhich\\b")
-                         "command -v"))
-                      #t))
-                  (add-after 'unpack 'patch-txt-backend
-                    (lambda _
-                      ;; Locate lynx, links or w3m from the PATH, not from
-                      ;; /usr/bin.
-                      (substitute* "backends/txt"
-                        (("CONVERT=/usr/bin/")
-                         "CONVERT=")
-                        (("\\[ -x /usr/bin/([^ ]+) \\]" dummy command)
-                         (string-append "command -v " command " > /dev/null")))
-                      #t)))))
     ;; Propagated for convenience.  All these tools are used at run time to
     ;; provide the complete functionality of the docbook-utils commands.
     (propagated-inputs
@@ -839,15 +834,22 @@ (define-public docbook-utils
 Language (HTML), Rich Text Format (RTF), PostScript (PS), man, Portable
 Document Format (PDF), TeX, Texinfo or plain text (txt).  It can be used
 more conveniently via the following wrappers:
-@itemx docbook2dvi Convert a SGML DocBook file to the DVI format.
-@itemx docbook2html Convert a SGML DocBook file to an HTML document.
-@itemx docbook2man Convert a SGML DocBook file a man page.
-@itemx docbook2pdf Convert a SGML DocBook file to a PDF document.
-@itemx docbook2ps Convert a SGML DocBook file to a PS document.
-@itemx docbook2rtf Convert a SGML DocBook file to a RTF document.
-@itemx docbook2tex Convert a SGML DocBook file to a TeX document.
-@itemx docbook2texi Convert a SGML DocBook file to a Texinfo document.
-@itemx docbook2txt Convert a SGML DocBook file to a plain text document.
+@table @command
+@item docbook2dvi
+Convert a SGML DocBook file to the DVI format.
+@item docbook2html
+Convert a SGML DocBook file to an HTML document.
+@item docbook2man
+Convert a SGML DocBook file a man page.
+@item docbook2pdf
+@itemx docbook2ps
+@itemx docbook2rtf
+@itemx docbook2tex
+@itemx docbook2texi
+Convert a SGML DocBook file to a PDF/PS/RTF/TeX document.
+@item docbook2txt
+Convert a SGML DocBook file to a plain text document.
+@end table
 @item sgmldiff
 Detect the differences in markup between two SGML files.
 @end table")
-- 
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   ` Bruno Victal [this message]
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   ` [bug#63081] [PATCH 8/8] gnu: docbook-dsssl: Switch to copy-build-system Bruno Victal
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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=2b886bdc0bf4d36d565ac3702768dc0bb053f21c.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).