From 9b599de1a112ffc77f1c1f42930fd8c550fbe0f2 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Tue, 15 Feb 2022 19:31:33 -0800 Subject: [PATCH 01/17] Use static runtime if capstone wants to be statically linked This makes more sense than using the shared runtime if building a static version --- ports/capstone/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index bd28511cfec6ca..37a072b2e6dc13 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -36,7 +36,7 @@ vcpkg_configure_cmake( -DCAPSTONE_BUILD_SHARED=${CS_BUILD_SHARED} -DCAPSTONE_BUILD_TESTS=OFF -DCAPSTONE_BUILD_CSTOOL=OFF - -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF + -DCAPSTONE_BUILD_STATIC_RUNTIME=${CS_BUILD_STATIC} -DCAPSTONE_X86_ONLY=OFF ${FEATURE_OPTIONS} ) From 5e4cf0dc4953209b2da256014f283f151c5543fa Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Wed, 16 Feb 2022 18:09:43 +1100 Subject: [PATCH 02/17] increase port-version --- ports/capstone/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/c-/capstone.json | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/capstone/vcpkg.json b/ports/capstone/vcpkg.json index 770f479438cb16..479b0084575954 100644 --- a/ports/capstone/vcpkg.json +++ b/ports/capstone/vcpkg.json @@ -1,7 +1,7 @@ { "name": "capstone", "version": "4.0.2", - "port-version": 2, + "port-version": 3, "description": "Multi-architecture disassembly framework", "homepage": "https://github.com/aquynh/capstone", "features": { diff --git a/versions/baseline.json b/versions/baseline.json index 3a2df02e5ad518..a7f062a97a6cd7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1234,7 +1234,7 @@ }, "capstone": { "baseline": "4.0.2", - "port-version": 2 + "port-version": 3 }, "cartographer": { "baseline": "1.0.0", diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index bcd224fa77aa3d..0120f1c1cc6a05 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b2a7400a309296912c2dd2297f4ff69635bc1ab3", + "version": "4.0.2", + "port-version": 3 + }, { "git-tree": "465e527988f09c855e156cff45b7ee6dfbe1d303", "version": "4.0.2", From 4c562ea5456edf808f288cc3ca5043a8e8026be7 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Wed, 16 Feb 2022 19:57:38 +1100 Subject: [PATCH 03/17] Update version database --- versions/c-/capstone.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index 0120f1c1cc6a05..c84f450bb9cd06 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b2a7400a309296912c2dd2297f4ff69635bc1ab3", + "git-tree": "cd9d058e677f9ce4c6488fcf65519cac2380bf4e", "version": "4.0.2", "port-version": 3 }, From 7bf72d25d4d56e479ba493d69b3aa9f62bbbc222 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Thu, 17 Feb 2022 11:50:50 +1100 Subject: [PATCH 04/17] select CRT as new feature --- ports/capstone/portfile.cmake | 2 +- ports/capstone/vcpkg.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index 37a072b2e6dc13..ed5b1b53081026 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "x86-reduce" CAPSTONE_X86_REDUCE "xcore" CAPSTONE_XCORE_SUPPORT "diet" CAPSTONE_BUILD_DIET + "staticCRT" CAPSTONE_BUILD_STATIC_RUNTIME ) vcpkg_configure_cmake( @@ -36,7 +37,6 @@ vcpkg_configure_cmake( -DCAPSTONE_BUILD_SHARED=${CS_BUILD_SHARED} -DCAPSTONE_BUILD_TESTS=OFF -DCAPSTONE_BUILD_CSTOOL=OFF - -DCAPSTONE_BUILD_STATIC_RUNTIME=${CS_BUILD_STATIC} -DCAPSTONE_X86_ONLY=OFF ${FEATURE_OPTIONS} ) diff --git a/ports/capstone/vcpkg.json b/ports/capstone/vcpkg.json index 479b0084575954..14c7763192b305 100644 --- a/ports/capstone/vcpkg.json +++ b/ports/capstone/vcpkg.json @@ -57,6 +57,9 @@ }, "xcore": { "description": "Capstone disassembly support for XCore" + }, + "staticCRT": { + "description": "Use Windows C Runtime Library (CRT)" } } } From 299e7fac4f510dab57aca80501b075c8c77f96fe Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Thu, 17 Feb 2022 11:59:42 +1100 Subject: [PATCH 05/17] don't use upercase in feature name --- ports/capstone/portfile.cmake | 2 +- ports/capstone/vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index ed5b1b53081026..c656d11a44d18a 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -26,7 +26,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "x86-reduce" CAPSTONE_X86_REDUCE "xcore" CAPSTONE_XCORE_SUPPORT "diet" CAPSTONE_BUILD_DIET - "staticCRT" CAPSTONE_BUILD_STATIC_RUNTIME + "static-crt" CAPSTONE_BUILD_STATIC_RUNTIME ) vcpkg_configure_cmake( diff --git a/ports/capstone/vcpkg.json b/ports/capstone/vcpkg.json index 14c7763192b305..bc98060df57298 100644 --- a/ports/capstone/vcpkg.json +++ b/ports/capstone/vcpkg.json @@ -58,7 +58,7 @@ "xcore": { "description": "Capstone disassembly support for XCore" }, - "staticCRT": { + "static-crt": { "description": "Use Windows C Runtime Library (CRT)" } } From d403f62ac779ad3b8c04944f0d72f16a80e6c809 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Thu, 17 Feb 2022 12:02:49 +1100 Subject: [PATCH 06/17] format json --- ports/capstone/vcpkg.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/capstone/vcpkg.json b/ports/capstone/vcpkg.json index bc98060df57298..70a2e92b4d0ded 100644 --- a/ports/capstone/vcpkg.json +++ b/ports/capstone/vcpkg.json @@ -35,6 +35,9 @@ "sparc": { "description": "Capstone disassembly support for SPARC" }, + "static-crt": { + "description": "Use Windows C Runtime Library (CRT)" + }, "sysz": { "description": "Capstone disassembly support for SysZ" }, @@ -57,9 +60,6 @@ }, "xcore": { "description": "Capstone disassembly support for XCore" - }, - "static-crt": { - "description": "Use Windows C Runtime Library (CRT)" } } } From 370800442f09220e27f7d93e6d4d9eb8d795ea19 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Thu, 17 Feb 2022 12:03:28 +1100 Subject: [PATCH 07/17] run x-add-version --- versions/c-/capstone.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index c84f450bb9cd06..628c61bbb8c1a9 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cd9d058e677f9ce4c6488fcf65519cac2380bf4e", + "git-tree": "4eed56c89ad566ab6cbc95822c121ecf23c46663", "version": "4.0.2", "port-version": 3 }, From c90ee869a7aeba7f5c93e55681b782de6f89e24b Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Thu, 17 Feb 2022 04:25:45 +0100 Subject: [PATCH 08/17] remove extra space Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/capstone/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index c656d11a44d18a..e65d3846cc6588 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -26,7 +26,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "x86-reduce" CAPSTONE_X86_REDUCE "xcore" CAPSTONE_XCORE_SUPPORT "diet" CAPSTONE_BUILD_DIET - "static-crt" CAPSTONE_BUILD_STATIC_RUNTIME + "static-crt" CAPSTONE_BUILD_STATIC_RUNTIME ) vcpkg_configure_cmake( From 51d5d42c3716c9bd39e9dd1e6f8083116db15b8a Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Thu, 17 Feb 2022 14:28:28 +1100 Subject: [PATCH 09/17] run x-add-version --- versions/c-/capstone.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index 628c61bbb8c1a9..3d3dce310aac04 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4eed56c89ad566ab6cbc95822c121ecf23c46663", + "git-tree": "322179773392d3ceb4d8ae894faa968a18375f79", "version": "4.0.2", "port-version": 3 }, From f922dbd53ef58396b4fb6c396f18db170c22391d Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 17 Feb 2022 16:16:25 +0800 Subject: [PATCH 10/17] Modernize the port file.cmake --- ports/capstone/portfile.cmake | 15 +++++++-------- ports/capstone/vcpkg.json | 10 ++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index e65d3846cc6588..e9edf6cd27b5c8 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -29,9 +29,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "static-crt" CAPSTONE_BUILD_STATIC_RUNTIME ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DCAPSTONE_BUILD_STATIC=${CS_BUILD_STATIC} -DCAPSTONE_BUILD_SHARED=${CS_BUILD_SHARED} @@ -41,16 +40,16 @@ vcpkg_configure_cmake( ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe" "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") if(EXES) file(REMOVE ${EXES}) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/capstone/vcpkg.json b/ports/capstone/vcpkg.json index 70a2e92b4d0ded..8eaf441477c61c 100644 --- a/ports/capstone/vcpkg.json +++ b/ports/capstone/vcpkg.json @@ -4,6 +4,16 @@ "port-version": 3, "description": "Multi-architecture disassembly framework", "homepage": "https://github.com/aquynh/capstone", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake", + "host": true + } + ], "features": { "arm": { "description": "Capstone disassembly support for ARM" From d49e40f165ce0561b8aa9bcc0af6ae91bc0e3b2e Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 17 Feb 2022 16:17:06 +0800 Subject: [PATCH 11/17] update version --- versions/c-/capstone.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index 3d3dce310aac04..bfa92dd467b8e3 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "322179773392d3ceb4d8ae894faa968a18375f79", + "git-tree": "ed177dc3e8523b026a70639ccf7882714d0a7995", "version": "4.0.2", "port-version": 3 }, From 45d790d3f3541236d37e8fc7a8da8627c4d0f7a2 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Mon, 21 Feb 2022 19:08:23 +1100 Subject: [PATCH 12/17] checking feature per OS --- ports/capstone/portfile.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index e9edf6cd27b5c8..e2d4f09ca907f2 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -29,6 +29,14 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "static-crt" CAPSTONE_BUILD_STATIC_RUNTIME ) +if ("osxkernel" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "Feature 'osxkernel' only supported in OSX") +endif() + +if ("static-crt" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature 'static-crt' only supported in Windows") +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS From af19fec90e91b91f078c2b4e1033b8f08e10f7f1 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Mon, 21 Feb 2022 19:13:07 +1100 Subject: [PATCH 13/17] update versioning --- versions/c-/capstone.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index bfa92dd467b8e3..686d3b80e9593d 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ed177dc3e8523b026a70639ccf7882714d0a7995", + "git-tree": "1e645c65b70b5ee6e94a9371b479822524fba1c9", "version": "4.0.2", "port-version": 3 }, From b24c4e21dd68ca6b3a955e3146e2121b30a5305d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Mon, 21 Feb 2022 21:26:50 +1100 Subject: [PATCH 14/17] remove check for static CRT on windows so it doesn't conflict with other ports (Triton) --- ports/capstone/portfile.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index e2d4f09ca907f2..57f2bfd57a9830 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -33,10 +33,6 @@ if ("osxkernel" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) message(FATAL_ERROR "Feature 'osxkernel' only supported in OSX") endif() -if ("static-crt" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "Feature 'static-crt' only supported in Windows") -endif() - vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS From b61afa6f78287237656c2a945bb57f25fcad594a Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Mon, 21 Feb 2022 21:30:54 +1100 Subject: [PATCH 15/17] update versioning --- versions/c-/capstone.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index 686d3b80e9593d..dbb1e6e1219a1b 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1e645c65b70b5ee6e94a9371b479822524fba1c9", + "git-tree": "b17d5e945550d7a601132fc223d112dd87990209", "version": "4.0.2", "port-version": 3 }, From de2f6bf152cead624b81f292ed9361ece4940ced Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Mon, 21 Feb 2022 23:21:21 +1100 Subject: [PATCH 16/17] use VCPKG_CRT_LINKAGE instead of feature for CRT --- ports/capstone/portfile.cmake | 3 ++- ports/capstone/vcpkg.json | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index 57f2bfd57a9830..c1d2551f109d83 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CS_BUILD_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CS_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES @@ -26,7 +27,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "x86-reduce" CAPSTONE_X86_REDUCE "xcore" CAPSTONE_XCORE_SUPPORT "diet" CAPSTONE_BUILD_DIET - "static-crt" CAPSTONE_BUILD_STATIC_RUNTIME ) if ("osxkernel" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) @@ -41,6 +41,7 @@ vcpkg_cmake_configure( -DCAPSTONE_BUILD_TESTS=OFF -DCAPSTONE_BUILD_CSTOOL=OFF -DCAPSTONE_X86_ONLY=OFF + -DCAPSTONE_BUILD_STATIC_RUNTIME=${STATIC_CRT} ${FEATURE_OPTIONS} ) diff --git a/ports/capstone/vcpkg.json b/ports/capstone/vcpkg.json index 8eaf441477c61c..85a10568039437 100644 --- a/ports/capstone/vcpkg.json +++ b/ports/capstone/vcpkg.json @@ -45,9 +45,6 @@ "sparc": { "description": "Capstone disassembly support for SPARC" }, - "static-crt": { - "description": "Use Windows C Runtime Library (CRT)" - }, "sysz": { "description": "Capstone disassembly support for SysZ" }, From 9a5260434c0187c23c2c6ce59d8bf2517c374c78 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Mon, 21 Feb 2022 23:23:16 +1100 Subject: [PATCH 17/17] update versioning --- versions/c-/capstone.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/capstone.json b/versions/c-/capstone.json index dbb1e6e1219a1b..6c1661c28de3d0 100644 --- a/versions/c-/capstone.json +++ b/versions/c-/capstone.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b17d5e945550d7a601132fc223d112dd87990209", + "git-tree": "5250715402bf0c970792dafe6947aa810adde0f1", "version": "4.0.2", "port-version": 3 },