-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[metrohash] support more triplets by excluding 128 CRC source (#16553)
* [metrohash] exclude CRC for x86 * the change will allow x86 triplets * update port SHA * [metrohash] remove fail_port_install * update ci.baseline.txt * [metrohash] sync portfile and CMakeLists.txt * make both file use 'VCPKG_TARGET_TRIPLET' to make ease of comparison * [metrohash] Use try_compile helpers Co-authored-by: Robert Schumacher <[email protected]>
- Loading branch information
1 parent
9e681d5
commit 96403d0
Showing
6 changed files
with
46 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
vcpkg_fail_port_install(ON_TARGET "UWP" ON_TARGET "x86" "arm" "aarch64") | ||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO jandrewrogers/MetroHash | ||
REF v1.1.3 | ||
SHA512 02b6316e5ebf3d81465eea8a068565452be642394ddf5a53350affbbc9b9bfe1c3d182f7e8f7d49895351c48e11929e465777535e4354e01b6d0ba459e583ac5 | ||
HEAD_REF master | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO jandrewrogers/MetroHash | ||
REF v1.1.3 | ||
SHA512 02b6316e5ebf3d81465eea8a068565452be642394ddf5a53350affbbc9b9bfe1c3d182f7e8f7d49895351c48e11929e465777535e4354e01b6d0ba459e583ac5 | ||
HEAD_REF master | ||
) | ||
if(VCPKG_TARGET_IS_ANDROID) | ||
vcpkg_replace_string(${SOURCE_PATH}/src/metrohash.h | ||
"#include \"metrohash128crc.h\"" | ||
"//#include \"metrohash128crc.h\" // It can't be supported for Android") | ||
endif() | ||
configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) | ||
|
||
file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) | ||
configure_file(${CURRENT_PORT_DIR}/Config.cmake.in ${SOURCE_PATH}/cmake/Config.cmake.in COPYONLY) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) | ||
vcpkg_copy_pdbs() | ||
|
||
if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/include/metrohash128crc.h") | ||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/metrohash.h | ||
"#include \"metrohash128crc.h\"" | ||
"//#include \"metrohash128crc.h\" // The target platform does not support _mm_crc32_u64") | ||
endif() | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
{ | ||
"name": "metrohash", | ||
"version-string": "1.1.3", | ||
"port-version": 3, | ||
"version": "1.1.3", | ||
"port-version": 4, | ||
"description": "MetroHash is a set of state-of-the-art hash functions for non-cryptographic use cases", | ||
"homepage": "https://github.com/jandrewrogers/MetroHash", | ||
"supports": "!(uwp | arm | x86)" | ||
"homepage": "https://github.com/jandrewrogers/MetroHash" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters