0001-meson-do-not-automatically-build-documentation-if-sp.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 1e4db1f9792e4343231a1cf36aa553404a534828 Mon Sep 17 00:00:00 2001
  2. From: Quentin Schulz <quentin.schulz@cherry.de>
  3. Date: Fri, 4 Apr 2025 18:01:33 +0200
  4. Subject: [PATCH] meson: do not automatically build documentation if
  5. sphinx-build-3 is found
  6. Commit aba567338b25 ("Documentation: Move all dependencies into
  7. features") did an incomplete migration of the documentation boolean
  8. option into a documentation feature.
  9. If sphinx-build-3 binary is found on the host system, the documentation
  10. is built, regardless of the value of the feature option.
  11. This makes sure that sphinx-build-3 presence is only checked if the
  12. documentation feature is not disabled (which is the default, as it's
  13. "auto" by default).
  14. This is essential for reproducibility for build systems where
  15. sphinx-build-3 may or may not be present when libcamera is built, and
  16. also to declutter the generated package if documentation isn't desired.
  17. Fixes: aba567338b25 ("Documentation: Move all dependencies into features")
  18. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
  19. Upstream: https://lists.libcamera.org/pipermail/libcamera-devel/2025-April/049705.html
  20. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
  21. ---
  22. Documentation/meson.build | 2 +-
  23. 1 file changed, 1 insertion(+), 1 deletion(-)
  24. diff --git a/Documentation/meson.build b/Documentation/meson.build
  25. index 6158320e..c59849f6 100644
  26. --- a/Documentation/meson.build
  27. +++ b/Documentation/meson.build
  28. @@ -116,7 +116,7 @@ endif
  29. # Sphinx
  30. #
  31. -sphinx = find_program('sphinx-build-3', required : false)
  32. +sphinx = find_program('sphinx-build-3', required : get_option('documentation'))
  33. if not sphinx.found()
  34. sphinx = find_program('sphinx-build', required : get_option('documentation'))
  35. endif