aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/misc.py
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-04-03 18:34:47 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-04-06 22:35:10 +0300
commite8a688428de096ba9cc7e82614a68aebe855dabf (patch)
tree5708273e7bd8bfe0f2fca0ef9861d4fe6daa1ddc /mesonbuild/dependencies/misc.py
parentd6be7822a0a7391c9d2a22c053cd4fc61b5a71e4 (diff)
downloadmeson-e8a688428de096ba9cc7e82614a68aebe855dabf.zip
meson-e8a688428de096ba9cc7e82614a68aebe855dabf.tar.gz
meson-e8a688428de096ba9cc7e82614a68aebe855dabf.tar.bz2
Add gpgme-config support
GPGME does not support pkg-config so we need config-tool support if we do not want projects like Almanah and Seahorse to parse the values manually.
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
-rw-r--r--mesonbuild/dependencies/misc.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 38c34a8..f4694ca 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -672,6 +672,34 @@ class LibGCryptDependency(ExternalDependency):
return [DependencyMethods.PKGCONFIG, DependencyMethods.CONFIG_TOOL]
+class GpgmeDependency(ExternalDependency):
+ def __init__(self, environment, kwargs):
+ super().__init__('gpgme', environment, None, kwargs)
+
+ @classmethod
+ def _factory(cls, environment, kwargs):
+ methods = cls._process_method_kw(kwargs)
+ candidates = []
+
+ if DependencyMethods.CONFIG_TOOL in methods:
+ candidates.append(functools.partial(ConfigToolDependency.factory,
+ 'gpgme', environment, None, kwargs, ['gpgme-config'],
+ 'gpgme-config',
+ GpgmeDependency.tool_finish_init))
+
+ return candidates
+
+ @staticmethod
+ def tool_finish_init(ctdep):
+ ctdep.compile_args = ctdep.get_config_value(['--cflags'], 'compile_args')
+ ctdep.link_args = ctdep.get_config_value(['--libs'], 'link_args')
+ ctdep.version = ctdep.get_config_value(['--version'], 'version')[0]
+
+ @staticmethod
+ def get_methods():
+ return [DependencyMethods.CONFIG_TOOL]
+
+
class ShadercDependency(ExternalDependency):
def __init__(self, environment, kwargs):