0001-Do-not-fail-to-build-if-ronn-is-missing.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 322294d7bf61f9fdf0e45e9b6c6013a7c6a35bfd Mon Sep 17 00:00:00 2001
  2. From: Derrick Lyndon Pallas <derrick@meter.com>
  3. Date: Wed, 14 Oct 2020 18:25:54 +0000
  4. Subject: [PATCH] Do not fail to build if ronn is missing
  5. If ruby-ronn is missing, we can not compile the man page from markdown but
  6. that should not prevent the application from building.
  7. Signed-off-by: Derrick Lyndon Pallas <derrick@meter.com>
  8. ---
  9. meson.build | 23 ++++++++++++-----------
  10. 1 file changed, 12 insertions(+), 11 deletions(-)
  11. diff --git a/meson.build b/meson.build
  12. index a2169fc..981d4a4 100644
  13. --- a/meson.build
  14. +++ b/meson.build
  15. @@ -72,16 +72,17 @@ ipcalc = executable('ipcalc',
  16. install : true
  17. )
  18. -ronn = find_program('ronn', required: true)
  19. -
  20. -ipcalc_1 = custom_target(
  21. - 'ipcalc.1',
  22. - output : 'ipcalc.1',
  23. - input : 'ipcalc.1.md',
  24. - command : [ronn, '--pipe', '-r', '@INPUT@'],
  25. - capture: true,
  26. - install_dir: join_paths(get_option('mandir'), 'man1'),
  27. - install: true
  28. -)
  29. +ronn = find_program('ronn', required: false)
  30. +if ronn.found()
  31. + ipcalc_1 = custom_target(
  32. + 'ipcalc.1',
  33. + output : 'ipcalc.1',
  34. + input : 'ipcalc.1.md',
  35. + command : [ronn, '--pipe', '-r', '@INPUT@'],
  36. + capture: true,
  37. + install_dir: join_paths(get_option('mandir'), 'man1'),
  38. + install: true
  39. + )
  40. +endif
  41. subdir('tests')
  42. --
  43. 2.28.0