[seahorse/wip/nielsdg/fix-check-compatible-gpg] build: Fix build with check-compatible-gpg=false



commit 0b94574b9feb72f9c21e0adab37295ae0176f0ae
Author: Niels De Graef <niels degraef barco com>
Date:   Fri Mar 15 17:08:51 2019 +0100

    build: Fix build with check-compatible-gpg=false
    
    Before this commit, we only checked the GPG (and GPGME) versions when
    the option `check-compatible-gpg` was set. However, if the user wants to
    bypass that check (by setting the option to false), we still need to
    have the version printed back to us, since we use it later on to set
    some variables, like `GPG_MAJOR` etc.
    
    Fixes https://gitlab.gnome.org/GNOME/seahorse/issues/217

 meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 1ebd44c5..ccd25d1f 100644
--- a/meson.build
+++ b/meson.build
@@ -55,18 +55,18 @@ gpg_bin = find_program('gpg2', 'gpg', required: with_pgp)
 gpgme = cc.find_library('gpgme', required: with_pgp)
 gpgme_config = find_program('gpgme-config', required: with_pgp)
 
-if check_compatible_gpg
+if with_pgp
   gpg_version_check = run_command([gpg_check_version, gpg_bin.path(), 'false', accepted_gpg_versions ])
   gpg_version = gpg_version_check.stdout()
   message('GnuPG Version: @0@'.format(gpg_version))
-  if gpg_version_check.returncode() != 0
+  if check_compatible_gpg and gpg_version_check.returncode() != 0
     error('Incompatible version of GnuPG. Accepted versions are: @0@'.format(accepted_gpg_versions))
   endif
 
   gpgme_version_check = run_command([gpg_check_version, gpgme_config.path(), 'true', min_gpgme_version ])
   gpgme_version = gpgme_version_check.stdout()
   message('GPGME version: @0@'.format(gpgme_version))
-  if gpgme_version_check.returncode() != 0
+  if check_compatible_gpg and gpgme_version_check.returncode() != 0
     error('Incompatible version of GPGME. Minimal version required is @0@'.format(min_gpgme_version))
   endif
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]