From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QCt0FqGbH2EIDgAAgWs5BA (envelope-from ) for ; Fri, 20 Aug 2021 14:10:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4A5AEqGbH2F1WAAA1q6Kng (envelope-from ) for ; Fri, 20 Aug 2021 12:10:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 00DE5C9EC for ; Fri, 20 Aug 2021 14:10:09 +0200 (CEST) Received: from localhost ([::1]:51890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mH3Lc-0000UX-1m for larch@yhetil.org; Fri, 20 Aug 2021 08:10:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mH3LX-0000U0-2S for guix-patches@gnu.org; Fri, 20 Aug 2021 08:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mH3LW-0000y7-Rr for guix-patches@gnu.org; Fri, 20 Aug 2021 08:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mH3LW-0001QR-NC for guix-patches@gnu.org; Fri, 20 Aug 2021 08:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50131] [PATCH 2/3] gnu: Add docbook2x. Resent-From: Andrew Whatson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Aug 2021 12:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50131 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50131@debbugs.gnu.org Cc: Andrew Whatson Received: via spool by 50131-submit@debbugs.gnu.org id=B50131.16294613715409 (code B ref 50131); Fri, 20 Aug 2021 12:10:02 +0000 Received: (at 50131) by debbugs.gnu.org; 20 Aug 2021 12:09:31 +0000 Received: from localhost ([127.0.0.1]:33103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH3L1-0001PB-0g for submit@debbugs.gnu.org; Fri, 20 Aug 2021 08:09:31 -0400 Received: from mail-pg1-f170.google.com ([209.85.215.170]:38725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH3Ky-0001Ou-U0 for 50131@debbugs.gnu.org; Fri, 20 Aug 2021 08:09:29 -0400 Received: by mail-pg1-f170.google.com with SMTP id w8so8951671pgf.5 for <50131@debbugs.gnu.org>; Fri, 20 Aug 2021 05:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2lRAla9BPXv1ykQx7fftYWM3SfqBPYvZrx2fWuURDck=; b=FRgJklUIutW8K4FeiAOxB+WZj8JIoqH5adSNTPZDjmEKPAwOb48D2ZZPn3gsFvhL7q vqhQQHY9YJpaUJdwgpHEpAFfTadyydPA3ReObXbUIhHmFedk2LNBMdxnm1VdxJMFBmiM ZQVFEoXHNzB0uMcSCpSIOT4WhkvP9JXoqqXVhm18vIVQm3uS3SzPDWwqcv6hpC5EuJeZ FunrlHSKBKARIEtKANB29HPzDqMUGm3HdUhfJaMYs2ylYq2GfHxMfrh1xWKkPvEUnkAA QIpSvOJVAU89zh0XaUjS9/3dtFmnbg+xdb8BgPsaVRnxvGufZGKzlgV7UXBX+kzIRWzq N+tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2lRAla9BPXv1ykQx7fftYWM3SfqBPYvZrx2fWuURDck=; b=THaB9tkHnQFXqoWwf+brciEMvGZ3putCNiq4cW2aKma6tqgIRRaZs5K8PtVeYZZjk6 HDxgbrv/nP2C3GBB6EYkM4Eoa3vbZ+zcgunoXYddJ5Lpm0TNLdK5bV/xfzUZI/XWYQRl cNbXNWJjgpTwuKilrTOgPEWkqlBTM1XrmhsHR3G1Dv2Z/+7oEcKeEcJvIoT6fG/3/klj 6mMxyxxge7NEz7s+C3I5CMXXLmsXuq8ZvSxofwNlykwsezUaCuhPXvaeEpS64l+egBhy HwkxB0QFkYAuCydxWAxz5EMFAXDZTM1lWcQYoF6YDBUHVOLVcqrcxEvAVtatLugwcoOT /8WA== X-Gm-Message-State: AOAM531hMkO5chrt1Qc5NWPcCFpHwylYx0QO0sXqVZm3QIZ6o0CeAM+A b0HbOxDuF68aEq2wdRHsJ4fVGeb2yDU= X-Google-Smtp-Source: ABdhPJz8Y3rEMNDAM9wgREb2ujXBF4AIffMPJCnha2/Q5wIBEs8GW8PnpmIENuRq8uGek6G2FtcPrA== X-Received: by 2002:a65:6494:: with SMTP id e20mr18803474pgv.101.1629461363177; Fri, 20 Aug 2021 05:09:23 -0700 (PDT) Received: from muon.fritz.box (220-235-208-141.tpgi.com.au. [220.235.208.141]) by smtp.gmail.com with ESMTPSA id gb17sm5543112pjb.26.2021.08.20.05.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 05:09:22 -0700 (PDT) From: Andrew Whatson Date: Fri, 20 Aug 2021 22:09:06 +1000 Message-Id: <20210820120907.83191-2-whatson@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210820120907.83191-1-whatson@gmail.com> References: <20210820120907.83191-1-whatson@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629461409; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2lRAla9BPXv1ykQx7fftYWM3SfqBPYvZrx2fWuURDck=; b=X0QjS2bwG7XWw3g1hb67RcWvPZf1O0qj4ckdPWt5NesqyawaeIUUTAYW7kYH4dIbVGOpKB 5txH+1c5APsIFVUG1kPsWLd+D0zHejnOaEHltswOK9OsCvzzCWCHhe6TXAEhAwDU7Ac+oB znobbrURPqKmjbOeEFNbm630826Cmi2Q/PmjLHw+GB3joegt+7k1JqxTkjajr3L+A4H2f7 iKt2/FXQeRl1vQQHkwviHg5cubC5/lrJ0qOE3hYF7NVzBy1TOSiRghziNVNL+eRczIVbui tvWZNgMY+qn9EHZ8Pe//8oVSDQ3nh7HlR+kokPSHAL1//BBeWF5EWt4SgYcHNA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629461409; a=rsa-sha256; cv=none; b=R19SXAxIOf2k89iHEjJuU2P4w/7DNgROYqHQupWo6m6ShpuffbZ3k+WF5dhi+MgyeoH6F+ +8QM9AVUu3+KD6edYPrKQzmEEuyHKX8Bw+HbfGgClul4GofnEPXLimEYiz6aM4e6bpOX4k hme8C9SvRRII4RsgSaRAsiRYgEk1mP7gN2i5iMHN+e6vXYz/rjSqlsAazSMJRbQl70Iowb 1oJy2S5116TyXLWSV3IrQwxD9ZAe+jXn99ZqnojHToke3o2fUod41JvKW+Mzuhe/QJ3zAK M6OkSoU52NgH86qQvsy+5MxivnKVaG93vMGbhC5PfiaLXnfXlXtlDUFL0OdJJw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=FRgJklUI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=FRgJklUI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 00DE5C9EC X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: hukfmEaqyBk1 * gnu/packages/docbook.scm (docbook2x): New variable. --- gnu/packages/docbook.scm | 87 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 6a69f8cf89..fdc432eb20 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Mark H Weaver +;;; Copyright © 2021 Andrew Whatson ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,10 +25,13 @@ (define-module (gnu packages docbook) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages imagemagick) #:use-module (gnu packages inkscape) #:use-module (gnu packages tex) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages base) #:use-module (gnu packages xml) @@ -35,6 +39,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module ((guix build utils) #:select (alist-replace)) + #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix build-system python)) @@ -473,3 +478,85 @@ DB2LaTeX.") (package/inherit dblatex (inputs (alist-replace "imagemagick" `(,imagemagick/stable) (package-inputs dblatex)))))) + +(define-public docbook2x + (package + (name "docbook2x") + (version "0.8.8") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/docbook2x/docbook2x/" + version "/docbook2X-" version ".tar.gz")) + (sha256 + (base32 + "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0")))) + (build-system gnu-build-system) + (inputs + `(("bash-minimal" ,bash-minimal) + ("docbook-xml" ,docbook-xml) + ("perl" ,perl) + ("perl-xml-namespacesupport" ,perl-xml-namespacesupport) + ("perl-xml-parser" ,perl-xml-parser) + ("perl-xml-sax" ,perl-xml-sax) + ("perl-xml-sax-base" ,perl-xml-sax-base) + ("texinfo" ,texinfo) + ("xsltproc" ,libxslt))) + (arguments + `(#:configure-flags + (list (string-append "--prefix=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'configure 'patch-sources + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Fix failed substitution in config.pl + (substitute* "perl/config.pl" + (("\\$\\{prefix\\}") + (assoc-ref outputs "out"))) + ;; Fix a failing test (maybe it worked with old texinfo?) + (substitute* "test/complete-manuals/at1.xml" + (("") + "")) + ;; Patch all the tests use DocBook 4.5 + (substitute* (find-files "test" "\\.xml$") + (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"") + "\"-//OASIS//DTD DocBook XML V4.5//EN\"") + (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"") + "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\"")) + ;; Set XML catalogs for tests to pass + (setenv "XML_CATALOG_FILES" + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/catalog.xml")))) + (add-after 'install 'wrap-programs + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (programs + (map (lambda (p) + (string-append out "/bin/" p)) + '("db2x_manxml" "db2x_texixml" "db2x_xsltproc" + "docbook2man" "docbook2texi"))) + (perl5lib + (map (lambda (i) + (string-append (assoc-ref inputs i) + "/lib/perl5/site_perl")) + '("perl-xml-namespacesupport" + "perl-xml-parser" + "perl-xml-sax" + "perl-xml-sax-base"))) + (xml-catalog-files + (list (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/catalog.xml")))) + (map (lambda (program) + (wrap-program program + `("PERL5LIB" ":" prefix + ,perl5lib) + `("XML_CATALOG_FILES" " " prefix + ,xml-catalog-files))) + programs))))))) + (home-page "http://docbook2x.sourceforge.net") + (synopsis "Convert DocBook to man page and Texinfo format") + (description + "docbook2X is a software package that converts DocBook documents into the +traditional Unix man page format and the GNU Texinfo format. Notable features +include table support for man pages, internationalization support, and easy +customization of the output using XSLT.") + (license license:expat))) -- 2.32.0