diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-10 17:32:00 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-10 20:48:42 -0400 |
commit | 88d964628878a1c0b10ad4b565f9a41c012ee856 (patch) | |
tree | 26583b3384fdce678d69c8cedd1dff84c4ded381 /mesonbuild/dependencies/pkgconfig.py | |
parent | dfa19af0ae346bb24d0e20ab7d9e22f4cded6f3b (diff) | |
download | meson-88d964628878a1c0b10ad4b565f9a41c012ee856.zip meson-88d964628878a1c0b10ad4b565f9a41c012ee856.tar.gz meson-88d964628878a1c0b10ad4b565f9a41c012ee856.tar.bz2 |
pkg-config: do not ever successfully detect Strawberry Perl.
This is broken and terrible and thus completely unusable. Don't torture
users by finding pkg-config on Windows, thus permitting the pkg-config
lookup of several dependencies that do not actually work -- which then
fails at build time.
This also breaks CI for the wrapdb, because Strawberry Perl is provided
as part of the base image for the OS (yes, even though it is terribly
broken!!!) and anything that depends on e.g. zlib will "find" zlib
because of this broken disaster, even though it should use the wrapdb
subproject of zlib.
It is assumed no one actually wants to mix Strawberry Perl and meson. In
fact, some projects, such as gst-build, already unconditionally error
out if Strawberry Perl is detected in PATH:
error('You have Strawberry Perl in PATH which is known to cause build issues with gst-build. Please remove it from PATH or uninstall it.')
Other projects (postgresql) actually do want to build perl extensions,
and link to the perl dlls, but absolutely under no circumstances ever
want to use its pkg-config implementation. ;)
Let's solve this problem by just considering this to not be a valid
pkg-config, let the user find another or not have one at all.
This change "solves"
https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11
Diffstat (limited to 'mesonbuild/dependencies/pkgconfig.py')
-rw-r--r-- | mesonbuild/dependencies/pkgconfig.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index da1d72f..26a77e3 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -425,6 +425,10 @@ class PkgConfigDependency(ExternalDependency): return None command_as_string = ' '.join(pkgbin.get_command()) try: + helptext = Popen_safe(pkgbin.get_command() + ['--help'])[1] + if 'Pure-Perl' in helptext: + mlog.log(f'found pkg-config {command_as_string!r} but it is Strawberry Perl and thus broken. Ignoring...') + return None p, out = Popen_safe(pkgbin.get_command() + ['--version'])[0:2] if p.returncode != 0: mlog.warning(f'Found pkg-config {command_as_string!r} but it failed when run') |