]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Fix rst2html5 detection
authorAndrea Bolognani <abologna@redhat.com>
Wed, 3 Nov 2021 12:43:34 +0000 (13:43 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 3 Nov 2021 12:48:54 +0000 (13:48 +0100)
The first part of the version string contains the name that the
rst2html5 command was invoked as, which can differ based on the
operating system: on FreeBSD, for example, it's rst2html5.py
instead of just rst2html5.

Fix our detection logic so that it works regardless of the
specific name used for the docutils-provided rst2html5 command.

Fixes: cf0c9e186565e886a0016b2b269088b3eed3d26d
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
meson.build

index 3a9066b9fe7fc6e78380df4b94e092be73c4915f..6f5d480c1ef92bfae80fd5a5e1025842843b5b8d 100644 (file)
@@ -836,8 +836,8 @@ endforeach
 # Use this knowledge to detect the version that we know doesn't work
 # for building libvirt and reject it
 rst2html5_version = run_command(rst2html5_prog, '--version')
-rst2html5_version = rst2html5_version.stdout().split('(')
-if rst2html5_version[0] != 'rst2html5 '
+rst2html5_version = rst2html5_version.stdout().split(' ')
+if rst2html5_version[1] != '(Docutils'
   error('Please uninstall the rst2html5 package and install the docutils package')
 endif