diff options
author | Simon McVittie <smcv@collabora.com> | 2022-04-23 17:42:58 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-04-23 17:42:58 +0100 |
commit | 95a4914b43db4d603c5137a16610c60a8e2bf66d (patch) | |
tree | 7df9fe38d4cbf7832ee5e38cbf8de515d12b1587 | |
parent | b5d2e78bfae32bd8b9eaaba0e053b6611face893 (diff) | |
parent | faf715828ddef259eceb547b7f68d67da5c9bc74 (diff) | |
download | bubblewrap-wip/smcv/for-flatpak-meson-build.tar.gz |
DO NOT MERGE: Merge branches 'detect-missing-xslt' and 'sanitize'wip/smcv/for-flatpak-meson-build
See #502, #506
-rw-r--r-- | meson.build | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 9277ac4..c4ba441 100644 --- a/meson.build +++ b/meson.build @@ -124,9 +124,24 @@ bwrap = executable( dependencies : [selinux_dep, libcap_dep], ) +manpages_xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' xsltproc = find_program('xsltproc', required : get_option('man')) +build_man_page = false if xsltproc.found() and not meson.is_subproject() + if run_command([ + xsltproc, '--nonet', manpages_xsl, + ], check : false).returncode() == 0 + message('Docbook XSL found, man page enabled') + build_man_page = true + elif get_option('man').enabled() + error('Man page requested, but Docbook XSL stylesheets not found') + else + message('Docbook XSL not found, man page disabled automatically') + endif +endif + +if build_man_page custom_target( 'bwrap.1', output : 'bwrap.1', @@ -140,7 +155,7 @@ if xsltproc.found() and not meson.is_subproject() '--stringparam', 'man.authors.section.enabled', '0', '--stringparam', 'man.copyright.section.enabled', '0', '-o', '@OUTPUT@', - 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl', + manpages_xsl, '@INPUT@', ], install : true, |