aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/blake3
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/blake3
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/blake3')
-rw-r--r--vcpkg/ports/blake3/fix-windows-arm-build-error.patch13
-rw-r--r--vcpkg/ports/blake3/portfile.cmake31
-rw-r--r--vcpkg/ports/blake3/vcpkg.json28
3 files changed, 72 insertions, 0 deletions
diff --git a/vcpkg/ports/blake3/fix-windows-arm-build-error.patch b/vcpkg/ports/blake3/fix-windows-arm-build-error.patch
new file mode 100644
index 0000000..2296275
--- /dev/null
+++ b/vcpkg/ports/blake3/fix-windows-arm-build-error.patch
@@ -0,0 +1,13 @@
+diff --git a/c/blake3_dispatch.c b/c/blake3_dispatch.c
+index af6c3da..dce85b4 100644
+--- a/c/blake3_dispatch.c
++++ b/c/blake3_dispatch.c
+@@ -31,7 +31,7 @@
+ #define ATOMIC_INT _Atomic int
+ #define ATOMIC_LOAD(x) x
+ #define ATOMIC_STORE(x, y) x = y
+-#elif defined(_MSC_VER)
++#elif defined(IS_X86) && defined(_MSC_VER)
+ #define ATOMIC_INT LONG
+ #define ATOMIC_LOAD(x) InterlockedOr(&x, 0)
+ #define ATOMIC_STORE(x, y) InterlockedExchange(&x, y)
diff --git a/vcpkg/ports/blake3/portfile.cmake b/vcpkg/ports/blake3/portfile.cmake
new file mode 100644
index 0000000..baa0039
--- /dev/null
+++ b/vcpkg/ports/blake3/portfile.cmake
@@ -0,0 +1,31 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO BLAKE3-team/BLAKE3
+ REF "${VERSION}"
+ SHA512 a47ab31ae96d54884f8377e831028e3b503009bf89ac5a4383b83d3fe1cca5c99eefb7486fba9c7f459a7dbbad15754d1354f4e20e7bb0bb63a9e06ee8ce3507
+ HEAD_REF main
+ PATCHES
+ fix-windows-arm-build-error.patch
+)
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS BLAKE3_FEATURE_OPTIONS
+ FEATURES
+ tbb BLAKE3_USE_TBB
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}/c"
+ OPTIONS
+ ${BLAKE3_FEATURE_OPTIONS}
+ -DBLAKE3_FETCH_TBB=OFF
+ -DBLAKE3_EXAMPLES=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE_A2" "${SOURCE_PATH}/LICENSE_A2LLVM" "${SOURCE_PATH}/LICENSE_CC0")
diff --git a/vcpkg/ports/blake3/vcpkg.json b/vcpkg/ports/blake3/vcpkg.json
new file mode 100644
index 0000000..e23dea7
--- /dev/null
+++ b/vcpkg/ports/blake3/vcpkg.json
@@ -0,0 +1,28 @@
+{
+ "name": "blake3",
+ "version": "1.8.1",
+ "description": "BLAKE3 cryptographic hash function.",
+ "homepage": "https://github.com/BLAKE3-team/BLAKE3",
+ "license": "CC0-1.0 OR Apache-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "tbb": {
+ "description": "Enable TBB multi-threading API support",
+ "dependencies": [
+ {
+ "name": "tbb",
+ "default-features": false
+ }
+ ]
+ }
+ }
+}