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  <20001722@ymail.ne.jp>
This commit is contained in:
Taichi Haradaguchi
2023-06-26 16:53:40 +02:00
parent 46fa17b70d
commit 97c67afac1
8 changed files with 20 additions and 119 deletions
+2 -2
View File
@@ -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
@@ -1,72 +0,0 @@
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
+2 -2
View File
@@ -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)
-3
View File
@@ -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:
-10
View File
@@ -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;
-10
View File
@@ -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>
+3 -9
View File
@@ -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)
+13 -11
View File
@@ -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