Created attachment 221102 [details] Fix constness The 1.15.0 release of gpgme-cpp adds a `Signature::operator<` which is missing a const. In 6a6d2a27648, Signature got an operator< . This is used in *security/libkleo*, for instance, to sort the signatures for display. The build failure looks like this (trimmed for brevity, on 13-): === /usr/include/c++/v1/algorithm:715:71: error: invalid operands to binary expression ('const GpgME::UserID::Signature' and 'const GpgME::UserID::Signature') bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;} /wrkdirs/usr/ports/security/libkleo/work/libkleo-20.12.0/src/models/ useridlistmodel.cpp:203:14: note: in instantiation of function template specialization 'std::__1::sort<GpgME::UserID::Signature>' requested here std::sort(sigs.begin(), sigs.end()); === The attached patch has been submitted upstream as well.
*** Bug 252267 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: jhale Date: Fri Jan 1 02:29:40 UTC 2021 New revision: 559796 URL: https://svnweb.freebsd.org/changeset/ports/559796 Log: security/gpgme-cpp: Fix constness The 1.15.0 release of gpgme-cpp adds a `Signature::operator<` which is missing a const. In 6a6d2a27648, Signature got an operator< . This is used in *security/libkleo*, for instance, to sort the signatures for display. The build failure looks like this (trimmed for brevity, on 13-): === /usr/include/c++/v1/algorithm:715:71: error: invalid operands to binary expression ('const GpgME::UserID::Signature' and 'const GpgME::UserID::Signature') bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;} /wrkdirs/usr/ports/security/libkleo/work/libkleo-20.12.0/src/models/ useridlistmodel.cpp:203:14: note: in instantiation of function template specialization 'std::__1::sort<GpgME::UserID::Signature>' requested here std::sort(sigs.begin(), sigs.end()); === PR: 252283 Submitted by: adridg Changes: head/security/gpgme/files/patch-git-key.h head/security/gpgme-cpp/Makefile
Committed, thanks! I bumped PORTREVISION on gpgme-cpp instead of gpgme.
I was informed by the upstream maintainer that this change is not binary-compatible -- the constness is encoded in the symbol name -- so upstream is going to add a const operator< alongside. So a next release (1.5.1) can drop this patch again, but there's some small risk to software built against 1.5.0 and not re-build against 1.5.0_1. I don't think that's *really* much of an issue in our ports and packages though.