aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-08-18 12:58:18 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-09-18 13:51:27 -0400
commit6a56f6d98fb7806a59967b0df3ede26544eac4a4 (patch)
tree18e607e083bbc00ea341333a0b55e543e28986af /mesonbuild
parent0eae4e0936181b7f89d73fcb15d752cdf1bea05a (diff)
downloadmeson-6a56f6d98fb7806a59967b0df3ede26544eac4a4.zip
meson-6a56f6d98fb7806a59967b0df3ede26544eac4a4.tar.gz
meson-6a56f6d98fb7806a59967b0df3ede26544eac4a4.tar.bz2
pkgconfig: Deprecate "pkgconfig" in favor of "pkg-config" in [binaries]
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/dependencies/pkgconfig.py2
-rw-r--r--mesonbuild/envconfig.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py
index ab6896e..89442af 100644
--- a/mesonbuild/dependencies/pkgconfig.py
+++ b/mesonbuild/dependencies/pkgconfig.py
@@ -177,7 +177,7 @@ class PkgConfigCLI(PkgConfigInterface):
def _detect_pkgbin(self) -> None:
for potential_pkgbin in find_external_program(
- self.env, self.for_machine, 'pkgconfig', 'Pkg-config',
+ self.env, self.for_machine, 'pkg-config', 'Pkg-config',
self.env.default_pkgconfig, allow_default_for_cross=False):
version_if_ok = self._check_pkgconfig(potential_pkgbin)
if version_if_ok:
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index 5340521..c6b543a 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -133,7 +133,6 @@ ENV_VAR_TOOL_MAP: T.Mapping[str, str] = {
# Other tools
'cmake': 'CMAKE',
'qmake': 'QMAKE',
- 'pkgconfig': 'PKG_CONFIG',
'pkg-config': 'PKG_CONFIG',
'make': 'MAKE',
'vapigen': 'VAPIGEN',
@@ -403,6 +402,11 @@ class BinaryTable:
if not isinstance(command, (list, str)):
raise mesonlib.MesonException(
f'Invalid type {command!r} for entry {name!r} in cross file')
+ if name == 'pkgconfig':
+ if 'pkg-config' in binaries:
+ raise mesonlib.MesonException('Both pkgconfig and pkg-config entries in machine file.')
+ mlog.deprecation('"pkgconfig" entry is deprecated and should be replaced by "pkg-config"')
+ name = 'pkg-config'
self.binaries[name] = mesonlib.listify(command)
@staticmethod