From patchwork Wed Apr 26 00:56:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 49517 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A070127BBE2; Wed, 26 Apr 2023 01:58:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 092C4175BB for ; Wed, 26 Apr 2023 01:58:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prTU1-0006eD-0s; Tue, 25 Apr 2023 20:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prTTy-0006cj-Iz for guix-patches@gnu.org; Tue, 25 Apr 2023 20:58:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prTTw-00014H-I1 for guix-patches@gnu.org; Tue, 25 Apr 2023 20:58:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prTTw-0001de-D7 for guix-patches@gnu.org; Tue, 25 Apr 2023 20:58:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63081] [PATCH 5/8] gnu: docbook-utils: Refactor package. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 Apr 2023 00:58:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63081 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63081@debbugs.gnu.org Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com Received: via spool by 63081-submit@debbugs.gnu.org id=B63081.16824706766239 (code B ref 63081); Wed, 26 Apr 2023 00:58:04 +0000 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:56 +0000 Received: from localhost ([127.0.0.1]:53852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTn-0001cT-PQ for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:56 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:44526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTj-0001cA-IZ for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:52 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id ADA2A21F7E; Wed, 26 Apr 2023 02:57:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 43582800A1; Wed, 26 Apr 2023 02:57:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id l13YvJuWA1Qx; Wed, 26 Apr 2023 02:57:38 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7B3848009E; Wed, 26 Apr 2023 02:57:38 +0200 (CEST) From: Bruno Victal Date: Wed, 26 Apr 2023 01:56:57 +0100 Message-Id: <2b886bdc0bf4d36d565ac3702768dc0bb053f21c.1682470616.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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")