diff options
Diffstat (limited to 'dev-libs/blake3')
-rw-r--r-- | dev-libs/blake3/Manifest | 5 | ||||
-rw-r--r-- | dev-libs/blake3/blake3-1.5.1.ebuild | 2 | ||||
-rw-r--r-- | dev-libs/blake3/blake3-1.5.3.ebuild | 31 | ||||
-rw-r--r-- | dev-libs/blake3/files/blake3-1.5.3-backport-pr405.patch | 57 |
4 files changed, 93 insertions, 2 deletions
diff --git a/dev-libs/blake3/Manifest b/dev-libs/blake3/Manifest index 1f6ad3830fa8..c321d0bc2263 100644 --- a/dev-libs/blake3/Manifest +++ b/dev-libs/blake3/Manifest @@ -1,5 +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 477 BLAKE2B ca1e4f3a109f342f94b2beb22584c2a6a4f98fc55ad70a6dcc474f596fee1a7e26f77e19d9060ff6cbc42d60efd754df5b62a504c3eac040d03141c32c831b1c SHA512 0e9e9d203742b6fd7b2dad65fecd3c88401c1817a4437edccc886f7f03139a049821a9179439b07337337d2abfe8e5757c151cd9e8c634a30aaa3c2505a067cb +EBUILD blake3-1.5.1.ebuild 483 BLAKE2B d70bb68f98b9aa79fb2b6f30c49f4ab0c85a3d9dbc4012ce830b0fcac73ec517faf579d96724f9b78facf56445f0cd23e1a2e7ea385d4b3e140233b14a1ae5ba SHA512 9be2b2e24e8a25e28295c86a2ae8c4137d08420da2011f685eb178b8e4c135e2ffedb623c3c75d133034f48c9b40122c9c519e23b8ccfd809bd73ca6c96c349c +EBUILD blake3-1.5.3.ebuild 833 BLAKE2B ab0af38248565cc749a73dae5de8b896b006b18fff3af58903b31d622260963407014033ac04f7d4a6f4aba5a520af3756d534474be18dc0e3b2fb6b960efc81 SHA512 8a62d8177d0d276101e87235cc993e9baa07c96bbf5f474d20da87b3607aefa119e5670ccee39e6d19b3e43aa1a605384b9399d3d75e2b676263749350d8d0b4 MISC metadata.xml 331 BLAKE2B 04a0d860646b72b60fbc082a4f28fa681e122d6f53dadb858777c4054b1bedb9eb33929758ba0693c72f56b69abe3ae88a69e3fc4460d4e1acc0a9c82f26239f SHA512 849d76599dcbdf00b4fbd501eb2b3cb123dc930418e36ea65701fed34e82d8353624122018b0f1e759a583c38285b14f92b6c89a615512e6646af908efb079cf diff --git a/dev-libs/blake3/blake3-1.5.1.ebuild b/dev-libs/blake3/blake3-1.5.1.ebuild index 6afc53c83207..0909ad2023ce 100644 --- a/dev-libs/blake3/blake3-1.5.1.ebuild +++ b/dev-libs/blake3/blake3-1.5.1.ebuild @@ -12,4 +12,4 @@ S="${WORKDIR}/BLAKE3-${PV}/c" LICENSE="|| ( CC0-1.0 Apache-2.0 )" SLOT="0/0" -KEYWORDS="amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="amd64 ~arm ~arm64 ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" diff --git a/dev-libs/blake3/blake3-1.5.3.ebuild b/dev-libs/blake3/blake3-1.5.3.ebuild new file mode 100644 index 000000000000..db981ccc1f0b --- /dev/null +++ b/dev-libs/blake3/blake3-1.5.3.ebuild @@ -0,0 +1,31 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) +inherit cmake python-any-r1 + +DESCRIPTION="a fast cryptographic hash function" +HOMEPAGE="https://github.com/BLAKE3-team/BLAKE3" +SRC_URI="https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/BLAKE3-${PV}/c" + +LICENSE="|| ( CC0-1.0 Apache-2.0 )" +SLOT="0/0" +KEYWORDS="~alpha ~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) |