diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/rhasheq | |
Diffstat (limited to 'vcpkg/ports/rhasheq')
| -rw-r--r-- | vcpkg/ports/rhasheq/find-rhash.patch | 39 | ||||
| -rw-r--r-- | vcpkg/ports/rhasheq/portfile.cmake | 22 | ||||
| -rw-r--r-- | vcpkg/ports/rhasheq/vcpkg.json | 19 |
3 files changed, 80 insertions, 0 deletions
diff --git a/vcpkg/ports/rhasheq/find-rhash.patch b/vcpkg/ports/rhasheq/find-rhash.patch new file mode 100644 index 0000000..38722fb --- /dev/null +++ b/vcpkg/ports/rhasheq/find-rhash.patch @@ -0,0 +1,39 @@ +diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
+index c64c475..d57179e 100644
+--- a/cmake/Config.cmake.in
++++ b/cmake/Config.cmake.in
+@@ -1,4 +1,8 @@
+
+ @PACKAGE_INIT@
+
++include(CMakeFindDependencyMacro)
++
++find_dependency(unofficial-rhash)
++
+ include ( "${CMAKE_CURRENT_LIST_DIR}/rhasheqTargets.cmake" )
+diff --git a/rhasheq/CMakeLists.txt b/rhasheq/CMakeLists.txt
+index fb7357f..baaaaf8 100644
+--- a/rhasheq/CMakeLists.txt
++++ b/rhasheq/CMakeLists.txt
+@@ -23,8 +23,9 @@ else ()
+ endif (VCPKG_TOOLCHAIN)
+
+ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules;${CMAKE_MODULE_PATH}")
+-find_package(LibRHash)
++find_package(unofficial-rhash CONFIG REQUIRED)
+
++if(0)
+ if (NOT LibRHash_FOUND)
+ set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} lib)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} _imp.lib -d.lib -d_imp.lib)
+@@ -40,8 +41,9 @@ endif (NOT TARGET LibRHash)
+ if (NOT LibRHash_FOUND)
+ message(FATAL_ERROR "LibRHash not found")
+ endif (NOT LibRHash_FOUND)
++endif()
+
+-target_link_libraries("${LIBRARY_NAME}" INTERFACE "LibRHash::LibRHash")
++target_link_libraries("${LIBRARY_NAME}" INTERFACE unofficial::rhash::rhash)
+
+ include(GNUInstallDirs)
+ target_include_directories(
diff --git a/vcpkg/ports/rhasheq/portfile.cmake b/vcpkg/ports/rhasheq/portfile.cmake new file mode 100644 index 0000000..fa9847a --- /dev/null +++ b/vcpkg/ports/rhasheq/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO offscale/rhasheq + REF cf5442f6468871beb6088991501e6ba052fe4467 + SHA512 2be63bc32c7cea35eefbcc7186255e9cd8ba6ed4b03cb9ee2e62740fe17ad74a81ee7e4ada37f4a2dca99a82becf790d6aa86822cdbeba3972cf11d54095ca91 + HEAD_REF master + PATCHES + find-rhash.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake/modules/FindLibRHash.cmake") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/vcpkg/ports/rhasheq/vcpkg.json b/vcpkg/ports/rhasheq/vcpkg.json new file mode 100644 index 0000000..b7c231f --- /dev/null +++ b/vcpkg/ports/rhasheq/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "rhasheq", + "version-date": "2023-06-17", + "description": "Simple header-only librhash wrapper for verifying hashes from a file to a given `const char *`.", + "homepage": "https://github.com/offscale/rhasheq", + "license": "0BSD", + "dependencies": [ + "c89stringutils", + "rhash", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |