diff --git a/Makefile.am b/Makefile.am
index 72ffa53e..45205444 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,93 +1,88 @@
# Makefile.am - Installer for GnuPG 4 Windows Makefile.
# Copyright (C) 2005, 2008, 2012 g10 Code GmbH
#
# This file is part of GPG4Win.
#
# GPG4Win is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# GPG4Win is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32
SUBDIRS = po packages doc src
# find patches -type f | sort | sed 's/$/ \\/' | sed 's/^/ /'
EXTRA_DIST = autogen.sh README.GIT ONEWS \
doc/license-page doc/GPLv3 \
build-aux/git-log-footer build-aux/git-log-fix \
patches/boost/boost-1-fixes.patch \
patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch \
patches/glib-2.41.5/01-socket.patch \
patches/glib-2.41.5/02-formatsec.patch \
patches/kconfigwidgets/0001-Make-QDbus-optional.patch \
patches/kiconthemes/0001-Make-DBus-optional.patch \
patches/kleopatra/0005-Hack-generated-conf-files-for-Crosscompiling.patch \
patches/kleopatra/fix-qt5.6-build.patch \
patches/kxmlgui/0001-make-qdbus-optional.patch \
patches/kxmlgui/0003-Make-KTextWidgets-optional.patch \
patches/kxmlgui/0004-Cruedly-disable-KSendbugmail.patch \
patches/libgpg-error-1.29/0001-doc-Fix-yat2m-build-for-cross-compilation.patch \
patches/qtbase/config-standardpaths.patch \
patches/qtbase/qtbase-mingw-fixes.patch \
patches/qtbase/relative-paths.patch \
patches/qttools/disable-most-tools.patch \
patches/qtwinextras/support-xp.patch \
patches/w32pth-2.0.5/workaround-broken-libtool.patch \
patches/breeze-icons/0001-Make-binary-icons-cross-compilable.patch \
- patches/gpgme-1.13.0/0001-core-w32-glib-Fix-build-of-w32-glib-io.c.patch \
- patches/gpgme-1.13.0/0001-core-Fix-assuan-logger-fd-hack-for-windows.patch \
- patches/gpgme-1.13.0/0002-core-w32-Fix-format-string-errors-on-windows.patch \
- patches/gpgol-2.3.3/0001-Replace-fancy-attribute-by-comment.patch \
- patches/gpgol-2.3.3/0001-Fix-content-type-detection-for-headerless-mails.patch \
- patches/gpgol-2.3.3/0001-Fix-crash-when-looking-at-messages-without-attachs.patch
+ patches/gpgol-2.4.0/0001-Revert-Only-use-IPM.Note.SMIME.MultipartSigned-for-S.patch
copy-news:
cp NEWS doc/website/NEWS.last
copy-release: gpg4win-$(VERSION).tar.bz2 installers/gpg4win-$(VERSION).exe \
installers/gpg4win-light-$(VERSION).exe \
installers/gpg4win-vanilla-$(VERSION).exe
@echo Copying $(VERSION) to $(RELEASEHOST) >&2
@set -e;\
if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \
test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\
then echo "This release has already been copied to the server" >&2 ;\
else scp gpg4win-$(VERSION).tar.bz2 \
installers/gpg4win-$(VERSION).exe \
installers/gpg4win-light-$(VERSION).exe \
installers/gpg4win-vanilla-$(VERSION).exe \
installers/gpg4win-src-$(VERSION).exe $(RELEASEHOST)/ ;\
for f in en de ; do \
scp src/README.$$f.txt \
$(RELEASEHOST)/README-$(VERSION).$$f.txt; \
done;\
fi
dist-hook: gen-ChangeLog
gen_start_date = 2012-03-26T00:00:00
.PHONY: gen-ChangeLog
gen-ChangeLog:
set -e; \
if test -d $(top_srcdir)/.git; then \
(cd $(top_srcdir) && \
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
--amend=build-aux/git-log-fix \
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
diff --git a/patches/gpgme-1.13.0/0001-core-Fix-assuan-logger-fd-hack-for-windows.patch b/patches/gpgme-1.13.0/0001-core-Fix-assuan-logger-fd-hack-for-windows.patch
deleted file mode 100755
index 6234cfbe..00000000
--- a/patches/gpgme-1.13.0/0001-core-Fix-assuan-logger-fd-hack-for-windows.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 19a4c4daa2cfd075b181d5131a4b8b4d54714b8c Mon Sep 17 00:00:00 2001
-From: Andre Heinecke
-Date: Wed, 27 Mar 2019 16:12:38 +0100
-Subject: [PATCH 1/2] core: Fix assuan logger-fd hack for windows
-
-* src/assuan-support.c (my_spawn): Zero is a perfectly fine fd.
----
- src/assuan-support.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/assuan-support.c b/src/assuan-support.c
-index 925aebaf..09db3295 100644
---- a/src/assuan-support.c
-+++ b/src/assuan-support.c
-@@ -234,7 +234,7 @@ my_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
- break;
- }
- logger_fd = strtol (argv[loc], &tail, 10);
-- if (tail == argv[loc] || logger_fd <= 0)
-+ if (tail == argv[loc] || logger_fd < 0)
- {
- err = GPG_ERR_INV_ARG;
- break;
---
-2.20.1
diff --git a/patches/gpgme-1.13.0/0001-core-w32-glib-Fix-build-of-w32-glib-io.c.patch b/patches/gpgme-1.13.0/0001-core-w32-glib-Fix-build-of-w32-glib-io.c.patch
deleted file mode 100755
index 153d0f3d..00000000
--- a/patches/gpgme-1.13.0/0001-core-w32-glib-Fix-build-of-w32-glib-io.c.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 213c4bc1eb1f45695cc3955cc722ebb363dcbdd0 Mon Sep 17 00:00:00 2001
-From: Andre Heinecke
-Date: Tue, 26 Mar 2019 19:22:44 +0100
-Subject: [PATCH] core,w32,glib: Fix build of w32-glib-io.c
-
-* src/w32-glib-io.c (_gpgme_io_pipe, _gpgme_io_connect): Do not
-use TRACE_SUC in a return statement.
----
- src/w32-glib-io.c | 17 ++++++++++-------
- 1 file changed, 10 insertions(+), 7 deletions(-)
-
-diff --git a/src/w32-glib-io.c b/src/w32-glib-io.c
-index 8c8722ce..e2e3b8ab 100644
---- a/src/w32-glib-io.c
-+++ b/src/w32-glib-io.c
-@@ -421,12 +421,13 @@ _gpgme_io_pipe (int filedes[2], int inherit_idx)
- return TRACE_SYSRES (-1);
- }
-
-- return TRACE_SUC ("read=0x%x/%p, write=0x%x/%p, channel=%p",
-- filedes[0],
-- (HANDLE) _get_osfhandle (giochannel_table[filedes[0]].fd),
-- filedes[1],
-- (HANDLE) _get_osfhandle (giochannel_table[filedes[1]].fd),
-- giochannel_table[1 - inherit_idx].chan);
-+ TRACE_SUC ("read=0x%x/%p, write=0x%x/%p, channel=%p",
-+ filedes[0],
-+ (HANDLE) _get_osfhandle (giochannel_table[filedes[0]].fd),
-+ filedes[1],
-+ (HANDLE) _get_osfhandle (giochannel_table[filedes[1]].fd),
-+ giochannel_table[1 - inherit_idx].chan);
-+ return 0;
- }
-
-
-@@ -1081,5 +1082,7 @@ _gpgme_io_connect (int fd, struct sockaddr *addr, int addrlen)
- return TRACE_SYSRES (-1);
- }
-
-- return TRACE_SUC ("");
-+ TRACE_SUC ("");
-+
-+ return 0;
- }
---
-2.20.1
diff --git a/patches/gpgme-1.13.0/0002-core-w32-Fix-format-string-errors-on-windows.patch b/patches/gpgme-1.13.0/0002-core-w32-Fix-format-string-errors-on-windows.patch
deleted file mode 100755
index 58a5e3fb..00000000
--- a/patches/gpgme-1.13.0/0002-core-w32-Fix-format-string-errors-on-windows.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 4a4680f8901ecdcb7e8d5ed55f48226ccfccd7c8 Mon Sep 17 00:00:00 2001
-From: Andre Heinecke
-Date: Wed, 27 Mar 2019 17:47:41 +0100
-Subject: [PATCH 2/2] core, w32: Fix format string errors on windows
-
-* src/debug.c (_gpgme_debug): Use gpgrt_vasprintf instead of
-vfprintf to have a more portable format.
-
---
-This fixes crashes on Windows because "%zu" is used which
-is not natively supported on Windows but which gpgrt supports.
----
- src/debug.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/debug.c b/src/debug.c
-index 81c2a90c..79e38ce1 100644
---- a/src/debug.c
-+++ b/src/debug.c
-@@ -255,6 +255,8 @@ _gpgme_debug (int level, int mode, const char *func, const char *tagname,
- va_list arg_ptr;
- int saved_errno;
- int need_lf;
-+ char *output;
-+ int out_len;
-
- if (debug_level < level)
- return 0;
-@@ -307,7 +309,12 @@ _gpgme_debug (int level, int mode, const char *func, const char *tagname,
- }
- need_lf = (mode != -1 && (!format || !*format));
-
-- vfprintf (errfp, format, arg_ptr);
-+ out_len = gpgrt_vasprintf (&output, format, arg_ptr);
-+ if (out_len >= 0)
-+ {
-+ fwrite (output, out_len, 1, errfp);
-+ free (output);
-+ }
- va_end (arg_ptr);
- if (need_lf || (format && *format && format[strlen (format) - 1] != '\n'))
- putc ('\n', errfp);
---
-2.20.1
diff --git a/patches/gpgol-2.3.3/0001-Fix-content-type-detection-for-headerless-mails.patch b/patches/gpgol-2.3.3/0001-Fix-content-type-detection-for-headerless-mails.patch
deleted file mode 100755
index b9a10cfa..00000000
--- a/patches/gpgol-2.3.3/0001-Fix-content-type-detection-for-headerless-mails.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 2426ff7d1a5d1387be67a694a8ef76aa4004f8c4 Mon Sep 17 00:00:00 2001
-From: Andre Heinecke
-Date: Wed, 27 Mar 2019 10:53:42 +0100
-Subject: [PATCH] Fix content-type detection for headerless mails
-
-* src/mapihelp.cpp (mapi_get_message_content_type):
-Check first attachment if mail has no headers.
-
---
-Yep that happens. I could reproduce it by looking at
-sent mails in a local data file. This is very likely
-the cause for:
-
-GnuPG-Bug-Id: T3935
----
- src/mapihelp.cpp | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
-index eaa8b0c..1b13076 100644
---- a/src/mapihelp.cpp
-+++ b/src/mapihelp.cpp
-@@ -3213,13 +3213,19 @@ mapi_get_message_content_type (LPMESSAGE message,
- if (r_smtype)
- *r_smtype = NULL;
-
-- const std::string hdrStr = mapi_get_header (message);
-+ std::string hdrStr = mapi_get_header (message);
- if (hdrStr.empty())
- {
-
-- log_error ("%s:%s: failed to get headers",
-+ log_debug ("%s:%s: failed to get headers. Looking at first attach",
- SRCNAME, __func__);
-- TRETURN NULL;
-+ hdrStr = mapi_get_first_attach_data (message);
-+ if (hdrStr.empty())
-+ {
-+ log_error ("%s:%s: failed to get headers. And attachment.",
-+ SRCNAME, __func__);
-+ TRETURN NULL;
-+ }
- }
-
- rfc822parse_t msg = parse_header_data (hdrStr, isWks);
---
-2.20.1
diff --git a/patches/gpgol-2.3.3/0001-Fix-crash-when-looking-at-messages-without-attachs.patch b/patches/gpgol-2.3.3/0001-Fix-crash-when-looking-at-messages-without-attachs.patch
deleted file mode 100755
index d8fda405..00000000
--- a/patches/gpgol-2.3.3/0001-Fix-crash-when-looking-at-messages-without-attachs.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 20a0f3aa1b347862e4000ecde116ea6c5eec98a9 Mon Sep 17 00:00:00 2001
-From: Andre Heinecke
-Date: Wed, 27 Mar 2019 12:53:10 +0100
-Subject: [PATCH] Fix crash when looking at messages without attachs
-
-* src/mapihelp.cpp (mapi_get_first_attach_data): Do not crash
-if message has no attachments.
----
- src/mapihelp.cpp | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
-index 1b13076..4a4d0e9 100644
---- a/src/mapihelp.cpp
-+++ b/src/mapihelp.cpp
-@@ -488,6 +488,12 @@ mapi_get_first_attach_data (LPMESSAGE message)
- }
-
- mapi_attach_item_t *table = mapi_create_attach_table (message, 0);
-+ if (!table)
-+ {
-+ log_debug ("%s:%s: Message has no attachments",
-+ SRCNAME, __func__);
-+ TRETURN ret;
-+ }
- if (table->end_of_table)
- {
- log_debug ("%s:%s: Message has no attachments",
---
-2.20.1
diff --git a/patches/gpgol-2.3.3/0001-Replace-fancy-attribute-by-comment.patch b/patches/gpgol-2.3.3/0001-Replace-fancy-attribute-by-comment.patch
deleted file mode 100755
index 748a4099..00000000
--- a/patches/gpgol-2.3.3/0001-Replace-fancy-attribute-by-comment.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 9a6c805be0c2552fb38026d8136a8ea7657e187d Mon Sep 17 00:00:00 2001
-From: Andre Heinecke
-Date: Tue, 26 Mar 2019 19:46:57 +0100
-Subject: [PATCH] Replace fancy attribute by comment
-
-* src/mailitem-events.cpp: Change attribute fallthrough to magic
-comment.
-
---
-This fixed build with older gcc versions....
----
- src/mailitem-events.cpp | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp
-index 5be58e7..c8e7125 100644
---- a/src/mailitem-events.cpp
-+++ b/src/mailitem-events.cpp
-@@ -761,11 +761,10 @@ EVENT_SINK_INVOKE(MailItemEvents)
- memdbg_dump ();
- TRETURN S_OK;
- }
-- /* Fallthrough */
- case ReplyAll:
- case Reply:
- is_reply = true;
-- __attribute__ ((fallthrough));
-+ /* fall through */
- case Forward:
- {
- log_oom ("%s:%s: %s : %p",
---
-2.20.1
diff --git a/patches/gpgol-2.4.0/0001-Revert-Only-use-IPM.Note.SMIME.MultipartSigned-for-S.patch b/patches/gpgol-2.4.0/0001-Revert-Only-use-IPM.Note.SMIME.MultipartSigned-for-S.patch
new file mode 100755
index 00000000..0ae3e57a
--- /dev/null
+++ b/patches/gpgol-2.4.0/0001-Revert-Only-use-IPM.Note.SMIME.MultipartSigned-for-S.patch
@@ -0,0 +1,35 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From e714c4c749eb4800c1b49386d543b7e224b8686b Mon Sep 17 00:00:00 2001
+From: Andre Heinecke
+Date: Tue, 4 Jun 2019 10:38:32 +0200
+Subject: [PATCH] Revert "Only use IPM.Note.SMIME.MultipartSigned for SMIME"
+
+This reverts commit 7323a82d1f8d548b85eb1c4cf7cd1e0c0224c246.
+---
+ src/mimemaker.cpp | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/src/mimemaker.cpp b/src/mimemaker.cpp
+index 91a8c30..06d1375 100644
+--- a/src/mimemaker.cpp
++++ b/src/mimemaker.cpp
+@@ -1235,12 +1235,9 @@ finalize_message (LPMESSAGE message, mapi_attach_item_t *att_table,
+ not immediately showing the GpgOL icon but gives other
+ clients that do not have GpgOL installed a better chance
+ to handle the mail. */
+- if (encrypt && /* exchange_major_version >= 15*/ 0)
++ if (encrypt && exchange_major_version >= 15)
+ {
+- (void) exchange_major_version;
+- /* This only appears to work with later exchange versions and
+- caused other Problems with incompatibilities. MultipartSigned
+- seemd to work better, even if it now has the wrong icon. */
++ /* This only appears to work with later exchange versions */
+ prop.Value.lpszA = xstrdup ("IPM.Note.SMIME");
+ }
+ else
+--
+2.20.1