From 13dca076fd9ff96682821467d40d9a1dbd950ed8 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Thu, 30 May 2024 08:23:51 +0000 Subject: [PATCH 01/10] [zydis] Update version to v4.1.0 --- ports/zycore/portfile.cmake | 6 +-- ports/zycore/vcpkg.json | 3 +- ports/zydis/portfile.cmake | 11 +---- ports/zydis/vcpkg.json | 3 +- ports/zydis/zycore.patch | 88 ++++++++++--------------------------- 5 files changed, 28 insertions(+), 83 deletions(-) diff --git a/ports/zycore/portfile.cmake b/ports/zycore/portfile.cmake index 92d5a859d869ec..19fecd56056823 100644 --- a/ports/zycore/portfile.cmake +++ b/ports/zycore/portfile.cmake @@ -1,11 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zyantific/zycore-c - REF 4a8b5e2ab4d6ee73aa92d04bc318fed607394e67 - SHA512 c707f5e07411d9f00fa59e3c382345009f225ed9406063b9863604f15a9c45c9a32bc9c3100f08d9c5800cc2254f71bfae817979b85bc604739ca1ee854c94e5 + REF "v${VERSION}" + SHA512 f57af4e5c6f919299e673ff4afd19a7e3cc01acaf5cde73db47063eb30881487fa33d2fd5707a3e55a8cd8df4bb4b668bc7273b8b8b5eebea1e78c1c36f715b2 HEAD_REF master - PATCHES - fix-install.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" dynamic ZYCORE_BUILD_SHARED) diff --git a/ports/zycore/vcpkg.json b/ports/zycore/vcpkg.json index 48a5023173e5a3..de8ed138e98649 100644 --- a/ports/zycore/vcpkg.json +++ b/ports/zycore/vcpkg.json @@ -1,7 +1,6 @@ { "name": "zycore", - "version": "1.3.0", - "port-version": 1, + "version": "1.5.0", "description": "Provides platform independent types, macros and a fallback for environments without LibC.", "homepage": "https://github.com/zyantific/zycore-c", "license": "MIT", diff --git a/ports/zydis/portfile.cmake b/ports/zydis/portfile.cmake index fe635961ceb5af..980ccfc996f4c3 100644 --- a/ports/zydis/portfile.cmake +++ b/ports/zydis/portfile.cmake @@ -1,19 +1,12 @@ -vcpkg_download_distfile( - OSX_INTEL_ALIGNMENT_FIX - URLS https://github.com/zyantific/zydis/commit/a605f54580c26d2164530fab323057834569d169.patch?full_index=1 - SHA512 15fad10e4880ab2ee494babc0451b96604a6cc00c09c6740c6b97b83718e01d8e117614bf8f9ec8a6777e9baa1336c7f540709b21dcdc9b53f912bd117f1d3c0 - FILENAME zydis-intel-alignment-fix-a605f54580c26d2164530fab323057834569d169.patch -) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zyantific/zydis REF "v${VERSION}" - SHA512 334284bccfb6ce61cc530fd479d6278db3e4df1fb52b311acd7d21558843c9bf14e74a199cd937041d434260b65c506c07ae1a37243d2240eb9443ae5e56e000 + SHA512 e07add4d43768ded02a238911fde6e74d2391abf8df282f774fca1a8c3fca3e97b03e90e0f3c7c0f3c75485fb29c0be4071d5e5b2e23dd5b8b1a864e3b713fbc HEAD_REF master PATCHES - zycore.patch - "${OSX_INTEL_ALIGNMENT_FIX}" + ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYDIS_BUILD_SHARED_LIB) diff --git a/ports/zydis/vcpkg.json b/ports/zydis/vcpkg.json index c9459b1d9a1936..6cc61cfb156ca3 100644 --- a/ports/zydis/vcpkg.json +++ b/ports/zydis/vcpkg.json @@ -1,7 +1,6 @@ { "name": "zydis", - "version-semver": "4.0.0", - "port-version": 2, + "version-semver": "4.1.0", "description": "Fast and lightweight x86/x86-64 disassembler library.", "homepage": "https://zydis.re", "license": "MIT", diff --git a/ports/zydis/zycore.patch b/ports/zydis/zycore.patch index 5e62c7f29c4513..0256b20ad14004 100644 --- a/ports/zydis/zycore.patch +++ b/ports/zydis/zycore.patch @@ -1,66 +1,22 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5e812fb..64c6e97 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -78,8 +78,7 @@ if (ZYAN_SYSTEM_ZYCORE) - find_package(Zycore) - else () - # Try to initialize the Zycore submodule using Git -- if (NOT EXISTS "${ZYAN_ZYCORE_PATH}/CMakeLists.txt" AND -- "${ZYAN_ZYCORE_PATH}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}/dependencies/zycore") -+ if (0) - find_package(Git QUIET) - if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") - execute_process( -@@ -89,7 +88,7 @@ else () - endif() - endif () - -- if (NOT EXISTS "${ZYAN_ZYCORE_PATH}/CMakeLists.txt") -+ if (0) - message( - FATAL_ERROR - "Can't find zycore submodule. Please make sure to clone the repo recursively.\n" -@@ -101,7 +100,7 @@ else () - ) - endif () - -- add_subdirectory(${ZYAN_ZYCORE_PATH} "zycore" EXCLUDE_FROM_ALL) -+ find_package(zycore CONFIG REQUIRED) - endif () - - # =============================================================================================== # -@@ -115,7 +114,7 @@ else () - target_compile_definitions("Zydis" PUBLIC "ZYDIS_STATIC_BUILD") - endif () - --target_link_libraries("Zydis" PUBLIC "Zycore") -+target_link_libraries("Zydis" PUBLIC Zycore::Zycore) - target_include_directories("Zydis" - PUBLIC - $ -@@ -383,14 +382,16 @@ if (ZYDIS_BUILD_TOOLS AND NOT ZYAN_NO_LIBC) - target_compile_definitions("ZydisFuzzReEncoding" PRIVATE "ZYDIS_LIBFUZZER") - endif () - -- add_executable("ZydisTestEncoderAbsolute" -- "tools/ZydisTestEncoderAbsolute.c") -- target_link_libraries("ZydisTestEncoderAbsolute" "Zydis") -- set_target_properties("ZydisTestEncoderAbsolute" PROPERTIES FOLDER "Tools") -- target_compile_definitions("ZydisTestEncoderAbsolute" PRIVATE "_CRT_SECURE_NO_WARNINGS") -- zyan_set_common_flags("ZydisTestEncoderAbsolute") -- zyan_maybe_enable_wpo("ZydisTestEncoderAbsolute") -- _maybe_set_emscripten_cfg("ZydisTestEncoderAbsolute") -+ if (NOT ZYDIS_BUILD_SHARED_LIB) -+ add_executable("ZydisTestEncoderAbsolute" -+ "tools/ZydisTestEncoderAbsolute.c") -+ target_link_libraries("ZydisTestEncoderAbsolute" "Zydis") -+ set_target_properties("ZydisTestEncoderAbsolute" PROPERTIES FOLDER "Tools") -+ target_compile_definitions("ZydisTestEncoderAbsolute" PRIVATE "_CRT_SECURE_NO_WARNINGS") -+ zyan_set_common_flags("ZydisTestEncoderAbsolute") -+ zyan_maybe_enable_wpo("ZydisTestEncoderAbsolute") -+ _maybe_set_emscripten_cfg("ZydisTestEncoderAbsolute") -+ endif () - endif () - - add_executable("ZydisInfo" "tools/ZydisInfo.c") +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 62d5de6..0f3bcf1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -138,7 +138,7 @@ function (locate_zycore) + ) + endfunction () + +-locate_zycore() ++find_package(zycore CONFIG REQUIRED) + + # =============================================================================================== # + # Library configuration # +@@ -151,7 +151,7 @@ else () + target_compile_definitions("Zydis" PUBLIC "ZYDIS_STATIC_BUILD") + endif () + +-target_link_libraries("Zydis" PUBLIC "Zycore") ++target_link_libraries("Zydis" PUBLIC Zycore::Zycore) + target_include_directories("Zydis" + PUBLIC + $ From c301fbbd925390aacda232816a947f1dda7eacb9 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Thu, 30 May 2024 08:24:13 +0000 Subject: [PATCH 02/10] version --- versions/baseline.json | 8 ++++---- versions/z-/zycore.json | 5 +++++ versions/z-/zydis.json | 5 +++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 6a8ef3556ac2f6..51ec7fb7454587 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9709,12 +9709,12 @@ "port-version": 1 }, "zycore": { - "baseline": "1.3.0", - "port-version": 1 + "baseline": "1.5.0", + "port-version": 0 }, "zydis": { - "baseline": "4.0.0", - "port-version": 2 + "baseline": "4.1.0", + "port-version": 0 }, "zyre": { "baseline": "2019-07-07", diff --git a/versions/z-/zycore.json b/versions/z-/zycore.json index b68bc0479804dc..a3d9d771075fe6 100644 --- a/versions/z-/zycore.json +++ b/versions/z-/zycore.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b50c35297a3b4ff63f3575a6f120649d203b2601", + "version": "1.5.0", + "port-version": 0 + }, { "git-tree": "b1f54fb1aabdc1dc6bcb5f100d7790bd6583bbc3", "version": "1.3.0", diff --git a/versions/z-/zydis.json b/versions/z-/zydis.json index 60a5fe1bf0560e..1ebaff4b259ee5 100644 --- a/versions/z-/zydis.json +++ b/versions/z-/zydis.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4d298eaf2915cd54818f48f06f108f315a32b9e8", + "version-semver": "4.1.0", + "port-version": 0 + }, { "git-tree": "4057692f573c3990f5767e5e2952fc54a76cb1c9", "version-semver": "4.0.0", From e51d1282d866be654c9397a17e14394b278d2d6e Mon Sep 17 00:00:00 2001 From: FrankXie Date: Fri, 31 May 2024 02:18:02 +0000 Subject: [PATCH 03/10] update patch --- ports/zydis/portfile.cmake | 2 +- ports/zydis/zycore.patch | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/ports/zydis/portfile.cmake b/ports/zydis/portfile.cmake index 980ccfc996f4c3..bc45c178575492 100644 --- a/ports/zydis/portfile.cmake +++ b/ports/zydis/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( SHA512 e07add4d43768ded02a238911fde6e74d2391abf8df282f774fca1a8c3fca3e97b03e90e0f3c7c0f3c75485fb29c0be4071d5e5b2e23dd5b8b1a864e3b713fbc HEAD_REF master PATCHES + zycore.patch ) @@ -27,7 +28,6 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/zydis) vcpkg_copy_tools(TOOL_NAMES ZydisDisasm ZydisInfo AUTO_CLEAN) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Zydis/Defines.h" "defined(ZYDIS_STATIC_BUILD)" "1") endif() diff --git a/ports/zydis/zycore.patch b/ports/zydis/zycore.patch index 0256b20ad14004..503daa2a898c11 100644 --- a/ports/zydis/zycore.patch +++ b/ports/zydis/zycore.patch @@ -1,22 +1,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 62d5de6..0f3bcf1 100644 +index 62d5de6..ee500c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -138,7 +138,7 @@ function (locate_zycore) +@@ -138,7 +138,8 @@ function (locate_zycore) ) endfunction () -locate_zycore() +find_package(zycore CONFIG REQUIRED) ++add_library(Zycore ALIAS Zycore::Zycore) # =============================================================================================== # # Library configuration # -@@ -151,7 +151,7 @@ else () - target_compile_definitions("Zydis" PUBLIC "ZYDIS_STATIC_BUILD") - endif () - --target_link_libraries("Zydis" PUBLIC "Zycore") -+target_link_libraries("Zydis" PUBLIC Zycore::Zycore) - target_include_directories("Zydis" - PUBLIC - $ From 5d33b69b4eb33839e54fe8d41ba62e4a453f127f Mon Sep 17 00:00:00 2001 From: FrankXie Date: Fri, 31 May 2024 02:18:36 +0000 Subject: [PATCH 04/10] version --- versions/z-/zydis.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zydis.json b/versions/z-/zydis.json index 1ebaff4b259ee5..d32c89d25192ba 100644 --- a/versions/z-/zydis.json +++ b/versions/z-/zydis.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4d298eaf2915cd54818f48f06f108f315a32b9e8", + "git-tree": "2bc187bcb711466fa82caddd5169cb02a689df20", "version-semver": "4.1.0", "port-version": 0 }, From 48606adc5bba5c0a553ade5952e41fae44e755b9 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Fri, 31 May 2024 08:12:00 +0000 Subject: [PATCH 05/10] merge --- ports/zydis/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/zydis/portfile.cmake b/ports/zydis/portfile.cmake index bc45c178575492..5304e41b443a82 100644 --- a/ports/zydis/portfile.cmake +++ b/ports/zydis/portfile.cmake @@ -15,7 +15,9 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYDIS_BUILD_SHARED_LIB vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS + -DZYAN_SYSTEM_ZYCORE=ON -DZYDIS_BUILD_SHARED_LIB=${ZYDIS_BUILD_SHARED_LIB} + -DZYDIS_BUILD_DOXYGEN=OFF -DZYDIS_BUILD_EXAMPLES=OFF OPTIONS_DEBUG -DZYDIS_BUILD_TOOLS=OFF From 990f6251a4709192c0df4f851df970bab5b77c9b Mon Sep 17 00:00:00 2001 From: FrankXie Date: Fri, 31 May 2024 08:12:19 +0000 Subject: [PATCH 06/10] version --- versions/z-/zydis.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zydis.json b/versions/z-/zydis.json index d32c89d25192ba..3fcde66cfcbf32 100644 --- a/versions/z-/zydis.json +++ b/versions/z-/zydis.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2bc187bcb711466fa82caddd5169cb02a689df20", + "git-tree": "71d83e580eddfc8e3106fb399e63d58b71366778", "version-semver": "4.1.0", "port-version": 0 }, From 9d7ad2dd4d168cff53bf9f3ea2926386b4e88383 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Mon, 3 Jun 2024 01:27:54 +0000 Subject: [PATCH 07/10] merge patch --- ports/zydis/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/zydis/portfile.cmake b/ports/zydis/portfile.cmake index 5304e41b443a82..d008b3d2a0361f 100644 --- a/ports/zydis/portfile.cmake +++ b/ports/zydis/portfile.cmake @@ -6,7 +6,7 @@ vcpkg_from_github( SHA512 e07add4d43768ded02a238911fde6e74d2391abf8df282f774fca1a8c3fca3e97b03e90e0f3c7c0f3c75485fb29c0be4071d5e5b2e23dd5b8b1a864e3b713fbc HEAD_REF master PATCHES - zycore.patch + # zycore.patch ) @@ -19,6 +19,7 @@ vcpkg_cmake_configure( -DZYDIS_BUILD_SHARED_LIB=${ZYDIS_BUILD_SHARED_LIB} -DZYDIS_BUILD_DOXYGEN=OFF -DZYDIS_BUILD_EXAMPLES=OFF + -DZYDIS_BUILD_TESTS=OFF OPTIONS_DEBUG -DZYDIS_BUILD_TOOLS=OFF ) From 1166cca15d2483f9ea5ca25dc9f41ba0eb0a71d1 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Mon, 3 Jun 2024 01:28:25 +0000 Subject: [PATCH 08/10] version --- versions/z-/zydis.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zydis.json b/versions/z-/zydis.json index 3fcde66cfcbf32..b0e2b96cd63547 100644 --- a/versions/z-/zydis.json +++ b/versions/z-/zydis.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "71d83e580eddfc8e3106fb399e63d58b71366778", + "git-tree": "ae046fa5f59835f5b2598aca5a0d66f007ead1c8", "version-semver": "4.1.0", "port-version": 0 }, From 8c4a3b8b9165f7c0be7579efd3910b73999cd4a7 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Mon, 3 Jun 2024 01:42:08 +0000 Subject: [PATCH 09/10] enable patch --- ports/zydis/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/zydis/portfile.cmake b/ports/zydis/portfile.cmake index d008b3d2a0361f..a07d6d8729d682 100644 --- a/ports/zydis/portfile.cmake +++ b/ports/zydis/portfile.cmake @@ -6,7 +6,7 @@ vcpkg_from_github( SHA512 e07add4d43768ded02a238911fde6e74d2391abf8df282f774fca1a8c3fca3e97b03e90e0f3c7c0f3c75485fb29c0be4071d5e5b2e23dd5b8b1a864e3b713fbc HEAD_REF master PATCHES - # zycore.patch + zycore.patch ) From 9369bfce59867070e474cbc195b8dd5335ee5b6e Mon Sep 17 00:00:00 2001 From: FrankXie Date: Mon, 3 Jun 2024 01:42:26 +0000 Subject: [PATCH 10/10] version --- versions/z-/zydis.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zydis.json b/versions/z-/zydis.json index b0e2b96cd63547..073e577b29f3e1 100644 --- a/versions/z-/zydis.json +++ b/versions/z-/zydis.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ae046fa5f59835f5b2598aca5a0d66f007ead1c8", + "git-tree": "a08c5c766c41651280cb783e5dd0a8a5764f9700", "version-semver": "4.1.0", "port-version": 0 },