0001-meson-extra-check-of-docbookx-dtd.patch

text/x-patch

Filename: 0001-meson-extra-check-of-docbookx-dtd.patch
Type: text/x-patch
Part: 0
Message: Check for availability of docbookx.dtd

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
Series: patch 0001
File+
doc/build/check-dtd.xml 3 0
meson.build 5 1
diff --git a/doc/build/check-dtd.xml b/doc/build/check-dtd.xml
new file mode 100644
index 00000000000..8d361447a19
--- /dev/null
+++ b/doc/build/check-dtd.xml
@@ -0,0 +1,3 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book id="check-dtd" />
diff --git a/meson.build b/meson.build
index ab8101d67b2..fb8ce940bbe 100644
--- a/meson.build
+++ b/meson.build
@@ -621,7 +621,11 @@ docs_opt = get_option('docs')
 docs_dep = not_found_dep
 if not docs_opt.disabled()
   if xmllint_bin.found() and xsltproc_bin.found()
-    docs_dep = declare_dependency()
+    if run_command(xmllint_bin, '--nonet', '--valid', '--noout', 'doc/build/check-dtd.xml', check: false).returncode() != 0
+      error('missing required DocBook XML DTD (probably missing package docbook-xsl)')
+    else
+      docs_dep = declare_dependency()
+    endif
   elif docs_opt.enabled()
     error('missing required tools (xmllint and xsltproc needed) for docs in HTML / man page format')
   endif