download.lst | 4 external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 | 72 --------------- external/gpgmepp/ExternalPackage_gpgmepp.mk | 4 external/gpgmepp/UnpackedTarball_gpgmepp.mk | 3 external/gpgmepp/gcc9.patch | 10 -- external/gpgmepp/macos-include.patch | 10 -- external/gpgmepp/ubsan.patch | 12 -- external/gpgmepp/w32-build-fixes.patch.1 | 24 ++--- 8 files changed, 20 insertions(+), 119 deletions(-)
New commits: commit 97c67afac1ec9351d0a64011a7ddfb7dfa876484 Author: Taichi Haradaguchi <[email protected]> AuthorDate: Sat Jun 24 09:49:59 2023 +0900 Commit: Taichi Haradaguchi <[email protected]> CommitDate: Mon Jun 26 16:53:40 2023 +0200 Update gpgme to 1.20.0 * remove external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 and external/gpgmepp/gcc9.patch that were applied upstream. * remove unneccesary external/gpgmepp/macos-include.patch. * remove a bit of external/gpgmepp/w32-build-fixes.patch.1 that was applied upstream. Change-Id: I9982a3a47e62a5e06e3c04ddc3ee3f247eefa8ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153544 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <[email protected]> diff --git a/download.lst b/download.lst index 0ca3d6dfa325..fce7592c6370 100644 --- a/download.lst +++ b/download.lst @@ -212,8 +212,8 @@ GLM_TARBALL := glm-0.9.9.8.zip # three static lines # so that git cherry-pick # will not run into conflicts -GPGME_SHA256SUM := 361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e -GPGME_TARBALL := gpgme-1.18.0.tar.bz2 +GPGME_SHA256SUM := 25a5785a5da356689001440926b94e967d02e13c49eb7743e35ef0cf22e42750 +GPGME_TARBALL := gpgme-1.20.0.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts 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 deleted file mode 100755 index c7b288d7240a..000000000000 --- a/external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 +++ /dev/null @@ -1,72 +0,0 @@ -From f02c20cc9c5756690b07abfd02a43533547ba2ef Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <[email protected]> -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 2b853087216b..ef49c398d215 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.15.0)) -$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgme.so.11,src/.libs/libgpgme.so.11.27.0)) +$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgmepp.so.6,lang/cpp/src/.libs/libgpgmepp.so.6.17.0)) +$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgme.so.11,src/.libs/libgpgme.so.11.29.0)) else ifeq ($(OS),MACOSX) diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk index be2b616d1268..d1b8dfae32eb 100644 --- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk +++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk @@ -27,14 +27,11 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \ external/gpgmepp/w32-build-fixes-2.patch \ $(if $(filter LINUX,$(OS)),external/gpgmepp/asan.patch) \ $(if $(filter LINUX,$(OS)),external/gpgmepp/rpath.patch) \ - external/gpgmepp/gcc9.patch \ external/gpgmepp/ubsan.patch \ external/gpgmepp/c++20.patch \ external/gpgmepp/clang-cl.patch \ external/gpgmepp/configure.patch \ 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/gcc9.patch b/external/gpgmepp/gcc9.patch deleted file mode 100644 index 709154ec102b..000000000000 --- a/external/gpgmepp/gcc9.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- lang/cpp/src/key.h -+++ lang/cpp/src/key.h -@@ -68,6 +68,7 @@ - /* implicit */ Key(const Null &); - Key(const shared_gpgme_key_t &key); - Key(gpgme_key_t key, bool acquireRef); -+ Key(Key const &) = default; - - static const Null null; - diff --git a/external/gpgmepp/macos-include.patch b/external/gpgmepp/macos-include.patch deleted file mode 100644 index 93dd297c7368..000000000000 --- a/external/gpgmepp/macos-include.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- 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/ubsan.patch b/external/gpgmepp/ubsan.patch index 2262291cd8b5..c23ab80ad007 100644 --- a/external/gpgmepp/ubsan.patch +++ b/external/gpgmepp/ubsan.patch @@ -1,6 +1,6 @@ --- src/engine-gpg.c +++ src/engine-gpg.c -@@ -61,6 +61,15 @@ +@@ -62,6 +62,15 @@ building command line to this location. */ char arg[FLEXIBLE_ARRAY_MEMBER]; /* Used if data above is not used. */ }; @@ -16,16 +16,14 @@ struct fd_data_map_s -@@ -310,23 +319,24 @@ +@@ -335,19 +344,20 @@ a = malloc (offsetof (struct arg_and_data_s, arg)); if (!a) return gpg_error_from_syserror (); -- a->next = NULL; - a->data = data; - a->inbound = inbound; - a->arg_locp = NULL; + struct arg_without_data_s *a2 = (struct arg_without_data_s *)a; -+ a2->next = NULL; + a2->data = data; + a2->inbound = inbound; + a2->arg_locp = NULL; @@ -44,9 +42,5 @@ + a2->print_fd = 0; + a2->dup_to = dup_to; } - *gpg->argtail = a; -- gpg->argtail = &a->next; -+ gpg->argtail = &a2->next; - return 0; - } + if (front) diff --git a/external/gpgmepp/w32-build-fixes.patch.1 b/external/gpgmepp/w32-build-fixes.patch.1 index d6d8af601015..b96bb62e8fde 100644 --- a/external/gpgmepp/w32-build-fixes.patch.1 +++ b/external/gpgmepp/w32-build-fixes.patch.1 @@ -1,15 +1,17 @@ -diff -ru gpgme.orig/m4/ax_cxx_compile_stdcxx.m4 gpgme/m4/ax_cxx_compile_stdcxx.m4 ---- gpgme.orig/m4/ax_cxx_compile_stdcxx.m4 2016-05-27 22:04:36.000000000 +0200 -+++ gpgme/m4/ax_cxx_compile_stdcxx.m4 2017-09-29 17:34:49.795243600 +0200 -@@ -156,7 +156,7 @@ - - #error "This is not a C++ compiler" - --#elif __cplusplus < 201103L -+#elif __cplusplus < 201103L && !(defined _MSC_VER) - - #error "This is not a C++11 compiler" +diff -ru gpgme.orig/src/debug.h gpgme/src/debug.h +--- gpgme.orig/src/debug.h 2023-04-17 22:09:48.000000000 +0900 ++++ gpgme/src/debug.h 2023-06-25 20:43:29.267407815 +0900 +@@ -21,6 +21,10 @@ + #ifndef DEBUG_H + #define DEBUG_H ++#ifdef _MSC_VER ++#include <BaseTsd.h> ++typedef SSIZE_T ssize_t; ++#endif + #include <string.h> + #ifdef HAVE_STDINT_H + #include <stdint.h> 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
