]> git.ipfire.org Git - thirdparty/git.git/commit
meson: enable auto-discovered "gitweb"
authorPatrick Steinhardt <ps@pks.im>
Fri, 27 Dec 2024 12:10:19 +0000 (13:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Dec 2024 16:17:19 +0000 (08:17 -0800)
commitd963ac98ec94fd2003722a794f0168a70ea1b815
treef7c3930523621c493f6e5442a7a6f0593a2e9137
parentcbcc2f79117ded0161b012dc5107f181b5d87b09
meson: enable auto-discovered "gitweb"

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@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build