diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-04-14 21:07:58 -0400 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-04-15 11:09:49 -0700 |
commit | f5bc0ab44aa66450957a1fb9546b50f8d986d263 (patch) | |
tree | c1006f7e8c75911a051912953c610e4a7dd4822f /mesonbuild/dependencies/misc.py | |
parent | 53a7403f10f7e286f305ee4e06b10ba4db756e48 (diff) | |
download | meson-f5bc0ab44aa66450957a1fb9546b50f8d986d263.zip meson-f5bc0ab44aa66450957a1fb9546b50f8d986d263.tar.gz meson-f5bc0ab44aa66450957a1fb9546b50f8d986d263.tar.bz2 |
fix gpgme support by preferring pkg-config where possible
Since gpgme 1.13.0, pkg-config files are available and this is the
preferred way to detect the dependency. Without this, projects that wish
to generate pkg-config files that Requires.private on gpgme, now have
their custom dependency() fallbacks overridden with an incorrect
configtool dependency.
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
-rw-r--r-- | mesonbuild/dependencies/misc.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): |