]> git.ipfire.org Git - thirdparty/git.git/commit
meson: work around broken system PCRE2 dependency in macOS
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Fri, 18 Jul 2025 17:02:25 +0000 (10:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Jul 2025 17:21:42 +0000 (10:21 -0700)
commit8c3add51a873616075baebed164eca4aa1069c51
tree03de3b0cc7d7f2e7efa3b47119b74bdac0914e67
parent16bd9f20a403117f2e0d9bcda6c6e621d3763e77
meson: work around broken system PCRE2 dependency in macOS

macOS provides a PCRE2 library in base that is not usable and not
configured properly, as it installs a pkgconf module that
points to a non-existent pcre2.h header in /usr/local/include.

Detect that case and if the feature is enabled, try to fallback
to a wrapped subproject through an anonymous dependency, aborting
with an error if that is not possible.

Change the feature to "auto" and print a warning and disable it
if a broken dependency was detected, but to keep consistency
with the cmake build system used on Windows, add a special rule
to re-enable the pcre2 feature by default there.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Suggested-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build
meson_options.txt