diff mbox series

[bug#65479,core-updates,09/61] gnu: docbook2x: Fix sgml2xml-isoent and add test dependencies.

Message ID c158b9ccdac64bf378b11d5af04e5b3ee73481da.1692830149.git.mirai@makinata.eu
State New
Headers show
Series The Draining of the XML & DocBook Swamp. | expand

Commit Message

Bruno Victal Aug. 23, 2023, 10:35 p.m. UTC
* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Add 'sgml-check
phase.
[inputs]: Add opensp.
[native-inputs]: Add docbook-xml-4.1.2, docbook-xml-4.2, docbook-xml-4.4,
tidy-html, groff-minimal and libxml2.
---
 gnu/packages/docbook.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Comments

Maxim Cournoyer Oct. 5, 2023, 9:50 p.m. UTC | #1
Hi,

Bruno Victal <mirai@makinata.eu> writes:

> * gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Add 'sgml-check
> phase.
> [inputs]: Add opensp.
> [native-inputs]: Add docbook-xml-4.1.2, docbook-xml-4.2, docbook-xml-4.4,
> tidy-html, groff-minimal and libxml2.
> ---
>  gnu/packages/docbook.scm | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
> index 6a138dcb77..2d1c1f00ad 100644
> --- a/gnu/packages/docbook.scm
> +++ b/gnu/packages/docbook.scm
> @@ -30,6 +30,7 @@ (define-module (gnu packages docbook)
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages bash)
>    #:use-module (gnu packages compression)
> +  #:use-module (gnu packages groff)
>    #:use-module (gnu packages imagemagick)
>    #:use-module (gnu packages inkscape)
>    #:use-module (gnu packages tex)
> @@ -37,6 +38,7 @@ (define-module (gnu packages docbook)
>    #:use-module (gnu packages perl)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages base)
> +  #:use-module (gnu packages web)
>    #:use-module (gnu packages web-browsers)
>    #:use-module (gnu packages xfig)
>    #:use-module (gnu packages xml)
> @@ -924,6 +926,12 @@ (define-public docbook2x
>                           `("PERL5LIB" ":" prefix ,perl5lib)
>                           `("XML_CATALOG_FILES" " " prefix ,xml-catalog-files)))
>                       programs))))
> +          (add-after 'install 'sgml-check
> +            ;; This is not covered by 'make check'.
> +            ;; Test that 'sgml2xml-isoent' works.
> +            (lambda* (#:key tests? #:allow-other-keys)
> +              (when tests?
> +                (invoke "make" "installcheck"))))
>            (add-after 'install 'create-symlinks
>              (lambda _
>                ;; Create db2x_* symlinks to satisfy some configure scripts
> @@ -935,6 +943,7 @@ (define-public docbook2x
>                     '("docbook2man" "docbook2texi")))))))
>      (inputs
>       (list bash-minimal
> +           opensp
>             perl
>             perl-xml-namespacesupport
>             perl-xml-parser
> @@ -944,7 +953,11 @@ (define-public docbook2x
>             libxslt))
>      (native-inputs
>       (list autoconf automake libtool
> -           docbook-xml-4.5))
> +           tidy-html
> +           ;; For tests

I've abandoned adding this kind of comment "For tests."; they are easy
to go stale, and it's not clear when new inputs get added later if they
are supposed to be included in that group or not.  I'd suggest to drop
it and reorganize inputs one per line since there are many.

Otherwise LGTM.
Bruno Victal Oct. 9, 2023, 4:51 p.m. UTC | #2
Hi Maxim,

On 2023-10-05 22:50, Maxim Cournoyer wrote:
> I've abandoned adding this kind of comment "For tests."; they are easy
> to go stale, and it's not clear when new inputs get added later if they
> are supposed to be included in that group or not.  I'd suggest to drop
> it and reorganize inputs one per line since there are many.

Right but I think for this package in particular there's not much harm
since it doesn't look like it's going to receive updates from upstream
any time soon.
Maxim Cournoyer Oct. 9, 2023, 6:24 p.m. UTC | #3
Hi,

Bruno Victal <mirai@makinata.eu> writes:

> Hi Maxim,
>
> On 2023-10-05 22:50, Maxim Cournoyer wrote:
>> I've abandoned adding this kind of comment "For tests."; they are easy
>> to go stale, and it's not clear when new inputs get added later if they
>> are supposed to be included in that group or not.  I'd suggest to drop
>> it and reorganize inputs one per line since there are many.
>
> Right but I think for this package in particular there's not much harm
> since it doesn't look like it's going to receive updates from upstream
> any time soon.

OK!  It's fine; keep that in mind in the future though :-).
diff mbox series

Patch

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 6a138dcb77..2d1c1f00ad 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -30,6 +30,7 @@  (define-module (gnu packages docbook)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages groff)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages tex)
@@ -37,6 +38,7 @@  (define-module (gnu packages docbook)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages web-browsers)
   #:use-module (gnu packages xfig)
   #:use-module (gnu packages xml)
@@ -924,6 +926,12 @@  (define-public docbook2x
                          `("PERL5LIB" ":" prefix ,perl5lib)
                          `("XML_CATALOG_FILES" " " prefix ,xml-catalog-files)))
                      programs))))
+          (add-after 'install 'sgml-check
+            ;; This is not covered by 'make check'.
+            ;; Test that 'sgml2xml-isoent' works.
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "make" "installcheck"))))
           (add-after 'install 'create-symlinks
             (lambda _
               ;; Create db2x_* symlinks to satisfy some configure scripts
@@ -935,6 +943,7 @@  (define-public docbook2x
                    '("docbook2man" "docbook2texi")))))))
     (inputs
      (list bash-minimal
+           opensp
            perl
            perl-xml-namespacesupport
            perl-xml-parser
@@ -944,7 +953,11 @@  (define-public docbook2x
            libxslt))
     (native-inputs
      (list autoconf automake libtool
-           docbook-xml-4.5))
+           tidy-html
+           ;; For tests
+           docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
+           docbook-xml-4.5
+           groff-minimal libxml2))
     (home-page "https://docbook2x.sourceforge.net")
     (synopsis "Convert DocBook to man page and Texinfo format")
     (description