git: 1a2da0563af1 - main - devel/libblake3: New port: C library providing BLAKE3

From: Ashish SHUKLA <ashish_at_FreeBSD.org>
Date: Sat, 13 Sep 2025 21:26:53 UTC
The branch main has been updated by ashish:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1a2da0563af14cc02aea7d1a95a4d4875618c40e

commit 1a2da0563af14cc02aea7d1a95a4d4875618c40e
Author:     Ashish SHUKLA <ashish@FreeBSD.org>
AuthorDate: 2025-09-13 21:05:26 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2025-09-13 21:13:23 +0000

    devel/libblake3: New port: C library providing BLAKE3
    
    C library providing BLAKE3 hash function.
    
    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.
---
 devel/Makefile            |  1 +
 devel/libblake3/Makefile  | 26 ++++++++++++++++++++++++++
 devel/libblake3/distinfo  |  3 +++
 devel/libblake3/pkg-descr | 19 +++++++++++++++++++
 devel/libblake3/pkg-plist |  9 +++++++++
 5 files changed, 58 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 65a261612f08..8afd8c7e81d4 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1228,6 +1228,7 @@
     SUBDIR += libbegemot
     SUBDIR += libbfd
     SUBDIR += libbinio
+    SUBDIR += libblake3
     SUBDIR += libbpfjit
     SUBDIR += libbson
     SUBDIR += libburn
diff --git a/devel/libblake3/Makefile b/devel/libblake3/Makefile
new file mode 100644
index 000000000000..578aa25e228d
--- /dev/null
+++ b/devel/libblake3/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	libblake3
+DISTVERSION=	1.8.2
+CATEGORIES=	devel
+
+MAINTAINER=	ashish@FreeBSD.org
+COMMENT=	C library providing BLAKE3
+WWW=		https://github.com/BLAKE3-team/BLAKE3
+
+LICENSE=	APACHE20 CC0-1.0
+LICENSE_COMB=	dual
+LICENSE_FILE_CC0-1.0=	${WRKDIR}/BLAKE3-${DISTVERSION}/LICENSE_CC0
+LICENSE_FILE_APACHE20=	${WRKDIR}/BLAKE3-${DISTVERSION}/LICENSE_A2
+
+USES=		cmake
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+
+GH_ACCOUNT=	BLAKE3-team
+GH_PROJECT=	BLAKE3
+
+CMAKE_ARGS+=	-DBUILD_SHARED_LIBS:BOOL=true
+PLIST_SUB+=	DISTVERSION=${DISTVERSION}
+
+WRKSRC=		${WRKDIR}/BLAKE3-${DISTVERSION}/c
+
+.include <bsd.port.mk>
diff --git a/devel/libblake3/distinfo b/devel/libblake3/distinfo
new file mode 100644
index 000000000000..8e8329c92a32
--- /dev/null
+++ b/devel/libblake3/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1757246324
+SHA256 (BLAKE3-team-BLAKE3-1.8.2_GH0.tar.gz) = 6b51aefe515969785da02e87befafc7fdc7a065cd3458cf1141f29267749e81f
+SIZE (BLAKE3-team-BLAKE3-1.8.2_GH0.tar.gz) = 264657
diff --git a/devel/libblake3/pkg-descr b/devel/libblake3/pkg-descr
new file mode 100644
index 000000000000..ea225c5d04cd
--- /dev/null
+++ b/devel/libblake3/pkg-descr
@@ -0,0 +1,19 @@
+C library providing BLAKE3 hash function.
+
+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.
diff --git a/devel/libblake3/pkg-plist b/devel/libblake3/pkg-plist
new file mode 100644
index 000000000000..e6ed2b069e29
--- /dev/null
+++ b/devel/libblake3/pkg-plist
@@ -0,0 +1,9 @@
+include/blake3.h
+lib/cmake/blake3/blake3-config-version.cmake
+lib/cmake/blake3/blake3-config.cmake
+lib/cmake/blake3/blake3-targets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/blake3/blake3-targets.cmake
+lib/libblake3.so
+lib/libblake3.so.0
+lib/libblake3.so.%%DISTVERSION%%
+libdata/pkgconfig/libblake3.pc