Fri Aug 19 11:15:16 2022 UTC ()
gpgme: add patch from upstream to not require C++14
(tnn)
diff -r1.107 -r1.108 pkgsrc/security/gpgme/Makefile
diff -r1.51 -r1.52 pkgsrc/security/gpgme/distinfo
diff -r0 -r1.1 pkgsrc/security/gpgme/patches/patch-lang_cpp_src_importresult.cpp
--- pkgsrc/security/gpgme/Makefile 2022/08/18 10:38:26 1.107
+++ pkgsrc/security/gpgme/Makefile 2022/08/19 11:15:16 1.108
| @@ -1,26 +1,26 @@ | | | @@ -1,26 +1,26 @@ |
1 | # $NetBSD: Makefile,v 1.107 2022/08/18 10:38:26 tnn Exp $ | | 1 | # $NetBSD: Makefile,v 1.108 2022/08/19 11:15:16 tnn Exp $ |
2 | | | 2 | |
3 | DISTNAME= gpgme-1.18.0 | | 3 | DISTNAME= gpgme-1.18.0 |
4 | CATEGORIES= security | | 4 | CATEGORIES= security |
5 | MASTER_SITES= https://www.gnupg.org/ftp/gcrypt/gpgme/ | | 5 | MASTER_SITES= https://www.gnupg.org/ftp/gcrypt/gpgme/ |
6 | EXTRACT_SUFX= .tar.bz2 | | 6 | EXTRACT_SUFX= .tar.bz2 |
7 | | | 7 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
9 | HOMEPAGE= https://www.gnupg.org/related_software/gpgme/ | | 9 | HOMEPAGE= https://www.gnupg.org/related_software/gpgme/ |
10 | COMMENT= GnuPG Made Easy | | 10 | COMMENT= GnuPG Made Easy |
11 | LICENSE= gnu-gpl-v2 | | 11 | LICENSE= gnu-gpl-v2 |
12 | | | 12 | |
13 | USE_LANGUAGES+= c99 c++14 # https://dev.gnupg.org/T6141 | | 13 | USE_LANGUAGES+= c99 c++ |
14 | USE_LIBTOOL= yes | | 14 | USE_LIBTOOL= yes |
15 | USE_TOOLS+= gmake | | 15 | USE_TOOLS+= gmake |
16 | GNU_CONFIGURE= yes | | 16 | GNU_CONFIGURE= yes |
17 | PTHREAD_OPTS+= require | | 17 | PTHREAD_OPTS+= require |
18 | INFO_FILES= yes | | 18 | INFO_FILES= yes |
19 | CONFIGURE_ARGS+= --enable-languages="cl cpp" | | 19 | CONFIGURE_ARGS+= --enable-languages="cl cpp" |
20 | | | 20 | |
21 | # configure: error: A compiler with c++11 support is required for the c++ binding. | | 21 | # configure: error: A compiler with c++11 support is required for the c++ binding. |
22 | GCC_REQD+= 4.8 | | 22 | GCC_REQD+= 4.8 |
23 | | | 23 | |
24 | SUBST_CLASSES+= pthread | | 24 | SUBST_CLASSES+= pthread |
25 | SUBST_FILES.pthread= src/gpgme-config.in | | 25 | SUBST_FILES.pthread= src/gpgme-config.in |
26 | SUBST_SED.pthread+= -e 's,@PTHREAD_LIBS@,${PTHREAD_LDFLAGS} ${PTHREAD_LIBS},g' | | 26 | SUBST_SED.pthread+= -e 's,@PTHREAD_LIBS@,${PTHREAD_LDFLAGS} ${PTHREAD_LIBS},g' |
--- pkgsrc/security/gpgme/distinfo 2022/08/17 17:46:43 1.51
+++ pkgsrc/security/gpgme/distinfo 2022/08/19 11:15:16 1.52
| @@ -1,7 +1,8 @@ | | | @@ -1,7 +1,8 @@ |
1 | $NetBSD: distinfo,v 1.51 2022/08/17 17:46:43 wiz Exp $ | | 1 | $NetBSD: distinfo,v 1.52 2022/08/19 11:15:16 tnn Exp $ |
2 | | | 2 | |
3 | BLAKE2s (gpgme-1.18.0.tar.bz2) = 48a1a66cca2fbe838112932507f11119039c07e2150da2d4fb392cb6ff21c5c4 | | 3 | BLAKE2s (gpgme-1.18.0.tar.bz2) = 48a1a66cca2fbe838112932507f11119039c07e2150da2d4fb392cb6ff21c5c4 |
4 | SHA512 (gpgme-1.18.0.tar.bz2) = c0cb0b337d017793a15dd477a7f5eaef24587fcda3d67676bf746bb342398d04792c51abe3c26ae496e799c769ce667d4196d91d86e8a690d02c6718c8f6b4ac | | 4 | SHA512 (gpgme-1.18.0.tar.bz2) = c0cb0b337d017793a15dd477a7f5eaef24587fcda3d67676bf746bb342398d04792c51abe3c26ae496e799c769ce667d4196d91d86e8a690d02c6718c8f6b4ac |
5 | Size (gpgme-1.18.0.tar.bz2) = 1762323 bytes | | 5 | Size (gpgme-1.18.0.tar.bz2) = 1762323 bytes |
6 | SHA1 (patch-Makefile.in) = ab9510ae7af22350b7f34de0461d1a9574371089 | | 6 | SHA1 (patch-Makefile.in) = ab9510ae7af22350b7f34de0461d1a9574371089 |
7 | SHA1 (patch-aa) = 6b81bc9b6b17f14329e0dbf1917d1352c142c072 | | 7 | SHA1 (patch-aa) = 6b81bc9b6b17f14329e0dbf1917d1352c142c072 |
| | | 8 | SHA1 (patch-lang_cpp_src_importresult.cpp) = 3ca3b68c2846debc563d8d12e38ae626cf29035d |
$NetBSD: patch-lang_cpp_src_importresult.cpp,v 1.1 2022/08/19 11:15:16 tnn Exp $
Fix building with C++ 11
https://dev.gnupg.org/T6141
--- lang/cpp/src/importresult.cpp.orig 2022-08-10 09:17:33.000000000 +0000
+++ lang/cpp/src/importresult.cpp
@@ -152,17 +152,17 @@ void GpgME::ImportResult::mergeWith(cons
}
// 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(cons
// 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(cons
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);