aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Dependencies.md2
-rw-r--r--docs/markdown/snippets/gpgme-config.md2
-rw-r--r--mesonbuild/dependencies/misc.py5
3 files changed, 6 insertions, 3 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md
index 2789ee0..50dbcf5 100644
--- a/docs/markdown/Dependencies.md
+++ b/docs/markdown/Dependencies.md
@@ -394,7 +394,7 @@ The `language` keyword may used.
*(added 0.51.0)*
-`method` may be `auto` or `config-tool`.
+`method` may be `auto`, `config-tool` or `pkg-config`.
## Python3
diff --git a/docs/markdown/snippets/gpgme-config.md b/docs/markdown/snippets/gpgme-config.md
index 08a7d38..65569fb 100644
--- a/docs/markdown/snippets/gpgme-config.md
+++ b/docs/markdown/snippets/gpgme-config.md
@@ -1,3 +1,3 @@
## gpgme dependency now supports gpgme-config
-Previously, we could only detect GPGME with custom invocations of `gpgme-config`. Now we added support to Meson allowing us to use `dependency('gpgme')` instead.
+Previously, we could only detect GPGME with custom invocations of `gpgme-config` or when the GPGME version was recent enough (>=1.13.0) to install pkg-config files. Now we added support to Meson allowing us to use `dependency('gpgme')` and fall back on `gpgme-config` parsing.
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 219b3d6..29149aa 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -680,6 +680,9 @@ class GpgmeDependency(ExternalDependency):
methods = cls._process_method_kw(kwargs)
candidates = []
+ if DependencyMethods.PKGCONFIG in methods:
+ candidates.append(functools.partial(PkgConfigDependency, 'gpgme', environment, kwargs))
+
if DependencyMethods.CONFIG_TOOL in methods:
candidates.append(functools.partial(ConfigToolDependency.factory,
'gpgme', environment, None, kwargs, ['gpgme-config'],
@@ -696,7 +699,7 @@ class GpgmeDependency(ExternalDependency):
@staticmethod
def get_methods():
- return [DependencyMethods.CONFIG_TOOL]
+ return [DependencyMethods.PKGCONFIG, DependencyMethods.CONFIG_TOOL]
class ShadercDependency(ExternalDependency):