From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cOqYB0hnKGE0KQEAgWs5BA (envelope-from ) for ; Fri, 27 Aug 2021 06:17:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2BsiA0hnKGHcJQAAbx9fmQ (envelope-from ) for ; Fri, 27 Aug 2021 04:17:12 +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 869E37276 for ; Fri, 27 Aug 2021 06:17:11 +0200 (CEST) Received: from localhost ([::1]:33614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJTIk-0001ZQ-JT for larch@yhetil.org; Fri, 27 Aug 2021 00:17:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJTIc-0001Z9-Vs for guix-patches@gnu.org; Fri, 27 Aug 2021 00:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJTIc-0005JS-Nm for guix-patches@gnu.org; Fri, 27 Aug 2021 00:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJTIc-0006x5-Jm for guix-patches@gnu.org; Fri, 27 Aug 2021 00:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50131] [PATCH 2/3 v2] gnu: Add docbook2x. Resent-From: Andrew Whatson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Aug 2021 04:17: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.163003779926676 (code B ref 50131); Fri, 27 Aug 2021 04:17:02 +0000 Received: (at 50131) by debbugs.gnu.org; 27 Aug 2021 04:16:39 +0000 Received: from localhost ([127.0.0.1]:50982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJTIA-0006w8-Mk for submit@debbugs.gnu.org; Fri, 27 Aug 2021 00:16:39 -0400 Received: from mail-pj1-f41.google.com ([209.85.216.41]:52827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJTI5-0006vq-44 for 50131@debbugs.gnu.org; Fri, 27 Aug 2021 00:16:33 -0400 Received: by mail-pj1-f41.google.com with SMTP id h1so3684928pjs.2 for <50131@debbugs.gnu.org>; Thu, 26 Aug 2021 21:16:29 -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=aUIf9d1Bp4uSqVLNT77QtmW1b0uyEfvRrKu6XudrOLo=; b=ot43Ea/pCpz6uPssOJXj3se1tasm08L9UDylKbUoQBf8V3KOMQF6AR6TYK4RCeKnHG /8+KBRypFqFmxM73ygnsBgX/2cS4RrhUCFmarJc/AP6Ku2CSjkGGid5RsoZwv5qDizhn bBheaQwWj3acJOzDN6pc5DXZLbRG0nU6plqa6jW8ek/v+I+sK3L5OawOLT5HVtUnXOjt kZaV0WwbH1by4GtJM6py5/nBugZPGxE3IHxJ2jhiN5ZxixdOSRWfzowqU9LEk2CNruPI v39UOX5pA7xNroc5fK7pcVzSgQrAuzPyDDp2herK55dtBHjrbGkWNL8KQsXYK1WaDDh3 LeRQ== 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=aUIf9d1Bp4uSqVLNT77QtmW1b0uyEfvRrKu6XudrOLo=; b=g3+z+s3ur5A0cjShGF3cH2S1bJAY+mtyTzH5lSrbVdqGaDPjePKnVMXXcudSQ6ac7+ DW3gjimegjxASJ01Oz3iMvdVg2HIsQzWW3BOrZnviHECG5GgAi0b2wCQM2g0bd6ntNSG 0fNjqScrhbj23Kn6JqCmk9TBE1MylgQI2y85L2GS+fb9V8IBbOEObJyk8CYCHQwCSzdy DSz96PI9yhjflJS2MqhHJrQnfSwugLewkSJCj0EVvhDhBp+pRp3j/nCpo1OIWYoS3gyV akLY7/1qLjjt3KpnmtjmOI8ujF45JBdY+81f2P4RO3IsKX/D4bg+dsrveMHerzItwUvo ymhg== X-Gm-Message-State: AOAM530AaXi/fmtqeVLOugxepT33++V7+QsUX7G58tA7qX3Wt8OIZqWn CoU7pe5RY0ybFCrlmpV7W19A5pssy6Ll7g== X-Google-Smtp-Source: ABdhPJwgU6XytgxllOeNd2btY6lbcPdd9cMEznh6SkwRQ4YllUnPzpa9C9kDtz5438c7im0uVjMGEw== X-Received: by 2002:a17:902:ec92:b0:135:772b:89b3 with SMTP id x18-20020a170902ec9200b00135772b89b3mr6740988plg.74.1630037782956; Thu, 26 Aug 2021 21:16:22 -0700 (PDT) Received: from localhost.localdomain ([2001:8000:1ab6:ff00:da0b:fdd8:d6b3:9e94]) by smtp.gmail.com with ESMTPSA id ml10sm666452pjb.9.2021.08.26.21.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 21:16:22 -0700 (PDT) From: Andrew Whatson Date: Fri, 27 Aug 2021 14:15:36 +1000 Message-Id: <20210827041536.13774-1-whatson@gmail.com> X-Mailer: git-send-email 2.33.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=1630037831; 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=aUIf9d1Bp4uSqVLNT77QtmW1b0uyEfvRrKu6XudrOLo=; b=VxVp87JEymMC12ll6v/qPlhDBtdoZlo5KapttvcoMF2Bs46yLTIgsJEnkRnywfPjDUNqcj CgLd0JZWdfX56MVqsyLBG2qt9iXruwwCrlMfQJxLbwhJebMJZgDbWbilzWxOG78WhcxcyR X7IDPM0B6+bNwXdNVK5e5EJRdprfGRrkHzjuy2awLtJX6soeIbtei8mX8D0Fv4Q87jK0WQ XK6Npn5qlCC/dqpQ6PhCEjztbqr79Q0tW4PBVb3UtfRHf/bmVsBeB/rsmJ2tMQd0llP7Rj 3XgdYat+jd4G/P3PDcX3Yq4jNwLObFK4D7nCVui/qtwaVU+ulxPvLEKv+RnqKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630037831; a=rsa-sha256; cv=none; b=BYn9IccT1Ky7bsBPwWaACYJCextR9skjOuUZ0k6WmchT+Wg3pFx2GhIF3V9L4CtZgP2/vx 7QmlxSMs7D/1pmng1p5DViKOEGgCZBTATJReAQMSkLEC9OlWT0faI17o/dYc0HRudkvCGY pqrS3oAUdydJGYyGvStFGQydPfSyQZYP3DGNyVm/vYqK0MDoCwt/taTtq+ULBrGjsQ0Dj6 INHH0JDzY0kz1263ykpPq8g9dh/vGCoUEMS6BR7ZM7R67GhoAYrd73aAcac8uGucAc9eTD 3sVCNJgY/km4Nbh/yVgVsW+FILOwLXoVY19vfhILYz2BvGZJheKIQSbgsz+oPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="ot43Ea/p"; 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.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="ot43Ea/p"; 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: 869E37276 X-Spam-Score: -0.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: lPfmDSxb7Hsj * gnu/packages/docbook.scm (docbook2x): New variable. --- gnu/packages/docbook.scm | 94 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 6a69f8cf89..ba90376e8b 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,92 @@ 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 + `(#: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)))) + (add-after 'install 'create-symlinks + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Create db2x_* symlinks to satisfy some configure scripts + ;; which use these names to differentiate from an older + ;; docbook2man script provided by docbook-utils. + (map (lambda (prog) + (symlink prog (string-append out "/bin/db2x_" prog))) + '("docbook2man" "docbook2texi")))))))) + (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.33.0