Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[polyhook2] Update to 2024-02-08 #37866

Merged
merged 20 commits into from
Apr 9, 2024
Merged
26 changes: 15 additions & 11 deletions ports/polyhook2/fix-dep.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a91480445..c3d432e0b 100644
index 65f3c73..586d582 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -211,14 +211,8 @@ endif()
@@ -209,14 +209,8 @@ endif()

#DisAsm/Zydis
if (POLYHOOK_USE_EXTERNAL_ZYDIS)
Expand All @@ -19,7 +19,7 @@ index a91480445..c3d432e0b 100644
else()
target_link_libraries(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:Zydis>)
target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/zydis/include>)
@@ -231,10 +225,8 @@ install(FILES ${PROJECT_SOURCE_DIR}/polyhook2/ZydisDisassembler.hpp DESTINATION
@@ -229,10 +223,8 @@ install(FILES ${PROJECT_SOURCE_DIR}/polyhook2/ZydisDisassembler.hpp DESTINATION

function(link_asmjit)
if (POLYHOOK_USE_EXTERNAL_ASMJIT)
Expand All @@ -32,7 +32,7 @@ index a91480445..c3d432e0b 100644
else()
target_link_libraries(${PROJECT_NAME} PRIVATE $<BUILD_INTERFACE:asmjit>)
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${ASMJIT_SRC}>")
@@ -238,10 +238,8 @@ if(POLYHOOK_FEATURE_DETOURS)
@@ -244,10 +236,8 @@ if(POLYHOOK_FEATURE_DETOURS)
link_asmjit()

if (POLYHOOK_USE_EXTERNAL_ASMTK)
Expand All @@ -45,18 +45,22 @@ index a91480445..c3d432e0b 100644
else()
target_link_libraries(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:asmtk>)
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${ASMTK_SRC}>")
diff --git a/PolyHook_2-config.cmake.in b/PolyHook_2-config.cmake.in
index 709f8b5d9..3add035e3 100644
--- a/PolyHook_2-config.cmake.in
+++ b/PolyHook_2-config.cmake.in
@@ -10,5 +10,10 @@ set(POLYHOOK_FEATURE_INLINENTD @POLYHOOK_FEATURE_INLINENTD@)
diff --git a/polyhook_2-config.cmake.in b/polyhook_2-config.cmake.in
index 709f8b5..599d1f7 100644
--- a/polyhook_2-config.cmake.in
+++ b/polyhook_2-config.cmake.in
@@ -10,5 +10,14 @@ set(POLYHOOK_FEATURE_INLINENTD @POLYHOOK_FEATURE_INLINENTD@)
set(POLYHOOK_FEATURE_PE @POLYHOOK_FEATURE_PE@)
set(POLYHOOK_FEATURE_VIRTUALS @POLYHOOK_FEATURE_VIRTUALS@)

+include(CMakeFindDependencyMacro)
+find_dependency(Zydis)
+find_dependency(asmjit)
+find_dependency(asmtk)
+if(POLYHOOK_FEATURE_DETOURS)
+ find_dependency(asmjit)
+endif()
+if(POLYHOOK_FEATURE_INLINENTD)
+ find_dependency(asmtk)
+endif()
+
get_filename_component(POLYHOOK_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${POLYHOOK_CMAKE_DIR}/PolyHook_2-targets.cmake")
4 changes: 2 additions & 2 deletions ports/polyhook2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stevemk14ebr/PolyHook_2_0
REF 71553ebf0d197e73c49365cc3ab2a6aa326b3c37
SHA512 f8daaa0307f07990b10a6487e1b0f2719e7442fcaeff5878eae9c22a741f27b1dfa7a292b91dcf7e2039029dd7dce71083ab2288e9d84de1bc20be7567a858c8
REF fd2a88f09c8ae89440858fc52573656141013c7f
SHA512 09eef1b0ca75f9420fa258c4290b6b62a3115531e77c91f9d223b2c4a10e8ee95b243bf9f6598d7c55b76ca4e4a185cdf1231b40d5ef87d7d405b8b434eb6cb0
HEAD_REF master
PATCHES fix-dep.patch
)
Expand Down
15 changes: 10 additions & 5 deletions ports/polyhook2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "polyhook2",
"version-date": "2023-08-11",
"version-date": "2024-02-08",
"description": "C++17, x86/x64 Hooking Library v2.0",
"homepage": "https://github.com/stevemk14ebr/PolyHook_2_0",
"license": "MIT",
"supports": "!(arm | uwp | linux | osx)",
"supports": "(x86 | x64) & !(uwp | osx)",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand All @@ -18,16 +18,21 @@
],
"default-features": [
"detours",
"exception",
{
"name": "exception",
"platform": "windows"
},
"inlinentd",
"pe",
{
"name": "pe",
"platform": "windows"
},
"virtuals"
],
"features": {
"detours": {
"description": "Implement detour functionality",
"dependencies": [
"asmjit",
"asmtk"
]
},
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6861,7 +6861,7 @@
"port-version": 12
},
"polyhook2": {
"baseline": "2023-08-11",
"baseline": "2024-02-08",
"port-version": 0
},
"polymorphic-value": {
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/polyhook2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2380bd82c3b07238558d4cfb7a2a38011b75faf5",
"version-date": "2024-02-08",
"port-version": 0
},
{
"git-tree": "00a3d485f743b08f8c407139e5e8210468f44573",
"version-date": "2023-08-11",
Expand Down