2
1

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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From ae2b6cb3cac6a38a6c96625915cea4b9cf3fc180 Mon Sep 17 00:00:00 2001
  2. From: Quentin Schulz <quentin.schulz@cherry.de>
  3. Date: Fri, 4 Apr 2025 18:12:35 +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. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  20. Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
  21. Tested-by: Quentin Schulz <quentin.schulz@cherry.de>
  22. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
  23. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  24. Upstream: https://git.libcamera.org/libcamera/libcamera.git/commit/?id=ae2b6cb3cac6a38a6c96625915cea4b9cf3fc180
  25. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
  26. ---
  27. Documentation/meson.build | 6 ++----
  28. 1 file changed, 2 insertions(+), 4 deletions(-)
  29. diff --git a/Documentation/meson.build b/Documentation/meson.build
  30. index 6158320e..0fc5909d 100644
  31. --- a/Documentation/meson.build
  32. +++ b/Documentation/meson.build
  33. @@ -116,10 +116,8 @@ endif
  34. # Sphinx
  35. #
  36. -sphinx = find_program('sphinx-build-3', required : false)
  37. -if not sphinx.found()
  38. - sphinx = find_program('sphinx-build', required : get_option('documentation'))
  39. -endif
  40. +sphinx = find_program('sphinx-build-3', 'sphinx-build',
  41. + required : get_option('documentation'))
  42. if sphinx.found()
  43. docs_sources = [