diff --git a/dev-util/librnp/files/librnp-0.18.1-fix-build-with-botan-3.11.patch b/dev-util/librnp/files/librnp-0.18.1-fix-build-with-botan-3.11.patch new file mode 100644 index 0000000000000..b2713edab7734 --- /dev/null +++ b/dev-util/librnp/files/librnp-0.18.1-fix-build-with-botan-3.11.patch @@ -0,0 +1,22 @@ +From fb7e0400a72344048d467c967bb3218a6106e595 Mon Sep 17 00:00:00 2001 +From: Markus Theil +Date: Mon, 16 Mar 2026 13:14:29 +0100 +Subject: [PATCH] fix build with Botan 3.11 + +Signed-off-by: Markus Theil +--- + src/lib/crypto/mem.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib/crypto/mem.cpp b/src/lib/crypto/mem.cpp +index 94d90f5484..dbd2a143ed 100644 +--- a/src/lib/crypto/mem.cpp ++++ b/src/lib/crypto/mem.cpp +@@ -25,6 +25,7 @@ + */ + + #include ++#include + #include "mem.h" + #include "logging.h" + #include diff --git a/dev-util/librnp/files/librnp-0.18.1-switch-defines-for-botan-3.11.patch b/dev-util/librnp/files/librnp-0.18.1-switch-defines-for-botan-3.11.patch new file mode 100644 index 0000000000000..dcdf68743e7ac --- /dev/null +++ b/dev-util/librnp/files/librnp-0.18.1-switch-defines-for-botan-3.11.patch @@ -0,0 +1,28 @@ +diff '--color=auto' -Naur a/src/lib/crypto/ec.cpp b/src/lib/crypto/ec.cpp +--- a/src/lib/crypto/ec.cpp 2025-11-21 15:12:02.000000000 +0200 ++++ b/src/lib/crypto/ec.cpp 2026-04-04 08:22:12.502593507 +0300 +@@ -40,6 +40,10 @@ + #include "botan/ecdh.h" + #include + #endif ++#include ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(3, 11, 0) ++#include ++#endif + + namespace pgp { + namespace ec { +diff '--color=auto' -Naur a/src/lib/crypto/exdsa_ecdhkem.cpp b/src/lib/crypto/exdsa_ecdhkem.cpp +--- a/src/lib/crypto/exdsa_ecdhkem.cpp 2025-11-21 15:12:02.000000000 +0200 ++++ b/src/lib/crypto/exdsa_ecdhkem.cpp 2026-04-04 08:34:49.684582995 +0300 +@@ -34,6 +34,10 @@ + #include "string.h" + #include "utils.h" + #include ++#include ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(3, 11, 0) ++#include ++#endif + + ec_key_t::~ec_key_t() + { diff --git a/dev-util/librnp/librnp-0.18.1.ebuild b/dev-util/librnp/librnp-0.18.1.ebuild index 46b02dcc6705b..a46e935bc2a8b 100644 --- a/dev-util/librnp/librnp-0.18.1.ebuild +++ b/dev-util/librnp/librnp-0.18.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2025 Gentoo Authors +# Copyright 2022-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -27,6 +27,9 @@ DEPEND="${RDEPEND} test? ( dev-cpp/gtest )" BDEPEND="man? ( dev-ruby/asciidoctor )" +PATCHES=( "${FILESDIR}"/librnp-0.18.1-fix-build-with-botan-3.11.patch + "${FILESDIR}"/librnp-0.18.1-switch-defines-for-botan-3.11.patch ) + src_configure() { local mycmakeargs=( -DBUILD_TESTING=$(usex test on off)