summaryrefslogtreecommitdiff
path: root/dev-libs/botan
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-06 04:12:55 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-06 04:12:55 +0100
commit38d6f110ff1dfdd7c6f0b0baf0ed8b13191dcde3 (patch)
tree82f1a2074ab61dae5f1333408972f185457e8f30 /dev-libs/botan
parent0d3219165e816e09207a0e1b5b5c8ad764228615 (diff)
gentoo auto-resync : 06:07:2023 - 04:12:55
Diffstat (limited to 'dev-libs/botan')
-rw-r--r--dev-libs/botan/Manifest3
-rw-r--r--dev-libs/botan/botan-3.0.0-r2.ebuild3
-rw-r--r--dev-libs/botan/files/botan-3.0.0-getentropy-includes.patch68
3 files changed, 73 insertions, 1 deletions
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest
index 20548bcdac0a..f809da7d69da 100644
--- a/dev-libs/botan/Manifest
+++ b/dev-libs/botan/Manifest
@@ -1,3 +1,4 @@
+AUX botan-3.0.0-getentropy-includes.patch 2105 BLAKE2B 989ca3a08673bf3d9492d25b41c3a3f8a67d35f377d750f1f53fcbafcc881b560a3ac48e175a9b4b243c8dbc4b3b08a8e31560c867683d561ce661d4e4af084b SHA512 8c5cccdec61a2ce52ba8f1377f538bb29523fdbfd8d732ad6cc009d4e06a52f45d9ab06ac6d2447cbc1c55009e4d11a2a36e40a9e719f5d909d45a91705302a9
DIST Botan-2.19.2.tar.xz 6063336 BLAKE2B a46fa49c61846e718197ab3a8431a5bdcab0f4cc5e42aec04fd22932ecdbfa2b755cae53c125eee8248ecae237671ec6f0533f99289068ed81e6cd34886d8b88 SHA512 52b9c80a240457e46a299480338472f7d0c0b56df7b1709fdef52c5be3afca5b474fe143801c9a332ae884eaf033e60461c9d3e0b2f7b069f4fe8b4c45932abf
DIST Botan-2.19.2.tar.xz.asc 488 BLAKE2B 94d22dff9de02871560649b1d961f4c7ae5fa37a847141554f8da9f0a726d4497cd23e0d84197beb4d176f29aa3a478118d94cd52d2c04733d115828f85d400d SHA512 e25a03ac437a08737ecde541ead4b841ccb507d3198683a1755dab1d4f82e9ce0278473db7c7041a4b808f9dff9927106e30bbad79b1674615254ee78f0b6a06
DIST Botan-2.19.3.tar.xz 6105896 BLAKE2B 6d7778d9e9a101c76f35c65b0fb0201641cd91967ba934510f3836ee4b924d54cabdc760dd460997679250aa66e1d2a99369cd03f8fb9e7b2fe672d4b355215f SHA512 80012397e2aa7cc88a9536340ac9b770d1195fddda53b9d4cfde82318dd05f9d4f925bbdff773aba99883a701f4d30581e9d5c97e915fa80c3ca2acfa5a92110
@@ -6,5 +7,5 @@ DIST Botan-3.0.0.tar.xz 8752380 BLAKE2B 06ac29dc0cbaef43a38cc30185f431e1b1f40834
DIST Botan-3.0.0.tar.xz.asc 488 BLAKE2B 6a34817ec4700983151f97d2e278870736860ac72f3936fcc63e241d89ba758bdf7765d3c877d88019055562a6067c278ecbac263e8d87cc310790089e47f662 SHA512 46ff64bb4d215a48b0549d90ae2461ae39ae5ecf588a7e130876759ec30561c5a2db77ee9cdc7a3dab990927b51ea732f5b56592bdc150062ca25690378ab817
EBUILD botan-2.19.2.ebuild 4430 BLAKE2B f3ecd4970642c364814e8ecbc7e831c8009b90d06b44dfc3da8abf270d7bd55f07715f86bf155a0e7f31baab03b849ccfbade89e346d8ccd2cb88edaeb7530a2 SHA512 42227dea382c9db6d3623506ab50ee4b3bf4139e419917c0f7e2fc5467b29a86723b1159e8025b982f7d82f057733cc8ac1193834e8a4609a5dfde80563f8205
EBUILD botan-2.19.3-r2.ebuild 4801 BLAKE2B 62773458d226a78bb28c0611073c6a1b628e3a6910915a40bf07c2f7dc5f8252f8da3ccf682d618f915a6095e808c7ef9d4f46a1ad0d30dc1bf3fde98ced59e0 SHA512 c5dba4870489f004a2d955d351aa4f31d82f483b39a01dd137f765686b3f1a18f69139b72097761839a6485443ce4b4fbdcfb875f40537ce2248fe73b5e681d2
-EBUILD botan-3.0.0-r2.ebuild 4802 BLAKE2B 8ea6383cbb7d1ce1e2cdfeaf3dad03aa075958a5d58eab5f737e8471ee9451186c1e977c0d11b0b4209163c60f90530b53c1d98b30a3f36cf58ce0bceb79a815 SHA512 2ee10c636aa02484ffb8a137687d5a25c3aad2b542e2237c8cc0847a3b5e12e5135515f592925bc67c9678729253f0757c73a2becaed7eb92aef8669f8575859
+EBUILD botan-3.0.0-r2.ebuild 4860 BLAKE2B 1ec833d713637672ba14219b65a3a63e21be62a47591fb8a2ede543155bdff499da3db470f99b78e0f86623036cc2955e0c58202da438985b2e30eb5224dea2f SHA512 b7b2530a5c081f9fd43c2d38e7864681bfdfe318ae763423f4d352c995996a2454cc4679a8ef23a67a1ab591a6608dc7119443d474b110fc7858a6f92f9e7920
MISC metadata.xml 587 BLAKE2B 8d46466fee633fda0f81549a6e512e4ef5963eda31d7c882cee2fe2bfae8b0379509f046d0bdfdb1fe9481eea0585f1754753ed6b509c4f922b8fbf9ae089f39 SHA512 258e04098b9db5821a66e38d02ffb195b57378621fd2a549c8892744cf257be857ebf75c8e4a2f041cd267f07c2f1c3a5fca8df61db0538d8282507cf03a029d
diff --git a/dev-libs/botan/botan-3.0.0-r2.ebuild b/dev-libs/botan/botan-3.0.0-r2.ebuild
index 866ca3ab1f23..fb1e9384a2cc 100644
--- a/dev-libs/botan/botan-3.0.0-r2.ebuild
+++ b/dev-libs/botan/botan-3.0.0-r2.ebuild
@@ -55,6 +55,9 @@ BDEPEND="
# NOTE: Considering patching Botan?
# Please see upstream's guidance:
# https://botan.randombit.net/handbook/packaging.html#minimize-distribution-patches
+PATCHES=(
+ "${FILESDIR}"/${P}-getentropy-includes.patch
+)
python_check_deps() {
use doc || return 0
diff --git a/dev-libs/botan/files/botan-3.0.0-getentropy-includes.patch b/dev-libs/botan/files/botan-3.0.0-getentropy-includes.patch
new file mode 100644
index 000000000000..d8b99ba0f4c5
--- /dev/null
+++ b/dev-libs/botan/files/botan-3.0.0-getentropy-includes.patch
@@ -0,0 +1,68 @@
+https://bugs.gentoo.org/909422
+https://github.com/randombit/botan/commit/3f87e1eef7dbfe231d833ffbf06f7a85b070b600 (cherry-picked getentropy.cpp bit)
+https://github.com/randombit/botan/commit/562ea8da8ab34985b4b3dfefc1bea57829213ace
+
+--- a/src/lib/entropy/getentropy/getentropy.cpp
++++ b/src/lib/entropy/getentropy/getentropy.cpp
+@@ -10,8 +10,8 @@
+ #if defined(BOTAN_TARGET_OS_IS_OPENBSD) || defined(BOTAN_TARGET_OS_IS_FREEBSD) || defined(BOTAN_TARGET_OS_IS_SOLARIS)
+ #include <unistd.h>
+ #else
+- #include <sys/types.h> // older macOS needs this before sys/random.h
+ #include <sys/random.h>
++ #include <sys/types.h> // older macOS needs this before sys/random.h
+ #endif
+
+ namespace Botan {
+@@ -21,16 +21,14 @@ namespace Botan {
+ * buffer size is limited to 256 bytes. On OpenBSD this does neither
+ * block nor fail.
+ */
+-size_t Getentropy::poll(RandomNumberGenerator& rng)
+- {
++size_t Getentropy::poll(RandomNumberGenerator& rng) {
+ secure_vector<uint8_t> buf(256);
+
+- if(::getentropy(buf.data(), buf.size()) == 0)
+- {
++ if(::getentropy(buf.data(), buf.size()) == 0) {
+ rng.add_entropy(buf.data(), buf.size());
+ return buf.size() * 8;
+- }
++ }
+
+ return 0;
+- }
+ }
++} // namespace Botan
+
+From 562ea8da8ab34985b4b3dfefc1bea57829213ace Mon Sep 17 00:00:00 2001
+From: Jack Lloyd <jack@randombit.net>
+Date: Mon, 29 May 2023 10:10:54 -0400
+Subject: [PATCH] Clean up getentropy includes
+
+--- a/src/lib/entropy/getentropy/getentropy.cpp
++++ b/src/lib/entropy/getentropy/getentropy.cpp
+@@ -6,12 +6,11 @@
+ */
+
+ #include <botan/internal/getentropy.h>
++#include <unistd.h>
+
+-#if defined(BOTAN_TARGET_OS_IS_OPENBSD) || defined(BOTAN_TARGET_OS_IS_FREEBSD) || defined(BOTAN_TARGET_OS_IS_SOLARIS)
+- #include <unistd.h>
+-#else
++// macOS and Android include it in sys/random.h instead
++#if __has_include(<sys/random.h>)
+ #include <sys/random.h>
+- #include <sys/types.h> // older macOS needs this before sys/random.h
+ #endif
+
+ namespace Botan {
+@@ -31,4 +30,5 @@ size_t Getentropy::poll(RandomNumberGenerator& rng) {
+
+ return 0;
+ }
++
+ } // namespace Botan
+