Changeset View
Changeset View
Standalone View
Standalone View
head/audio/musicpc/files/patch-doc_meson.build
--- doc/meson.build.orig 2018-02-11 12:01:23 UTC | --- doc/meson.build.orig 2018-06-15 04:16:53 UTC | ||||
+++ doc/meson.build | +++ doc/meson.build | ||||
@@ -1,23 +1,27 @@ | @@ -1,16 +1,19 @@ | ||||
-sphinx = find_program('sphinx-build', required:false) | -sphinx = find_program('sphinx-build', required:false) | ||||
- | |||||
-if sphinx.found() | -if sphinx.found() | ||||
- custom_target( | - custom_target( | ||||
- 'HTML documentation', | - 'HTML documentation', | ||||
- output: 'html', | - output: 'html', | ||||
- input: ['index.rst', 'conf.py'], | - input: ['index.rst', 'conf.py'], | ||||
- command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'], | - command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'], | ||||
- build_by_default: true, | - build_by_default: true, | ||||
- install: true, | - install: true, | ||||
- install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()), | - install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()), | ||||
- ) | - ) | ||||
+use_sphinx = get_option('use_sphinx') | +use_sphinx = get_option('use_sphinx') | ||||
+ | |||||
+if use_sphinx == 'false' | +if use_sphinx == 'false' | ||||
+ use_sphinx = false | + use_sphinx = false | ||||
+elif use_sphinx == 'true' | +elif use_sphinx == 'true' | ||||
+ sphinx = find_program('sphinx-build', required:false) | + sphinx = find_program('sphinx-build', required:false) | ||||
+ if not sphinx.found() | + if not sphinx.found() | ||||
+ error('can\'t find sphinx') | + error('can\'t find sphinx') | ||||
+ endif | + endif | ||||
+ use_sphinx = true | + use_sphinx = true | ||||
+else | +else | ||||
+ sphinx = find_program('sphinx-build', required:false) | + sphinx = find_program('sphinx-build', required:false) | ||||
+ use_sphinx = sphinx.found() | + use_sphinx = sphinx.found() | ||||
+endif | +endif | ||||
+ | |||||
+if use_sphinx | +if use_sphinx | ||||
custom_target( | custom_target( | ||||
'Manpage documentation', | 'Manpage documentation', | ||||
output: 'man', | output: 'man', | ||||
input: ['index.rst', 'conf.py'], | @@ -18,6 +21,6 @@ if sphinx.found() | ||||
- command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'], | command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@/man1'], | ||||
+ command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@/man1'], | |||||
build_by_default: true, | build_by_default: true, | ||||
install: true, | install: true, | ||||
- install_dir: join_paths(get_option('datadir'), 'man', 'man1'), | - install_dir: get_option('datadir'), | ||||
+ install_dir: join_paths(get_option('mandir')), | + install_dir: get_option('mandir'), | ||||
) | ) | ||||
endif | endif |