Subject: [bug#50131] [PATCH 3/3] gnu: Generate man pages for lxc.

From: Andrew Whatson <[email-masked]>
Date: Fri, 20 Aug 2021 22:09:07 +1000

* gnu/packages/virtualization.scm (lxc)[inputs]: Add docboo2x.
[phases]{patch-docbook-dtd}: New phase.
---
 gnu/packages/virtualization.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 1bbcb46b99..f1a9e28d3f 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1008,7 +1008,8 @@ all common programming languages.  Vala bindings are also provided.")
                 "0qz4l7mlhq7hx53q606qgvkyzyr01glsw290v8ppzvxn1fydlrci"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("docbook2x" ,docbook2x)))
     (inputs
      `(("gnutls" ,gnutls)
        ("libcap" ,libcap)
@@ -1022,6 +1023,12 @@ all common programming languages.  Vala bindings are also provided.")
              "--localstatedir=/var")
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'patch-docbook-dtd
+           (lambda _
+             ;; Fix incorrect DocBook DTD
+             (substitute* "configure"
+               (("\\\\\"-//Davenport//DTD DocBook V3\\.0//EN\\\\\"")
+                "\\\"-//OASIS//DTD DocBook XML\\\" \\\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\\\""))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out         (assoc-ref outputs "out"))
-- 
2.32.0