aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2024-05-22 19:08:41 +0000
committerOlivier Certner <olce@FreeBSD.org>2024-05-22 19:51:01 +0000
commit97eecf838ae8e88c56c7f97080adce0dc593a491 (patch)
tree5015c6865fce0593f9bc0b4840b36374e8e08616
parentbf07b314c2d87a148357728640ed0596c6bec423 (diff)
downloadports-97eecf838ae8e88c56c7f97080adce0dc593a491.tar.gz
ports-97eecf838ae8e88c56c7f97080adce0dc593a491.zip
security/kleopatra: Fix build against libc++18
libc++ 18 by default removes unique() in 'std::shared_ptr' (in <memory>), as a follow-up to this resolution: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0521r0.html An alternative would be to get it back by defining _LIBCPP_ENABLE_CXX20_REMOVED_SHARED_PTR_UNIQUE before including the libc++ headers, but trying to fight the standard may not be a wise move going forward, especially if/as other C++ libraries follow suit. Upstream MR (approved) is at https://invent.kde.org/pim/kleopatra/-/merge_requests/205. PR: 279139 Approved by: kde (maintainer) Approved by: jrm (ports) Approved by: markj (mentor)
-rw-r--r--security/kleopatra/files/patch-src_crypto_recipient.cpp14
-rw-r--r--security/kleopatra/files/patch-src_crypto_sender.cpp14
2 files changed, 28 insertions, 0 deletions
diff --git a/security/kleopatra/files/patch-src_crypto_recipient.cpp b/security/kleopatra/files/patch-src_crypto_recipient.cpp
new file mode 100644
index 000000000000..7e5efab0e453
--- /dev/null
+++ b/security/kleopatra/files/patch-src_crypto_recipient.cpp
@@ -0,0 +1,14 @@
+Submitted upstream: https://invent.kde.org/pim/kleopatra/-/merge_requests/205.
+To remove when updating to next release.
+
+--- src/crypto/recipient.cpp.orig 2024-02-11 04:00:57 UTC
++++ src/crypto/recipient.cpp
+@@ -85,7 +85,7 @@ void Recipient::detach()
+
+ void Recipient::detach()
+ {
+- if (d && !d.unique()) {
++ if (d && d.use_count() != 1) {
+ d.reset(new Private(*d));
+ }
+ }
diff --git a/security/kleopatra/files/patch-src_crypto_sender.cpp b/security/kleopatra/files/patch-src_crypto_sender.cpp
new file mode 100644
index 000000000000..b60c856ac95e
--- /dev/null
+++ b/security/kleopatra/files/patch-src_crypto_sender.cpp
@@ -0,0 +1,14 @@
+Submitted upstream: https://invent.kde.org/pim/kleopatra/-/merge_requests/205.
+To remove when updating to next release.
+
+--- src/crypto/sender.cpp.orig 2024-02-11 04:00:57 UTC
++++ src/crypto/sender.cpp
+@@ -91,7 +91,7 @@ void Sender::detach()
+
+ void Sender::detach()
+ {
+- if (d && !d.unique()) {
++ if (d && d.use_count() != 1) {
+ d.reset(new Private(*d));
+ }
+ }