diff mbox series

[bug#63854] gnu: po4a: Fix SGML tests.

Message ID 787df376b4ca9aaf15b8eda7c04ee7ae984d78e9.1685728331.git.gemmaro.dev@gmail.com
State New
Headers show
Series [bug#63854] gnu: po4a: Fix SGML tests. | expand

Commit Message

gemmaro June 2, 2023, 5:52 p.m. UTC
* gnu/packages/gettext.scm (po4a): Fix SGML tests.
---
 gnu/packages/gettext.scm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)


base-commit: a7d9cd742c3149bb014db95f88d1158d590bc124

Comments

Bruno Victal June 3, 2023, 10:12 p.m. UTC | #1
Hi gemmaro,

I think this is the wrong place to set the SGML_CATALOG_FILES,
based on the information in the manpage for xmllint (libxml2),
it seems that the libxml2 package should be setting this variable
through the native-search-paths instead.
diff mbox series

Patch

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 9387f4fb8a5..0d66d492d40 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -11,7 +11,7 @@ 
 ;;; Copyright © 2019 Miguel <rosen644835@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
-;;; Copyright © 2022 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2022, 2023 gemmaro <gemmaro.dev@gmail.com>
 ;;; Copyright © 2023 Maxim Cournoyer maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -280,10 +280,11 @@  (define-public po4a
                             (wrap-program file
                               `("PERL5LIB" ":" prefix (,path))))
                           (find-files bin "\\.*$")))))
-          (add-before 'check 'disable-failing-tests
-            (lambda _
-              ;; FIXME: fails despite of importing SGMLS
-              (delete-file "t/fmt-sgml.t"))))))
+          (add-before 'check 'set-SGML-catalog-file
+            (lambda* (#:key inputs #:allow-other-keys)
+              (setenv "SGML_CATALOG_FILES"
+                      (string-append (assoc-ref inputs "docbook-sgml")
+                                     "/sgml/dtd/docbook/docbook.cat")))))))
     (native-inputs
      (list gettext-minimal
            perl-module-build
@@ -291,11 +292,13 @@  (define-public po4a
            libxml2
            libxslt
            ;; For tests.
+           docbook-sgml-4.1
            docbook-xml-4.1.2
            perl-test-pod
            texlive-tiny))
     (inputs
      (list bash-minimal
+           opensp
            perl-gettext
            perl-pod-parser
            perl-sgmls