pkgconfig: Deprecate "pkgconfig" in favor of "pkg-config" in [binaries]

pull/12227/head
Xavier Claessens 1 year ago committed by Xavier Claessens
parent 0eae4e0936
commit 6a56f6d98f
  1. 2
      mesonbuild/dependencies/pkgconfig.py
  2. 6
      mesonbuild/envconfig.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:

@ -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

Loading…
Cancel
Save