Fix OpenBSD support (#40141)

This commit is contained in:
Sergii Rudchenko 2024-07-30 08:05:23 +02:00 committed by GitHub
parent a77d228511
commit d418101aeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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()