Skip to content

Commit

Permalink
Fix OpenBSD support (#40141)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudchenkos authored Jul 30, 2024
1 parent a77d228 commit d418101
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions scripts/buildsystems/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d418101

Please sign in to comment.