blake3, new recipe (#9466)

This commit is contained in:
Schrijvers Luc
2023-09-20 09:43:51 +00:00
committed by GitHub
parent a79b894a0b
commit 08a0be3858

View File

@@ -0,0 +1,73 @@
SUMMARY="The C implementations of the BLAKE3 cryptographic hash function"
DESCRIPTION="BLAKE3 is a cryptographic hash function that is:
* Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2.
* Secure, unlike MD5 and SHA-1. And secure against length extension, unlike SHA-2.
* Highly parallelizable across any number of threads and SIMD lanes, because it's a Merkle tree on the inside.
* Capable of verified streaming and incremental updates, again because it's a Merkle tree.
* A PRF, MAC, KDF, and XOF, as well as a regular hash.
* One algorithm with no variants, which is fast on x86-64 and also on smaller architectures."
HOMEPAGE="https://github.com/BLAKE3-team/BLAKE3"
COPYRIGHT="2019-2020 Samuel Neves and Jack O'Connor"
LICENSE="Apache v2"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="33020ac83a8169b2e847cc6fb1dd38806ffab6efe79fe6c320e322154a3bea2c"
SOURCE_FILENAME="blake3-$portVersion.tar.gz"
SOURCE_DIR="BLAKE3-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
blake3$secondaryArchSuffix = $portVersion
lib:libblake3$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
blake3${secondaryArchSuffix}_devel = $portVersion
devel:libblake3$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
blake3$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bc/build -Sc -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DBUILD_SHARED_LIBS=ON
make -C ./c/build $jobArgs
}
INSTALL()
{
make -C ./c/build install
prepareInstalledDevelLib libblake3
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make check
}