2018-08-11.use-asciidoctor-to-build-manpages.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. Subject: Use asciidoctor to build the manpages
  2. Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  3. Date: 2018-08-11
  4. Bug: https://github.com/latchset/tang/issues/32
  5. --- a/meson.build
  6. +++ b/meson.build
  7. @@ -49,7 +49,7 @@
  8. )
  9. jose = dependency('jose', version: '>=8')
  10. -a2x = find_program('a2x', required: false)
  11. +asciidoctor = find_program('asciidoctor', required: false)
  12. compiler = meson.get_compiler('c')
  13. if not compiler.has_header('http_parser.h',args : '-I/usr/local/include')
  14. error('http-parser devel files not found.')
  15. @@ -72,16 +72,16 @@
  16. install_data(units, install_dir: systemunitdir)
  17. install_data(licenses, install_dir: licensedir)
  18. -if a2x.found()
  19. +if asciidoctor.found()
  20. foreach m : mans
  21. custom_target(m.split('/')[-1], input: m + '.adoc', output: m.split('/')[-1],
  22. - command: [a2x, '-f', 'manpage', '-D', meson.current_build_dir(), '@INPUT@'],
  23. + command: [asciidoctor, '--attribute', 'reproducible', '--backend=manpage', '-D', meson.current_build_dir(), '@INPUT@'],
  24. install_dir: join_paths(get_option('mandir'), 'man' + m.split('.')[-1]),
  25. install: true
  26. )
  27. endforeach
  28. else
  29. - warning('Will not build man pages due to missing a2x (asciidoc) dependency!')
  30. + warning('Will not build man pages due to missing asciidoctor (asciidoc) dependency!')
  31. endif
  32. # vim:set ts=2 sw=2 et: