diff options
author | Taichi Haradaguchi <20001722@ymail.ne.jp> | 2022-11-21 23:39:38 +0900 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-01-29 22:01:30 +0100 |
commit | e9ac1d20cec882d01d143980e5f0f2efedf4f777 (patch) | |
tree | f8a22175bd00e89d02c7a7b71c8e841863f12e51 | |
parent | e7cfdaa369dfc9a4fe7dc9f9f0fa72358f5d6e21 (diff) |
gpgme: upgrade to release 1.18.0
Remove gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 as it has applied in 1.18.0.
* 0001-cpp-Fix-building-with-C-11.patch.1: fixed error "no matching function for call to object of type "(lambda at importresult.cpp:154:71)"".
* w32-include.patch: add missing #include <string> (for std::string).
* macos-include.patch: add missing #include <algorithm> (for std::any_of).
Change-Id: I45f2ef415d80e6ee848699803e971f154812c9c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143039
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 1c5c31b006f8515bfea440bbcf286f8b4b840aac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144270
23 files changed, 216 insertions, 213 deletions
diff --git a/download.lst b/download.lst index b4ef1eeebf8c..cd96bcd09506 100644 --- a/download.lst +++ b/download.lst @@ -100,8 +100,8 @@ export FREETYPE_SHA256SUM := ef5c336aacc1a079ff9262d6308d6c2a066dd4d2a905301c4ad export FREETYPE_TARBALL := freetype-2.12.0.tar.xz export GLM_SHA256SUM := c5e167c042afd2d7ad642ace6b643863baeb33880781983563e1ab68a30d3e95 export GLM_TARBALL := glm-0.9.9.7.zip -export GPGME_SHA256SUM := c4e30b227682374c23cddc7fdb9324a99694d907e79242a25a4deeedb393be46 -export GPGME_TARBALL := gpgme-1.13.1.tar.bz2 +export GPGME_SHA256SUM := 361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e +export GPGME_TARBALL := gpgme-1.18.0.tar.bz2 export GRAPHITE_SHA256SUM := b8e892d8627c41888ff121e921455b9e2d26836978f2359173d19825da62b8fc export GRAPHITE_TARBALL := graphite2-minimal-1.3.14.tgz export HARFBUZZ_SHA256SUM := 9cf7d117548265f95ca884e2f4c9fafaf4e17d45a67b11107147b79eed76c966 diff --git a/external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 b/external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 new file mode 100755 index 000000000000..c7b288d7240a --- /dev/null +++ b/external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 @@ -0,0 +1,72 @@ +From f02c20cc9c5756690b07abfd02a43533547ba2ef Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de> +Date: Fri, 19 Aug 2022 11:05:37 +0200 +Subject: [PATCH] cpp: Fix building with C++11 + +* lang/cpp/src/importresult.cpp (ImportResult::mergeWith): Replace +'auto' in lambdas with the actual type. +-- + +Generic lambdas require C++14. + +GnuPG-bug-id: 6141 +--- + lang/cpp/src/importresult.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lang/cpp/src/importresult.cpp b/lang/cpp/src/importresult.cpp +index 06258729..0a7ad03d 100644 +--- a/lang/cpp/src/importresult.cpp ++++ b/lang/cpp/src/importresult.cpp +@@ -152,17 +152,17 @@ void GpgME::ImportResult::mergeWith(const ImportResult &other) + } + // was this key also considered during the first import + const auto consideredInFirstImports = +- std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr); + }); + // did we see this key already in the list of keys of the other import + const auto consideredInPreviousOtherImports = +- std::any_of(std::begin(other.d->imports), it, [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), it, [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr); + }); + // was anything added to this key during the other import + const auto changedInOtherImports = +- std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status != 0); + }); + if (consideredInFirstImports && !consideredInPreviousOtherImports) { +@@ -177,15 +177,15 @@ void GpgME::ImportResult::mergeWith(const ImportResult &other) + + // now do the same for the secret key counts + const auto secretKeyConsideredInFirstImports = +- std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status & GPGME_IMPORT_SECRET); + }); + const auto secretKeyConsideredInPreviousOtherImports = +- std::any_of(std::begin(other.d->imports), it, [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), it, [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status & GPGME_IMPORT_SECRET); + }); + const auto secretKeyChangedInOtherImports = +- std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status & GPGME_IMPORT_SECRET) && (i->status != GPGME_IMPORT_SECRET); + }); + if (secretKeyConsideredInFirstImports && !secretKeyConsideredInPreviousOtherImports) { +@@ -204,7 +204,7 @@ void GpgME::ImportResult::mergeWith(const ImportResult &other) + d->imports.reserve(d->imports.size() + other.d->imports.size()); + std::transform(std::begin(other.d->imports), std::end(other.d->imports), + std::back_inserter(d->imports), +- [](const auto import) { ++ [](const gpgme_import_status_t import) { + gpgme_import_status_t copy = new _gpgme_import_status{*import}; + if (import->fpr) { + copy->fpr = strdup(import->fpr); +-- +2.34.1 + diff --git a/external/gpgmepp/ExternalPackage_gpgmepp.mk b/external/gpgmepp/ExternalPackage_gpgmepp.mk index 6bab3e5e293f..2b853087216b 100644 --- a/external/gpgmepp/ExternalPackage_gpgmepp.mk +++ b/external/gpgmepp/ExternalPackage_gpgmepp.mk @@ -15,8 +15,8 @@ ifneq ($(DISABLE_DYNLOADING),TRUE) ifeq ($(OS),LINUX) -$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgmepp.so.6,lang/cpp/src/.libs/libgpgmepp.so.6.10.0)) -$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgme.so.11,src/.libs/libgpgme.so.11.22.1)) +$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgmepp.so.6,lang/cpp/src/.libs/libgpgmepp.so.6.15.0)) +$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgme.so.11,src/.libs/libgpgme.so.11.27.0)) else ifeq ($(OS),MACOSX) diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk index 92348e426c80..a58717fe3adb 100644 --- a/external/gpgmepp/ExternalProject_gpgmepp.mk +++ b/external/gpgmepp/ExternalProject_gpgmepp.mk @@ -27,6 +27,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_ $(gb_WIN_GPG_cross_setup_exports) \ && autoreconf \ && $(gb_RUN_CONFIGURE) ./configure \ + $(gb_CONFIGURE_PLATFORMS) \ --disable-shared \ --disable-languages \ --disable-gpgconf-test \ @@ -35,9 +36,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_ --disable-g13-test \ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ CFLAGS='$(CFLAGS) \ - $(if $(ENABLE_OPTIMIZED), \ - $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ - $(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \ + $(call gb_ExternalProject_get_build_flags,gpgmepp)' \ $(gb_WIN_GPG_platform_switches) \ MAKE=$(MAKE) \ && $(MAKE) \ @@ -59,18 +58,14 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): LIBASSUAN_CFLAGS="$(LIBASSUAN_CFLAGS)" \ LIBASSUAN_LIBS="$(LIBASSUAN_LIBS)" \ CFLAGS='$(CFLAGS) \ - $(if $(ENABLE_OPTIMIZED), \ - $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ - $(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \ + $(call gb_ExternalProject_get_build_flags,gpgmepp)' \ CXXFLAGS='$(CXXFLAGS) \ - $(if $(ENABLE_OPTIMIZED), \ - $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ - $(if $(ENABLE_DBGUTIL),-D_GLIBCXX_DEBUG) \ - $(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \ + $(call gb_ExternalProject_get_build_flags,gpgmepp) \ + $(gb_COMPILERDEFS_STDLIB_DEBUG)' \ $(if $(filter LINUX,$(OS)), \ 'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \ -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN') \ - $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(gb_CONFIGURE_PLATFORMS) \ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ && $(MAKE) \ diff --git a/external/gpgmepp/Library_gpgmepp.mk b/external/gpgmepp/Library_gpgmepp.mk index f60301a4eb0d..ac71cf8b90ec 100644 --- a/external/gpgmepp/Library_gpgmepp.mk +++ b/external/gpgmepp/Library_gpgmepp.mk @@ -58,9 +58,11 @@ $(eval $(call gb_Library_add_generated_exception_objects,gpgmepp,\ UnpackedTarball/gpgmepp/lang/cpp/src/engineinfo \ UnpackedTarball/gpgmepp/lang/cpp/src/eventloopinteractor \ UnpackedTarball/gpgmepp/lang/cpp/src/exception \ + UnpackedTarball/gpgmepp/lang/cpp/src/gpgaddexistingsubkeyeditinteractor \ UnpackedTarball/gpgmepp/lang/cpp/src/gpgadduserideditinteractor \ UnpackedTarball/gpgmepp/lang/cpp/src/gpgagentgetinfoassuantransaction \ UnpackedTarball/gpgmepp/lang/cpp/src/gpggencardkeyinteractor \ + UnpackedTarball/gpgmepp/lang/cpp/src/gpgrevokekeyeditinteractor \ UnpackedTarball/gpgmepp/lang/cpp/src/gpgsetexpirytimeeditinteractor \ UnpackedTarball/gpgmepp/lang/cpp/src/gpgsetownertrusteditinteractor \ UnpackedTarball/gpgmepp/lang/cpp/src/gpgsignkeyeditinteractor \ @@ -73,6 +75,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,gpgmepp,\ UnpackedTarball/gpgmepp/lang/cpp/src/swdbresult \ UnpackedTarball/gpgmepp/lang/cpp/src/tofuinfo \ UnpackedTarball/gpgmepp/lang/cpp/src/trustitem \ + UnpackedTarball/gpgmepp/lang/cpp/src/util \ UnpackedTarball/gpgmepp/lang/cpp/src/verificationresult \ UnpackedTarball/gpgmepp/lang/cpp/src/vfsmountresult \ )) diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk index b314357734ab..be2b616d1268 100644 --- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk +++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk @@ -19,13 +19,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,gpgmepp,0)) $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \ external/gpgmepp/find-libgpg-error-libassuan.patch \ external/gpgmepp/fix-autoconf-macros.patch \ - external/gpgmepp/add-minimal-keyexport.patch \ $(if $(filter MSC,$(COM)),external/gpgmepp/w32-build-fixes.patch.1) \ $(if $(filter MSC,$(COM)),external/gpgmepp/w32-disable-docs.patch.1) \ $(if $(filter MSC,$(COM)),external/gpgmepp/w32-fix-win32-macro.patch.1) \ $(if $(filter MSC,$(COM)),external/gpgmepp/w32-fix-libtool.patch.1) \ $(if $(filter MSC,$(COM)),external/gpgmepp/w32-add-initializer.patch.1) \ - external/gpgmepp/gpgme.git-fe2892618c20cd40c342cce26ffb6ac4644fd3c3.patch.1 \ external/gpgmepp/w32-build-fixes-2.patch \ $(if $(filter LINUX,$(OS)),external/gpgmepp/asan.patch) \ $(if $(filter LINUX,$(OS)),external/gpgmepp/rpath.patch) \ @@ -34,6 +32,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \ external/gpgmepp/c++20.patch \ external/gpgmepp/clang-cl.patch \ external/gpgmepp/configure.patch \ - external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 \ + external/gpgmepp/w32-include.patch \ + external/gpgmepp/Wincompatible-function-pointer-types.patch \ + external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 \ + external/gpgmepp/macos-include.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/gpgmepp/Wincompatible-function-pointer-types.patch b/external/gpgmepp/Wincompatible-function-pointer-types.patch new file mode 100755 index 000000000000..050d2e55cfc7 --- /dev/null +++ b/external/gpgmepp/Wincompatible-function-pointer-types.patch @@ -0,0 +1,31 @@ +--- src/assuan-support.c ++++ src/assuan-support.c +@@ -126,7 +126,7 @@ + } + + +-static gpgme_ssize_t ++static ssize_t + my_read (assuan_context_t ctx, assuan_fd_t fd, void *buffer, size_t size) + { + (void)ctx; +@@ -134,7 +134,7 @@ + } + + +-static gpgme_ssize_t ++static ssize_t + my_write (assuan_context_t ctx, assuan_fd_t fd, const void *buffer, size_t size) + { + (void)ctx; +--- src/gpgme-w32spawn.c ++++ src/gpgme-w32spawn.c +@@ -243,7 +243,7 @@ + handle = LoadLibrary ("user32.dll"); + if (handle) + { +- func = GetProcAddress (handle, "AllowSetForegroundWindow"); ++ func = (BOOL (WINAPI *)(DWORD)) GetProcAddress (handle, "AllowSetForegroundWindow"); + if (!func) + FreeLibrary (handle); + } diff --git a/external/gpgmepp/add-minimal-keyexport.patch b/external/gpgmepp/add-minimal-keyexport.patch deleted file mode 100644 index d163ef814917..000000000000 --- a/external/gpgmepp/add-minimal-keyexport.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- lang/cpp/src/context.h.bak 2017-10-18 12:28:00.898945587 +0200 -+++ lang/cpp/src/context.h 2017-10-18 12:28:35.794832395 +0200 -@@ -178,10 +178,10 @@ - // Key Export - // - -- GpgME::Error exportPublicKeys(const char *pattern, Data &keyData); -- GpgME::Error exportPublicKeys(const char *pattern[], Data &keyData); -- GpgME::Error startPublicKeyExport(const char *pattern, Data &keyData); -- GpgME::Error startPublicKeyExport(const char *pattern[], Data &keyData); -+ GpgME::Error exportPublicKeys(const char *pattern, Data &keyData, bool minimal=false); -+ GpgME::Error exportPublicKeys(const char *pattern[], Data &keyData, bool minimal=false); -+ GpgME::Error startPublicKeyExport(const char *pattern, Data &keyData, bool minimal=false); -+ GpgME::Error startPublicKeyExport(const char *pattern[], Data &keyData, bool minimal=false); - - // - // Key Import ---- lang/cpp/src/context.cpp.bak 2017-10-18 12:27:50.830978224 +0200 -+++ lang/cpp/src/context.cpp 2017-10-18 12:30:13.278515603 +0200 -@@ -557,14 +557,14 @@ - } - } - --Error Context::exportPublicKeys(const char *pattern, Data &keyData) -+Error Context::exportPublicKeys(const char *pattern, Data &keyData, bool minimal) - { - d->lastop = Private::Export; - Data::Private *const dp = keyData.impl(); -- return Error(d->lasterr = gpgme_op_export(d->ctx, pattern, 0, dp ? dp->data : nullptr)); -+ return Error(d->lasterr = gpgme_op_export(d->ctx, pattern, minimal ? GPGME_EXPORT_MODE_MINIMAL : 0, dp ? dp->data : nullptr)); - } - --Error Context::exportPublicKeys(const char *patterns[], Data &keyData) -+Error Context::exportPublicKeys(const char *patterns[], Data &keyData, bool minimal) - { - d->lastop = Private::Export; - #ifndef HAVE_GPGME_EXT_KEYLIST_MODE_EXTERNAL_NONBROKEN -@@ -574,17 +574,17 @@ - } - #endif - Data::Private *const dp = keyData.impl(); -- return Error(d->lasterr = gpgme_op_export_ext(d->ctx, patterns, 0, dp ? dp->data : nullptr)); -+ return Error(d->lasterr = gpgme_op_export_ext(d->ctx, patterns, minimal ? GPGME_EXPORT_MODE_MINIMAL : 0, dp ? dp->data : nullptr)); - } - --Error Context::startPublicKeyExport(const char *pattern, Data &keyData) -+Error Context::startPublicKeyExport(const char *pattern, Data &keyData, bool minimal) - { - d->lastop = Private::Export; - Data::Private *const dp = keyData.impl(); -- return Error(d->lasterr = gpgme_op_export_start(d->ctx, pattern, 0, dp ? dp->data : nullptr)); -+ return Error(d->lasterr = gpgme_op_export_start(d->ctx, pattern, minimal ? GPGME_EXPORT_MODE_MINIMAL : 0, dp ? dp->data : nullptr)); - } - --Error Context::startPublicKeyExport(const char *patterns[], Data &keyData) -+Error Context::startPublicKeyExport(const char *patterns[], Data &keyData, bool minimal) - { - d->lastop = Private::Export; - #ifndef HAVE_GPGME_EXT_KEYLIST_MODE_EXTERNAL_NONBROKEN -@@ -594,7 +594,7 @@ - } - #endif - Data::Private *const dp = keyData.impl(); -- return Error(d->lasterr = gpgme_op_export_ext_start(d->ctx, patterns, 0, dp ? dp->data : nullptr)); -+ return Error(d->lasterr = gpgme_op_export_ext_start(d->ctx, patterns, minimal ? GPGME_EXPORT_MODE_MINIMAL : 0, dp ? dp->data : nullptr)); - } - - ImportResult Context::importKeys(const Data &data) diff --git a/external/gpgmepp/asan.patch b/external/gpgmepp/asan.patch index 16d97f6ff307..e0b1c85fe51b 100644 --- a/external/gpgmepp/asan.patch +++ b/external/gpgmepp/asan.patch @@ -1,6 +1,6 @@ --- src/posix-io.c +++ src/posix-io.c -@@ -468,6 +468,9 @@ +@@ -563,6 +563,9 @@ if (atfork) atfork (atforkvalue, 0); diff --git a/external/gpgmepp/configure.patch b/external/gpgmepp/configure.patch index 4b51db6bebad..ad3f97e632fb 100644 --- a/external/gpgmepp/configure.patch +++ b/external/gpgmepp/configure.patch @@ -1,6 +1,6 @@ --- configure.ac +++ configure.ac -@@ -619,6 +619,15 @@ +@@ -617,6 +617,15 @@ AC_SUBST(API__SSIZE_T) AM_SUBST_NOTMAKE(API__SSIZE_T) @@ -16,7 +16,7 @@ # Checks for compiler features. if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" -@@ -679,15 +679,6 @@ +@@ -677,15 +686,6 @@ AC_FUNC_FSEEKO diff --git a/external/gpgmepp/find-libgpg-error-libassuan.patch b/external/gpgmepp/find-libgpg-error-libassuan.patch index 699136cfb066..a98a7d845a34 100644 --- a/external/gpgmepp/find-libgpg-error-libassuan.patch +++ b/external/gpgmepp/find-libgpg-error-libassuan.patch @@ -2,7 +2,7 @@ diff --git a/configure.ac b/configure.ac index f28480b..92a3e85 100644 --- configure.ac +++ configure.ac -@@ -674,15 +674,34 @@ AC_CHECK_FUNCS(setlocale) +@@ -719,8 +719,18 @@ # Checking for libgpg-error. have_gpg_error=no @@ -23,6 +23,8 @@ index f28480b..92a3e85 100644 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME, [The default error source for GPGME.]) +@@ -729,8 +739,17 @@ + # And for libassuan. have_libassuan=no -AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION", @@ -40,35 +42,6 @@ index f28480b..92a3e85 100644 if test "$have_libassuan" = "yes"; then AC_DEFINE_UNQUOTED(GPGME_LIBASSUAN_VERSION, "$libassuan_version", [version of the libassuan library]) -diff --git a/src/Makefile.am b/src/Makefile.am -index ce6f1d4..6b1d835 100644 ---- src/Makefile.am -+++ src/Makefile.am -@@ -26,7 +26,7 @@ - m4data_DATA = gpgme.m4 - nodist_include_HEADERS = gpgme.h - --bin_PROGRAMS = gpgme-tool gpgme-json -+bin_PROGRAMS = gpgme-tool - - if BUILD_W32_GLIB - ltlib_gpgme_glib = libgpgme-glib.la -@@ -97,13 +97,10 @@ - - # We use a global CFLAGS setting for all libraries - # versions, because then every object file is only compiled once. --AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@ -+AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GPG_ERROR_CFLAGS@ @GLIB_CFLAGS@ - - gpgme_tool_SOURCES = gpgme-tool.c argparse.c argparse.h --gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@ -- --gpgme_json_SOURCES = gpgme-json.c cJSON.c cJSON.h --gpgme_json_LDADD = -lm libgpgme.la $(GPG_ERROR_LIBS) -+gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ - - - if HAVE_W32_SYSTEM --- lang/cpp/tests/Makefile.am 2020-06-20 00:43:49.213657887 +0200 +++ lang/cpp/tests/Makefile.am~ 2019-01-25 13:27:34.000000000 +0100 @@ -21,7 +21,7 @@ @@ -82,7 +55,7 @@ index ce6f1d4..6b1d835 100644 AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \ --- lang/cpp/tests/Makefile.in 2020-06-20 00:44:49.542344510 +0200 +++ lang/cpp/tests/Makefile.in~ 2020-06-13 00:55:19.021212970 +0200 -@@ -415,7 +415,7 @@ +@@ -427,7 +427,7 @@ top_srcdir = @top_srcdir@ AM_LDFLAGS = -no-install LDADD = ../../cpp/src/libgpgmepp.la \ diff --git a/external/gpgmepp/fix-autoconf-macros.patch b/external/gpgmepp/fix-autoconf-macros.patch index e333168b2b33..265703b00671 100644 --- a/external/gpgmepp/fix-autoconf-macros.patch +++ b/external/gpgmepp/fix-autoconf-macros.patch @@ -1,7 +1,7 @@ diff -ur gpgme.org/configure.ac gpgme/configure.ac --- configure.ac 2017-02-16 15:18:45.051417378 +0100 +++ configure.ac~ 2017-02-16 15:20:03.635059285 +0100 -@@ -35,6 +35,11 @@ +@@ -38,6 +38,11 @@ # the decimalized short revision number, a beta version string and a # flag indicating a development version (mym4_isbeta). Note that the # m4 processing is done by autoconf and not during the configure run. @@ -13,10 +13,10 @@ diff -ur gpgme.org/configure.ac gpgme/configure.ac m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \ mym4_package mym4_major mym4_minor mym4_micro),[:])) m4_define([mym4_isbeta], m4_argn(2, mym4_verslist)) -@@ -90,7 +90,22 @@ +@@ -98,7 +103,22 @@ AC_CONFIG_MACRO_DIR([m4]) - AC_CONFIG_SRCDIR(src/gpgme.h.in) - AC_CONFIG_HEADER(conf/config.h) + AC_CONFIG_SRCDIR([src/gpgme.h.in]) + AC_CONFIG_HEADERS([conf/config.h]) -AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip]) + +dnl Initialize automake. automake < 1.12 didn't have serial-tests and diff --git a/external/gpgmepp/gcc9.patch b/external/gpgmepp/gcc9.patch index c2a9fd444df7..709154ec102b 100644 --- a/external/gpgmepp/gcc9.patch +++ b/external/gpgmepp/gcc9.patch @@ -1,6 +1,6 @@ --- lang/cpp/src/key.h +++ lang/cpp/src/key.h -@@ -62,6 +62,7 @@ +@@ -68,6 +68,7 @@ /* implicit */ Key(const Null &); Key(const shared_gpgme_key_t &key); Key(gpgme_key_t key, bool acquireRef); diff --git a/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 deleted file mode 100644 index 8b12c1785ccf..000000000000 --- a/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 +++ /dev/null @@ -1,32 +0,0 @@ -From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001 -From: Jiri Kucera <sanczes@gmail.com> -Date: Sun, 25 Jul 2021 11:35:54 +0200 -Subject: [PATCH] core: Support closefrom also for glibc. - -* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom. --- - -Since 2.34, glibc introduces closefrom (the implementation -follows *BSD standard). - -Signed-off-by: Werner Koch <wk@gnupg.org> ---- - src/posix-io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/posix-io.c b/src/posix-io.c -index e712ef28..2a3a81fc 100644 ---- a/src/posix-io.c -+++ b/src/posix-io.c -@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, - if (fd_list[i].fd > fd) - fd = fd_list[i].fd; - fd++; --#if defined(__sun) || defined(__FreeBSD__) -+#if defined(__sun) || defined(__FreeBSD__) || defined(__GLIBC__) - closefrom (fd); - max_fds = fd; - #else /*!__sun */ --- -2.11.0 - diff --git a/external/gpgmepp/gpgme.git-fe2892618c20cd40c342cce26ffb6ac4644fd3c3.patch.1 b/external/gpgmepp/gpgme.git-fe2892618c20cd40c342cce26ffb6ac4644fd3c3.patch.1 deleted file mode 100644 index 1b5e22a7eccd..000000000000 --- a/external/gpgmepp/gpgme.git-fe2892618c20cd40c342cce26ffb6ac4644fd3c3.patch.1 +++ /dev/null @@ -1,30 +0,0 @@ -From fe2892618c20cd40c342cce26ffb6ac4644fd3c3 Mon Sep 17 00:00:00 2001 -From: Andre Heinecke <aheinecke@gnupg.org> -Date: Mon, 28 Oct 2019 16:00:29 +0100 -Subject: [PATCH 1/1] core,w32: Initialize dbg_help for socket debugging - -* src/w32-io.c (_gpgme_io_select): Initialize dbg_help. - --- -This fixes a crash on Windows because dbg_help might -be used unitialized. ---- - src/w32-io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/w32-io.c b/src/w32-io.c -index c5c21f59..80978f9a 100644 ---- a/src/w32-io.c -+++ b/src/w32-io.c -@@ -1643,7 +1643,7 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock) - int i; - int any; - int count; -- void *dbg_help; -+ void *dbg_help = NULL; - TRACE_BEG (DEBUG_SYSIO, "_gpgme_io_select", fds, - "nfds=%u, nonblock=%u", nfds, nonblock); - --- -2.11.0 - diff --git a/external/gpgmepp/macos-include.patch b/external/gpgmepp/macos-include.patch new file mode 100644 index 000000000000..93dd297c7368 --- /dev/null +++ b/external/gpgmepp/macos-include.patch @@ -0,0 +1,10 @@ +--- lang/cpp/src/importresult.cpp 2022-08-10 18:17:33.000000000 +0900 ++++ lang/cpp/src/importresult.cpp 2022-11-29 01:37:44.786604882 +0900 +@@ -31,6 +31,7 @@ + #include "result_p.h" + + #include <gpgme.h> ++#include <algorithm> + #include <cstdlib> + #include <cstring> + diff --git a/external/gpgmepp/rpath.patch b/external/gpgmepp/rpath.patch index e83dcf2762ef..6e6c46105b94 100644 --- a/external/gpgmepp/rpath.patch +++ b/external/gpgmepp/rpath.patch @@ -1,6 +1,6 @@ --- configure.ac +++ configure.ac -@@ -176,6 +176,9 @@ +@@ -187,6 +187,9 @@ LT_INIT([win32-dll disable-static]) LT_LANG([Windows Resource]) diff --git a/external/gpgmepp/ubsan.patch b/external/gpgmepp/ubsan.patch index 5a6e6dcdc9b2..2262291cd8b5 100644 --- a/external/gpgmepp/ubsan.patch +++ b/external/gpgmepp/ubsan.patch @@ -1,8 +1,8 @@ --- src/engine-gpg.c +++ src/engine-gpg.c -@@ -60,6 +60,15 @@ +@@ -61,6 +61,15 @@ building command line to this location. */ - char arg[1]; /* Used if data above is not used. */ + char arg[FLEXIBLE_ARRAY_MEMBER]; /* Used if data above is not used. */ }; +struct arg_without_data_s +{ @@ -16,8 +16,8 @@ struct fd_data_map_s -@@ -299,23 +308,24 @@ - a = malloc (sizeof *a - 1); +@@ -310,23 +319,24 @@ + a = malloc (offsetof (struct arg_and_data_s, arg)); if (!a) return gpg_error_from_syserror (); - a->next = NULL; diff --git a/external/gpgmepp/w32-build-fixes.patch.1 b/external/gpgmepp/w32-build-fixes.patch.1 index 9bc8f52b4c64..d6d8af601015 100644 --- a/external/gpgmepp/w32-build-fixes.patch.1 +++ b/external/gpgmepp/w32-build-fixes.patch.1 @@ -13,7 +13,7 @@ diff -ru gpgme.orig/m4/ax_cxx_compile_stdcxx.m4 gpgme/m4/ax_cxx_compile_stdcxx.m diff -ru gpgme.orig/src/dirinfo.c gpgme/src/dirinfo.c --- gpgme.orig/src/dirinfo.c 2017-03-21 11:09:41.000000000 +0100 +++ gpgme/src/dirinfo.c 2017-09-30 08:36:13.239279300 +0200 -@@ -33,6 +33,10 @@ +@@ -34,6 +34,10 @@ DEFINE_STATIC_LOCK (dirinfo_lock); @@ -27,7 +27,7 @@ diff -ru gpgme.orig/src/dirinfo.c gpgme/src/dirinfo.c diff -ru gpgme.orig/src/mbox-util.c gpgme/src/mbox-util.c --- gpgme.orig/src/mbox-util.c 2016-11-16 13:22:41.000000000 +0100 +++ gpgme/src/mbox-util.c 2017-09-30 08:18:29.270567500 +0200 -@@ -28,7 +28,9 @@ +@@ -29,7 +29,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -40,7 +40,7 @@ diff -ru gpgme.orig/src/mbox-util.c gpgme/src/mbox-util.c diff -ru gpgme.orig/src/priv-io.h gpgme/src/priv-io.h --- gpgme.orig/src/priv-io.h 2016-11-16 13:23:14.000000000 +0100 +++ gpgme/src/priv-io.h 2017-09-30 08:20:38.770562400 +0200 -@@ -36,6 +36,9 @@ +@@ -33,6 +33,9 @@ #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif @@ -53,7 +53,7 @@ diff -ru gpgme.orig/src/priv-io.h gpgme/src/priv-io.h diff -ru gpgme.orig/src/util.h gpgme/src/util.h --- gpgme.orig/src/util.h 2017-03-28 11:41:30.000000000 +0200 +++ gpgme/src/util.h 2017-09-30 08:10:54.194049100 +0200 -@@ -39,6 +39,9 @@ +@@ -35,6 +35,9 @@ #ifdef HAVE_UNISTD_H # include <unistd.h> #endif @@ -66,7 +66,7 @@ diff -ru gpgme.orig/src/util.h gpgme/src/util.h diff -ru gpgme.orig/src/w32-util.c gpgme/src/w32-util.c --- gpgme.orig/src/w32-util.c 2017-03-09 09:01:10.000000000 +0100 +++ gpgme/src/w32-util.c 2017-09-30 08:32:02.114330500 +0200 -@@ -721,7 +721,8 @@ +@@ -772,7 +772,8 @@ v /= 62; XXXXXX[5] = letters[v % 62]; @@ -79,16 +79,16 @@ diff -ru gpgme.orig/src/w32-util.c gpgme/src/w32-util.c diff -ru gpgme.orig/src/Makefile.am gpgme/src/Makefile.am --- gpgme.orig/src/Makefile.am 2017-09-30 11:50:07.456960000 +0200 +++ gpgme/src/Makefile.am 2017-09-30 11:51:29.609649400 +0200 -@@ -26,7 +26,7 @@ +@@ -35,7 +35,7 @@ m4data_DATA = gpgme.m4 nodist_include_HEADERS = gpgme.h --bin_PROGRAMS = gpgme-tool +-bin_PROGRAMS = gpgme-tool gpgme-json +bin_PROGRAMS = if BUILD_W32_GLIB ltlib_gpgme_glib = libgpgme-glib.la -@@ -99,8 +99,8 @@ +@@ -107,11 +107,11 @@ # versions, because then every object file is only compiled once. AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GPG_ERROR_CFLAGS@ @GLIB_CFLAGS@ @@ -97,9 +97,14 @@ diff -ru gpgme.orig/src/Makefile.am gpgme/src/Makefile.am +gpgme_tool_SOURCES = +gpgme_tool_LDADD = +-gpgme_json_SOURCES = gpgme-json.c cJSON.c cJSON.h +-gpgme_json_LDADD = -lm libgpgme.la $(GPG_ERROR_LIBS) ++gpgme_json_SOURCES = ++gpgme_json_LDADD = + if HAVE_W32_SYSTEM -@@ -120,7 +120,7 @@ +@@ -126,7 +126,7 @@ SUFFIXES = .rc .lo .rc.lo: diff --git a/external/gpgmepp/w32-disable-docs.patch.1 b/external/gpgmepp/w32-disable-docs.patch.1 index 2c307f502b63..1803ffa03cb5 100644 --- a/external/gpgmepp/w32-disable-docs.patch.1 +++ b/external/gpgmepp/w32-disable-docs.patch.1 @@ -4,7 +4,7 @@ like libgpg-error's --disable-doc diff -ur gpgmepp.org/Makefile.am gpgmepp/Makefile.am --- gpgmepp.org/Makefile.am 2016-11-16 13:20:18.000000000 +0100 +++ gpgmepp/Makefile.am 2017-11-20 15:34:49.086731000 +0100 -@@ -33,7 +33,7 @@ +@@ -45,7 +45,7 @@ tests = endif diff --git a/external/gpgmepp/w32-fix-libtool.patch.1 b/external/gpgmepp/w32-fix-libtool.patch.1 index 9a7adf713694..40893908b7f6 100644 --- a/external/gpgmepp/w32-fix-libtool.patch.1 +++ b/external/gpgmepp/w32-fix-libtool.patch.1 @@ -9,7 +9,7 @@ linking, by accepting cygwin path names, and correctly expanding diff -ur gpgmepp.org/m4/libtool.m4 gpgmepp/m4/libtool.m4 --- gpgmepp.org/m4/libtool.m4 2016-11-16 13:20:16.000000000 +0100 +++ gpgmepp/m4/libtool.m4 2017-11-21 22:00:05.006587800 +0100 -@@ -3209,24 +3209,11 @@ +@@ -3230,24 +3230,11 @@ ;; cygwin*) diff --git a/external/gpgmepp/w32-fix-win32-macro.patch.1 b/external/gpgmepp/w32-fix-win32-macro.patch.1 index 70a8b5ffe6e8..8ab7b0fab089 100644 --- a/external/gpgmepp/w32-fix-win32-macro.patch.1 +++ b/external/gpgmepp/w32-fix-win32-macro.patch.1 @@ -1,7 +1,7 @@ diff -ur gpgmepp.org/lang/cpp/src/callbacks.cpp gpgmepp/lang/cpp/src/callbacks.cpp --- gpgmepp.org/lang/cpp/src/callbacks.cpp 2016-10-18 19:22:02.000000000 +0200 +++ gpgmepp/lang/cpp/src/callbacks.cpp 2017-11-20 18:03:04.290060900 +0100 -@@ -38,7 +38,9 @@ +@@ -40,7 +40,9 @@ #include <cassert> #include <cerrno> #include <cstring> @@ -29,7 +29,7 @@ diff -ur gpgmepp.org/lang/cpp/src/data.h gpgmepp/lang/cpp/src/data.h diff -ur gpgmepp.org/lang/cpp/src/editinteractor.cpp gpgmepp/lang/cpp/src/editinteractor.cpp --- gpgmepp.org/lang/cpp/src/editinteractor.cpp 2017-03-09 09:01:10.000000000 +0100 +++ gpgmepp/lang/cpp/src/editinteractor.cpp 2017-11-20 18:09:33.022674700 +0100 -@@ -30,9 +30,11 @@ +@@ -33,9 +33,11 @@ #include <gpgme.h> @@ -46,7 +46,7 @@ diff -ur gpgmepp.org/lang/cpp/src/editinteractor.cpp gpgmepp/lang/cpp/src/editin diff -ur gpgmepp.org/lang/cpp/src/gpgmepp_export.h gpgmepp/lang/cpp/src/gpgmepp_export.h --- gpgmepp.org/lang/cpp/src/gpgmepp_export.h 2016-08-04 15:03:09.000000000 +0200 +++ gpgmepp/lang/cpp/src/gpgmepp_export.h 2017-11-20 16:57:47.805691100 +0100 -@@ -29,14 +29,14 @@ +@@ -30,14 +30,14 @@ # ifndef GPGMEPP_EXPORT # ifdef BUILDING_GPGMEPP /* We are building this library */ @@ -63,7 +63,7 @@ diff -ur gpgmepp.org/lang/cpp/src/gpgmepp_export.h gpgmepp/lang/cpp/src/gpgmepp_ # define GPGMEPP_EXPORT __declspec(dllimport) # else # define GPGMEPP_EXPORT __attribute__((visibility("default"))) -@@ -45,7 +45,7 @@ +@@ -46,7 +46,7 @@ # endif # ifndef GPGMEPP_NO_EXPORT @@ -72,7 +72,7 @@ diff -ur gpgmepp.org/lang/cpp/src/gpgmepp_export.h gpgmepp/lang/cpp/src/gpgmepp_ # define GPGMEPP_NO_EXPORT # else # define GPGMEPP_NO_EXPORT __attribute__((visibility("hidden"))) -@@ -54,7 +54,11 @@ +@@ -55,7 +55,11 @@ #endif #ifndef GPGMEPP_DEPRECATED @@ -88,7 +88,7 @@ diff -ur gpgmepp.org/lang/cpp/src/gpgmepp_export.h gpgmepp/lang/cpp/src/gpgmepp_ diff -ur gpgmepp.org/lang/cpp/src/interfaces/dataprovider.h gpgmepp/lang/cpp/src/interfaces/dataprovider.h --- gpgmepp.org/lang/cpp/src/interfaces/dataprovider.h 2016-05-17 14:32:37.000000000 +0200 +++ gpgmepp/lang/cpp/src/interfaces/dataprovider.h 2017-11-20 18:03:11.332715700 +0100 -@@ -29,6 +29,11 @@ +@@ -31,6 +31,11 @@ #include <gpg-error.h> @@ -103,13 +103,14 @@ diff -ur gpgmepp.org/lang/cpp/src/interfaces/dataprovider.h gpgmepp/lang/cpp/src diff -ur gpgmepp.org/lang/cpp/src/key.cpp gpgmepp/lang/cpp/src/key.cpp --- gpgmepp.org/lang/cpp/src/key.cpp 2017-03-20 20:10:15.000000000 +0100 +++ gpgmepp/lang/cpp/src/key.cpp 2017-11-20 17:44:50.321858800 +0100 -@@ -33,10 +33,16 @@ +@@ -34,11 +34,17 @@ #include <gpgme.h> #include <string.h> +#if HAVE_STRINGS_H #include <strings.h> +#endif + #include <cassert> #include <istream> #include <iterator> @@ -134,7 +135,7 @@ diff -ur gpgmepp.org/lang/cpp/src/key.h gpgmepp/lang/cpp/src/key.h diff -ur gpgmepp.org/lang/qt/src/qgpgme_export.h gpgmepp/lang/qt/src/qgpgme_export.h --- gpgmepp.org/lang/qt/src/qgpgme_export.h 2016-11-03 17:32:30.000000000 +0100 +++ gpgmepp/lang/qt/src/qgpgme_export.h 2017-11-20 16:58:27.395388000 +0100 -@@ -39,14 +39,14 @@ +@@ -40,14 +40,14 @@ # ifndef QGPGME_EXPORT # ifdef BUILDING_QGPGME /* We are building this library */ @@ -151,7 +152,7 @@ diff -ur gpgmepp.org/lang/qt/src/qgpgme_export.h gpgmepp/lang/qt/src/qgpgme_expo # define QGPGME_EXPORT __declspec(dllimport) # else # define QGPGME_EXPORT __attribute__((visibility("default"))) -@@ -55,7 +55,7 @@ +@@ -56,7 +56,7 @@ # endif # ifndef QGPGME_NO_EXPORT @@ -160,7 +161,7 @@ diff -ur gpgmepp.org/lang/qt/src/qgpgme_export.h gpgmepp/lang/qt/src/qgpgme_expo # define QGPGME_NO_EXPORT # else # define QGPGME_NO_EXPORT __attribute__((visibility("hidden"))) -@@ -64,7 +64,11 @@ +@@ -65,7 +65,11 @@ #endif #ifndef QGPGME_DEPRECATED diff --git a/external/gpgmepp/w32-include.patch b/external/gpgmepp/w32-include.patch new file mode 100644 index 000000000000..0fda72c2b072 --- /dev/null +++ b/external/gpgmepp/w32-include.patch @@ -0,0 +1,42 @@ +--- src/data-fd.c ++++ src/data-fd.c +@@ -28,6 +28,9 @@ + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif ++#if defined HAVE_W32_SYSTEM ++#include <io.h> ++#endif + + #include "debug.h" + #include "data.h" +--- src/gpgme-w32spawn.c ++++ src/gpgme-w32spawn.c +@@ -36,6 +36,7 @@ + # include <sys/stat.h> + #endif + #include <stdint.h> ++#include <io.h> + #include <process.h> + + #include "priv-io.h" +--- lang/cpp/src/gpgaddexistingsubkeyeditinteractor.h ++++ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.h +@@ -27,6 +27,7 @@ + #include "editinteractor.h" + + #include <memory> ++#include <string> + + namespace GpgME + { +--- lang/cpp/src/gpgrevokekeyeditinteractor.h ++++ lang/cpp/src/gpgrevokekeyeditinteractor.h +@@ -28,6 +28,7 @@ + #include "global.h" + + #include <memory> ++#include <string> + #include <vector> + + namespace GpgME |