From d418101aeb32b18e58136b334a1424bc699760a6 Mon Sep 17 00:00:00 2001 From: Sergii Rudchenko Date: Tue, 30 Jul 2024 08:05:23 +0200 Subject: [PATCH] Fix OpenBSD support (#40141) --- scripts/bootstrap.sh | 6 +++--- scripts/buildsystems/vcpkg.cmake | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index fe1d68709c..b510746984 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -116,9 +116,9 @@ vcpkgCheckEqualFileHash() if command -v "sha512sum" >/dev/null 2>&1 ; then actualHash=$(sha512sum "$filePath") - elif command -v "gsha512sum" >/dev/null 2>&1 ; then - # OpenBSD's coreutil's sha512sum is prefixed with a `g` - actualHash=$(gsha512sum "$filePath") + elif command -v "sha512" >/dev/null 2>&1 ; then + # OpenBSD + actualHash=$(sha512 -q "$filePath") else # [g]sha512sum is not available by default on osx # shasum is not available by default on Fedora diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index eddd25c0fa..de8425ea6e 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -364,6 +364,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_ endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")) set(Z_VCPKG_TARGET_TRIPLET_PLAT freebsd) +elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "OpenBSD")) + set(Z_VCPKG_TARGET_TRIPLET_PLAT openbsd) elseif(CMAKE_SYSTEM_NAME STREQUAL "Android" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")) set(Z_VCPKG_TARGET_TRIPLET_PLAT android) endif()