Skip to content

Commit d963ac9

Browse files
pks-tgitster
authored andcommitted
meson: enable auto-discovered "gitweb"
In 7d549fe (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cbcc2f7 commit d963ac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,7 @@ subdir('contrib')
18631863
# We make sure further up that Perl is required in case the gitweb option is
18641864
# enabled.
18651865
gitweb_option = get_option('gitweb').disable_auto_if(not perl.found())
1866-
if gitweb_option.enabled()
1866+
if gitweb_option.allowed()
18671867
subdir('gitweb')
18681868
build_options_config.set('NO_GITWEB', '')
18691869
else
@@ -1916,7 +1916,7 @@ summary({
19161916
'curl': curl.found(),
19171917
'expat': expat.found(),
19181918
'gettext': intl.found(),
1919-
'gitweb': gitweb_option.enabled(),
1919+
'gitweb': gitweb_option.allowed(),
19201920
'https': https_backend,
19211921
'iconv': iconv.found(),
19221922
'pcre2': pcre2.found(),

0 commit comments

Comments
 (0)