diff options
| author | Simon McVittie <smcv@debian.org> | 2024-09-23 19:33:30 +0100 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-10-22 01:02:36 +0300 |
| commit | 7300e4ed88286ed4fd1f3bf9f2b6b29a1f8768c0 (patch) | |
| tree | ff7663e34d659edd43079f0579eaea9eb6c11beb /mesonbuild/scripts/env2mfile.py | |
| parent | 5402d38dbd65c36786b788725120a8e66bc42716 (diff) | |
| download | meson-7300e4ed88286ed4fd1f3bf9f2b6b29a1f8768c0.tar.gz | |
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>
Diffstat (limited to 'mesonbuild/scripts/env2mfile.py')
| -rwxr-xr-x | mesonbuild/scripts/env2mfile.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mesonbuild/scripts/env2mfile.py b/mesonbuild/scripts/env2mfile.py index b2c9a45b2..16ab1b980 100755 --- a/mesonbuild/scripts/env2mfile.py +++ b/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: |
