summaryrefslogtreecommitdiff
path: root/dev-libs/blake3
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-10 11:05:14 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-10 11:05:14 +0100
commitfbbf0ee3d56a6fd27adf182c6907dc745623aeaa (patch)
tree2c2869a78e5e3b6af9391df951ca217cced4608d /dev-libs/blake3
parent43297a4ed0a3760bbdd0b8c286b779f174ca5368 (diff)
gentoo auto-resync : 10:08:2024 - 11:05:14
Diffstat (limited to 'dev-libs/blake3')
-rw-r--r--dev-libs/blake3/Manifest3
-rw-r--r--dev-libs/blake3/blake3-1.5.3.ebuild18
-rw-r--r--dev-libs/blake3/files/blake3-1.5.3-backport-pr405.patch57
3 files changed, 76 insertions, 2 deletions
diff --git a/dev-libs/blake3/Manifest b/dev-libs/blake3/Manifest
index 6d539b6eeb9c..f9d9e1b0730a 100644
--- a/dev-libs/blake3/Manifest
+++ b/dev-libs/blake3/Manifest
@@ -1,7 +1,8 @@
+AUX blake3-1.5.3-backport-pr405.patch 1813 BLAKE2B f409eaf440dfbc16c8418a966852c6702dfe0e084c71d100da4c5eb21036350eefc6f4b4977a6c1df06c242e6fcb6dbbc01b08b9dc3878fba499c345de853231 SHA512 4ab4ca568ec6dd62146ad8825d772e81ab812c0493b596bd5cfac8d7c8de2bfcd29d6a6f14ee3ab89c7277b77bd8b0a604bdc6dcd5cb1715deec59d8a5badc49
DIST blake3-1.5.0.tar.gz 228053 BLAKE2B 04405b0bea5e0a5a774c84e712f36c61fd695c4cbe203a327741db7138af38fc4deda7c75a149f1850a1ca01a519897fb8e84c2cbe38f9cc084357c5ed61a1ed SHA512 eb782d48240cf2fa8cc3cddd699dce3a362eb480b3ca58a97d54cd3595a0c969e51fe14374b91136036e8e29c8f745efbd5a4d1aaed2c17f23cb89fb756645d0
DIST blake3-1.5.1.tar.gz 242161 BLAKE2B 12712bcc6413f90bd9d79ee87d73b45ee611032ccfa3f9e73b2c41b080c2a9451db028c9ff32efa546bef19b85e4aa9fc5ecd9fc6b76c34fd347cbc5fe337649 SHA512 a2ac662b0e45d1f4c4ee01a5e556a47c49ab5407a6057034033ce6fd0fc6b88f66dd428d80f5e7c4a8413356cb4b5ab655924d96138213499893e0204d7c8d24
DIST blake3-1.5.3.tar.gz 244775 BLAKE2B 8d6cfd9b4829d1b0aed790b3e27a5dc8e4e4eb19d9b635faf07bd89bfc99545e9a4c2c362c7a55b44e6ff6d1dad0dc166ba34baf488ed094ed5cff56df21b6ff SHA512 5e8f9ef523735819e9def19911fce906d62d000b4146e7b7a28896f68c925715dbf42da369b1630929b0d2012abb972f0611ffac6184b49c157641bf5b5b1362
EBUILD blake3-1.5.0.ebuild 480 BLAKE2B f0662530d0ab585a6b2edd863b7dc9c1acc6215d3c2b7f0e92cdb866d92b3ca09a77c1e3b6a522b1f7a7b7613ef5f7d0fe09cc64ec0038bccfcfb2771424b28c SHA512 8efb675b88b3cf0c9c999bda8910c3ec75e2be8bbf45261b46d9602dacc6b8c09ac08297600a1d2dde079ee8b1d70457a020ea48a6a85fb36c920e143314cba7
EBUILD blake3-1.5.1.ebuild 483 BLAKE2B d70bb68f98b9aa79fb2b6f30c49f4ab0c85a3d9dbc4012ce830b0fcac73ec517faf579d96724f9b78facf56445f0cd23e1a2e7ea385d4b3e140233b14a1ae5ba SHA512 9be2b2e24e8a25e28295c86a2ae8c4137d08420da2011f685eb178b8e4c135e2ffedb623c3c75d133034f48c9b40122c9c519e23b8ccfd809bd73ca6c96c349c
-EBUILD blake3-1.5.3.ebuild 484 BLAKE2B e5b6b6e5188b06434bc65a41d0ba402668a2bc48415822ba90ee01308c3e37abfa061fbc03c782d9acc52848eda7d5151dbe8adf4f19171fd1cb3083160aac99 SHA512 6a8e918e9591771aa7341c768ae3a92537c63286726d9eb1c20c13dbfc422f14acab3c2b02190dd97cbc7e1d3dab146c092a9e01c533e1999eaaec041d5a0ccd
+EBUILD blake3-1.5.3.ebuild 826 BLAKE2B 9b7c1eb08288b5b680786d2460ace584e2e3f4587ed7d0764dde6670b654c54a0c345fab75aab5b12e9bd7d05be9c5807c24110916447135ebfab20a6f29fdd9 SHA512 5786d94a4f81417f28f0b1f483ca34863d1721650e86acaa67259327cf9a450d0f614497b2c4af85ec73a638e7b31296454602255053e8b859f0d346e2014613
MISC metadata.xml 331 BLAKE2B 04a0d860646b72b60fbc082a4f28fa681e122d6f53dadb858777c4054b1bedb9eb33929758ba0693c72f56b69abe3ae88a69e3fc4460d4e1acc0a9c82f26239f SHA512 849d76599dcbdf00b4fbd501eb2b3cb123dc930418e36ea65701fed34e82d8353624122018b0f1e759a583c38285b14f92b6c89a615512e6646af908efb079cf
diff --git a/dev-libs/blake3/blake3-1.5.3.ebuild b/dev-libs/blake3/blake3-1.5.3.ebuild
index 073d73e0061b..0e7f9fe25cc9 100644
--- a/dev-libs/blake3/blake3-1.5.3.ebuild
+++ b/dev-libs/blake3/blake3-1.5.3.ebuild
@@ -3,7 +3,8 @@
EAPI=8
-inherit cmake
+PYTHON_COMPAT=( python3_{11..13} )
+inherit cmake python-any-r1
DESCRIPTION="a fast cryptographic hash function"
HOMEPAGE="https://github.com/BLAKE3-team/BLAKE3"
@@ -13,3 +14,18 @@ S="${WORKDIR}/BLAKE3-${PV}/c"
LICENSE="|| ( CC0-1.0 Apache-2.0 )"
SLOT="0/0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+PATCHES=( "${FILESDIR}/${PN}-1.5.3-backport-pr405.patch" )
+BDEPEND="test? ( ${PYTHON_DEPS} )"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBLAKE3_BUILD_TESTING="$(usex test)"
+ )
+ cmake_src_configure
+}
diff --git a/dev-libs/blake3/files/blake3-1.5.3-backport-pr405.patch b/dev-libs/blake3/files/blake3-1.5.3-backport-pr405.patch
new file mode 100644
index 000000000000..53db4816a859
--- /dev/null
+++ b/dev-libs/blake3/files/blake3-1.5.3-backport-pr405.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/935370
+https://github.com/BLAKE3-team/BLAKE3/pull/405
+
+From aad68f7f009b7e0607b3eee3b8b8e3021fa38bd7 Mon Sep 17 00:00:00 2001
+From: matoro <matoro@users.noreply.github.com>
+Date: Tue, 2 Jul 2024 19:36:45 -0400
+Subject: [PATCH] build(CMake): support running tests with ctest
+
+---
+ CMakeLists.txt | 11 +++++++++++
+ test.py | 4 ++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3a3b232d..e778e3d7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -168,6 +168,17 @@ else()
+ BLAKE3_DISABLE_SIMD()
+ endif()
+
++# cmake test support
++if (BLAKE3_BUILD_TESTING)
++ find_package(Python3 REQUIRED)
++ get_target_property(BLAKE3_SOURCES blake3 SOURCES)
++ add_executable(blake3-testing ${BLAKE3_SOURCES} main.c)
++ set_property(TARGET blake3-testing PROPERTY OUTPUT_NAME blake3)
++ target_compile_definitions(blake3-testing PRIVATE BLAKE3_TESTING=1)
++ enable_testing()
++ add_test(test_vectors "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/test.py" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
++endif()
++
+ # cmake install support
+ install(FILES blake3.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ install(TARGETS blake3 EXPORT blake3-targets)
+diff --git a/test.py b/test.py
+index 98b1c3df..2eb1f07e 100755
+--- a/test.py
++++ b/test.py
+@@ -2,7 +2,7 @@
+
+ from binascii import hexlify
+ import json
+-from os import path
++from os import getcwd, path
+ import subprocess
+
+ HERE = path.dirname(__file__)
+@@ -11,7 +11,7 @@
+
+
+ def run_blake3(args, input):
+- output = subprocess.run([path.join(HERE, "blake3")] + args,
++ output = subprocess.run([path.join(getcwd(), "blake3")] + args,
+ input=input,
+ stdout=subprocess.PIPE,
+ check=True)