* cleanup: drop gmime-2.4 support
This commit is contained in:
@ -20,18 +20,13 @@ include $(top_srcdir)/gtest.mk
|
||||
# before decending into tests/
|
||||
SUBDIRS= . tests
|
||||
|
||||
if BUILD_CRYPTO
|
||||
crypto=mu-msg-crypto.c
|
||||
else
|
||||
crypto=
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS=$(XAPIAN_CXXFLAGS) $(GMIME_CFLAGS) $(GLIB_CFLAGS) $(GUILE_CFLAGS)
|
||||
|
||||
# don't use -Werror, as it might break on other compilers
|
||||
# use -Wno-unused-parameters, because some callbacks may not
|
||||
# really need all the params they get
|
||||
AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement -pedantic -Wno-variadic-macros
|
||||
AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter \
|
||||
-Wdeclaration-after-statement -pedantic -Wno-variadic-macros
|
||||
AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter
|
||||
|
||||
noinst_LTLIBRARIES= \
|
||||
@ -54,7 +49,7 @@ libmu_la_SOURCES= \
|
||||
mu-log.h \
|
||||
mu-maildir.c \
|
||||
mu-maildir.h \
|
||||
${crypto} \
|
||||
mu-msg-crypto.c \
|
||||
mu-msg-doc.cc \
|
||||
mu-msg-doc.h \
|
||||
mu-msg-fields.c \
|
||||
|
||||
@ -777,7 +777,6 @@ foreach_cb (GMimeObject *parent, GMimeObject *part, ForeachData *fdata)
|
||||
/* invoke the callback function */
|
||||
fdata->user_func (parent, part, fdata->user_data);
|
||||
|
||||
#ifdef BUILD_CRYPTO
|
||||
/* maybe iterate over decrypted parts */
|
||||
if (fdata->decrypt &&
|
||||
GMIME_IS_MULTIPART_ENCRYPTED (part)) {
|
||||
@ -798,8 +797,6 @@ foreach_cb (GMimeObject *parent, GMimeObject *part, ForeachData *fdata)
|
||||
|
||||
g_object_unref (dec);
|
||||
}
|
||||
#endif /*BUILD_CRYPTO*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -311,16 +311,6 @@ static gboolean handle_mime_object (MuMsg *msg,
|
||||
unsigned index, MuMsgPartForeachFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
/* if mu is build without crypto support (i.e, gmime < 2.6), the crypto funcs
|
||||
* are no-ops
|
||||
*/
|
||||
#ifndef BUILD_CRYPTO
|
||||
|
||||
#define check_signature(A,B,C) (TRUE)
|
||||
#define handle_encrypted_part(A,B,C,D,E,F,G) (TRUE)
|
||||
|
||||
#else /* BUILD_CRYPTO */
|
||||
|
||||
#define SIG_STATUS_REPORT "sig-status-report"
|
||||
|
||||
/* call 'func' with information about this MIME-part */
|
||||
@ -412,7 +402,7 @@ handle_encrypted_part (MuMsg *msg,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif /*BUILD_CRYPTO */
|
||||
|
||||
|
||||
|
||||
/* call 'func' with information about this MIME-part */
|
||||
@ -442,14 +432,12 @@ handle_part (MuMsg *msg, GMimePart *part, GMimeObject *parent,
|
||||
msgpart.part_type |= MU_MSG_PART_TYPE_TEXT_HTML;
|
||||
}
|
||||
|
||||
#ifdef BUILD_CRYPTO
|
||||
/* put the verification info in the pgp-signature part */
|
||||
msgpart.sig_status_report = NULL;
|
||||
if (g_ascii_strcasecmp (msgpart.subtype, "pgp-signature") == 0)
|
||||
msgpart.sig_status_report =
|
||||
(MuMsgPartSigStatusReport*)
|
||||
g_object_get_data (G_OBJECT(parent), SIG_STATUS_REPORT);
|
||||
#endif /*BUILD_CRYPTO*/
|
||||
|
||||
msgpart.data = (gpointer)part;
|
||||
msgpart.index = index;
|
||||
|
||||
@ -92,7 +92,6 @@ void mu_mime_message_foreach (GMimeMessage *msg, gboolean decrypt,
|
||||
GMimeObjectForeachFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
#ifdef BUILD_CRYPTO
|
||||
/**
|
||||
* callback function to retrieve a password from the user
|
||||
*
|
||||
@ -136,7 +135,6 @@ GMimeObject* mu_msg_crypto_decrypt_part (GMimeMultipartEncrypted *enc, MuMsgOpti
|
||||
MuMsgPartPasswordFunc func, gpointer user_data,
|
||||
GError **err)
|
||||
G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
|
||||
#endif /*BUILD_CRYPTO*/
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
#include <mu-flags.h>
|
||||
#include <mu-msg-fields.h>
|
||||
#include <mu-msg-prio.h>
|
||||
/* #include <mu-msg-part.h> */
|
||||
#include <mu-util.h> /* for MuError and XapianDocument */
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -148,9 +148,6 @@ mu_util_error_quark (void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const char*
|
||||
mu_util_cache_dir (void)
|
||||
{
|
||||
@ -328,12 +325,6 @@ mu_util_supports (MuFeature feature)
|
||||
return FALSE;
|
||||
#endif /*BUILD_GUILE*/
|
||||
|
||||
/* check for crypto support */
|
||||
#ifndef BUILD_CRYPTO
|
||||
if (feature & MU_FEATURE_CRYPTO)
|
||||
return FALSE;
|
||||
#endif /*BUILD_CRYPTO*/
|
||||
|
||||
/* check for Gnuplot */
|
||||
if (feature & MU_FEATURE_GNUPLOT)
|
||||
if (!mu_util_program_in_path ("gnuplot"))
|
||||
|
||||
@ -201,7 +201,7 @@ test_mu_util_get_dtype_with_lstat (void)
|
||||
static void
|
||||
test_mu_util_supports (void)
|
||||
{
|
||||
gboolean has_guile, has_crypto;
|
||||
gboolean has_guile;
|
||||
gchar *path;
|
||||
|
||||
has_guile = FALSE;
|
||||
@ -209,14 +209,8 @@ test_mu_util_supports (void)
|
||||
has_guile = TRUE;
|
||||
#endif /*BUILD_GUILE*/
|
||||
|
||||
g_assert_cmpuint (mu_util_supports (MU_FEATURE_GUILE),==,has_guile);
|
||||
|
||||
has_crypto = FALSE;
|
||||
#ifdef BUILD_CRYPTO
|
||||
has_crypto = TRUE;
|
||||
#endif /*BUILD_CRYPTO*/
|
||||
|
||||
g_assert_cmpuint (mu_util_supports (MU_FEATURE_CRYPTO),==,has_crypto);
|
||||
g_assert_cmpuint (mu_util_supports (MU_FEATURE_GUILE), == ,has_guile);
|
||||
g_assert_cmpuint (mu_util_supports (MU_FEATURE_CRYPTO), == ,TRUE);
|
||||
|
||||
path = g_find_program_in_path ("gnuplot");
|
||||
g_free (path);
|
||||
@ -226,7 +220,7 @@ test_mu_util_supports (void)
|
||||
g_assert_cmpuint (
|
||||
mu_util_supports (MU_FEATURE_GNUPLOT|MU_FEATURE_GUILE|MU_FEATURE_CRYPTO),
|
||||
==,
|
||||
has_guile && has_crypto && path ? TRUE : FALSE);
|
||||
has_guile && path ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user