[Commits] [SCM] claws branch, master, updated. 4.1.0-74-gf5080c0fc

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Oct 16 00:44:11 UTC 2022


The branch, master has been updated
       via  f5080c0fc50ee031c547153268b61d9ff433ab41 (commit)
      from  b2b89f91d14df834f57369122c5d5978d8622a07 (commit)

Summary of changes:
 claws-features.h.in             |  1 -
 configure.ac                    | 16 +++++++++++++---
 src/plugins/pgpcore/Makefile.am |  1 +
 src/plugins/pgpcore/sgpgme.c    | 29 ++++++++++++++---------------
 src/plugins/smime/Makefile.am   |  1 +
 5 files changed, 29 insertions(+), 19 deletions(-)


- Log -----------------------------------------------------------------
commit f5080c0fc50ee031c547153268b61d9ff433ab41
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Oct 8 23:28:13 2022 -0700

    Add pkgconfig support for gpgme and libgpg-error

diff --git a/claws-features.h.in b/claws-features.h.in
index 65d71e6f3..f11e445ed 100644
--- a/claws-features.h.in
+++ b/claws-features.h.in
@@ -1,6 +1,5 @@
 #undef HAVE_DBUS_GLIB
 #undef HAVE_DIRENT_D_TYPE
-#undef HAVE_GPGME_PKA_TRUST
 #undef HAVE_LIBCOMPFACE
 #undef HAVE_LIBETPAN
 #undef HAVE_LIBSM
diff --git a/configure.ac b/configure.ac
index c32c79a69..1ab1883e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1355,10 +1355,20 @@ if test x"$HAVE_PERL" = xyes; then
 fi
 
 dnl Gpgme **********************************************************************
-AM_PATH_GPGME(1.0.0, HAVE_GPGME=yes, HAVE_GPGME=no)
-if test x"$HAVE_GPGME" = xyes; then
+dnl First try to find gpgme with gpgme-config.  Use pkgconfig if not found
+AM_PATH_GPGME(1.1.1, HAVE_GPGME_CONFIG=yes, HAVE_GPGME_CONFIG=no)
+if test x"$HAVE_GPGME_CONFIG" = xno; then
+	PKG_CHECK_MODULES(GPGME, [gpgme >= 1.1.1], HAVE_GPGME_PKGCONFIG=yes, HAVE_GPGME_PKGCONFIG=no)
+	if test x"$HAVE_GPGME_PKGCONFIG" = xyes; then
+		PKG_CHECK_MODULES(LIBGPG_ERROR, [gpg-error])
+	fi
+fi
+
+if test x"$HAVE_GPGME_CONFIG" = xyes -o x"$HAVE_GPGME_PKGCONFIG" = xyes; then
 	AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.)
-	AM_PATH_GPGME(1.1.1, AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1, [Define if GPGME supports PKA.]))
+	HAVE_GPGME=yes
+else
+	HAVE_GPGME=no
 fi
 
 dnl Python *********************************************************************
diff --git a/src/plugins/pgpcore/Makefile.am b/src/plugins/pgpcore/Makefile.am
index 897a32b1f..1db559d29 100644
--- a/src/plugins/pgpcore/Makefile.am
+++ b/src/plugins/pgpcore/Makefile.am
@@ -27,6 +27,7 @@ EXTRA_pgpcore_la_DEPENDENCIES = $(plugin_extra_deps)
 pgpcore_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS) \
 	$(GPGME_LIBS) \
+	$(LIBGPG_ERROR_LIBS) \
 	$(ENCHANT_LIBS)
 
 pgpcore_la_CPPFLAGS = \
diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c
index 4b3a978e2..a9d7cf1bf 100644
--- a/src/plugins/pgpcore/sgpgme.c
+++ b/src/plugins/pgpcore/sgpgme.c
@@ -613,21 +613,20 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status)
 				g_string_append_c(siginfo, (gchar)*primary_fpr);
 			}
 			g_string_append_c(siginfo, '\n');
-#ifdef HAVE_GPGME_PKA_TRUST
-                        if (sig->pka_trust == 1 && sig->pka_address) {
-                                g_string_append_printf(siginfo,
-                                   _("WARNING: Signer's address \"%s\" "
-                                      "does not match DNS entry\n"), 
-                                   sig->pka_address);
-                        }
-                        else if (sig->pka_trust == 2 && sig->pka_address) {
-                                g_string_append_printf(siginfo,
-                                   _("Verified signer's address is \"%s\"\n"),
-                                   sig->pka_address);
-                                /* FIXME: Compare the address to the
-                                 * From: address.  */
-                        }
-#endif /*HAVE_GPGME_PKA_TRUST*/
+
+			if (sig->pka_trust == 1 && sig->pka_address) {
+				g_string_append_printf(siginfo,
+					_("WARNING: Signer's address \"%s\" "
+					"does not match DNS entry\n"),
+					sig->pka_address);
+			}
+			else if (sig->pka_trust == 2 && sig->pka_address) {
+				g_string_append_printf(siginfo,
+					_("Verified signer's address is \"%s\"\n"),
+						sig->pka_address);
+						/* FIXME: Compare the address to the
+						 * From: address.  */
+			}
 		}
 
 		g_string_append(siginfo, "\n");
diff --git a/src/plugins/smime/Makefile.am b/src/plugins/smime/Makefile.am
index 05c1ea8b0..364080caf 100644
--- a/src/plugins/smime/Makefile.am
+++ b/src/plugins/smime/Makefile.am
@@ -32,6 +32,7 @@ EXTRA_smime_la_DEPENDENCIES = $(plugin_extra_deps)
 smime_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS)  \
 	$(GPGME_LIBS) \
+	$(LIBGPG_ERROR_LIBS) \
 	$(ENCHANT_LIBS)
 
 smime_la_CPPFLAGS = \

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list