env2mfile: Generalize detection of pkg-config to have a list of tools

Cross-tools on Debian generally follow the naming convention set by
Autotools AC_CHECK_TOOL, where the name is prefixed with the GNU
architecture tuple for the host architecture. env2mfile was already
using this for pkg-config, but there are many other tools that can
be detected in the same way.

Signed-off-by: Simon McVittie <smcv@debian.org>
pull/13813/head
Simon McVittie 2 months ago committed by Jussi Pakkanen
parent 5402d38dbd
commit 7300e4ed88
  1. 11
      mesonbuild/scripts/env2mfile.py

@ -230,10 +230,13 @@ def dpkg_architecture_to_machine_info(output: str, options: T.Any) -> MachineInf
deb_detect_cmake(infos, data)
except ValueError:
pass
try:
infos.binaries['pkg-config'] = locate_path("%s-pkg-config" % host_arch)
except ValueError:
pass # pkg-config is optional
for tool in [
'pkg-config',
]:
try:
infos.binaries[tool] = locate_path("%s-%s" % (host_arch, tool))
except ValueError:
pass # optional
try:
infos.binaries['cups-config'] = locate_path("cups-config")
except ValueError:

Loading…
Cancel
Save