[PATCH 3/3] meson: enable auto-discovered "gitweb"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In 7d549fe317 (meson: skip gitweb build when Perl is disabled,
2024-12-20) we have started to conditionally enable "gitweb" based on
whether or not Perl is enabled. By accident though that change causes us
to not build gitweb in case its feature flag is set to "auto" even if
autoconfiguration determines that it could be built. This is because we
use "gitweb_option.enabled()", which only checks whether the feature has
been explicitly enabled.

Fix the issue by using `gitweb_option.allowed()` instead, which returns
true in case it is either explicitly enabled or set to "auto". This also
works for the case where the feature becomes auto-disabled due to Perl
not being present because we use `disable_auto_if(not perl.found())`.

Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 3e57793862e5fc15685b5f0fac7f7223af7bef1f..0064eb64f546a6349a8694ce251bd352febda6fe 100644
--- a/meson.build
+++ b/meson.build
@@ -1863,7 +1863,7 @@ subdir('contrib')
 # We make sure further up that Perl is required in case the gitweb option is
 # enabled.
 gitweb_option = get_option('gitweb').disable_auto_if(not perl.found())
-if gitweb_option.enabled()
+if gitweb_option.allowed()
   subdir('gitweb')
   build_options_config.set('NO_GITWEB', '')
 else
@@ -1916,7 +1916,7 @@ summary({
   'curl': curl.found(),
   'expat': expat.found(),
   'gettext': intl.found(),
-  'gitweb': gitweb_option.enabled(),
+  'gitweb': gitweb_option.allowed(),
   'https': https_backend,
   'iconv': iconv.found(),
   'pcre2': pcre2.found(),

-- 
2.48.0.rc0.311.gb6c66824c1.dirty





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux