]> git.ipfire.org Git - thirdparty/git.git/commit
meson: skip gitweb build when Perl is disabled
authorPatrick Steinhardt <ps@pks.im>
Fri, 20 Dec 2024 16:30:35 +0000 (17:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Dec 2024 16:39:20 +0000 (08:39 -0800)
commit7d549fe317f8c4eea25f5212bc9f8e73b4b2608e
tree3d3e265f09901f880fd41295d12f9a1b9a169efe
parent904339edbd80ec5676616af6e072b41804c1c8eb
meson: skip gitweb build when Perl is disabled

It is possible to configure a Git build without Perl when disabling both
our test suite and all Perl-based features. In Meson, this can be
achieved with `meson setup -Dperl=disabled -Dtests=false`.

It was reported by a user that this breaks the Meson build because
gitweb gets built even if Perl was not discovered in such a build:

    $ meson setup .. -Dtests=false -Dperl=disabled
    ...
    ../gitweb/meson.build:2:43: ERROR: Unable to get the path of a not-found external program

Fix this issue by introducing a new feature-option that allows the user
to configure whether or not to build Gitweb. The feature is set to
'auto' by default and will be disabled automatically in case Perl was
not found on the system.

Reported-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build
meson_options.txt