From bb08d3e9a2123880720c667f69c42cbb09ba0191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 02:27:59 +0300 Subject: [PATCH 01/84] init --- ports/lief/portfile.cmake | 189 ++++++++++++++++++++++++++++++++++++++ ports/lief/vcpkg.json | 115 +++++++++++++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 ports/lief/portfile.cmake create mode 100644 ports/lief/vcpkg.json diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake new file mode 100644 index 00000000000000..efacb3aea8627e --- /dev/null +++ b/ports/lief/portfile.cmake @@ -0,0 +1,189 @@ +#vcpkg_from_github( +# OUT_SOURCE_PATH SOURCE_PATH +# REPO lief-project/LIEF +# REF ${VERSION} +# SHA512 30f248ce5c77993ccc08a360bfd74562ff1e661233abf7e6017cd11351ee359c67848a1ac4159b82a38e971f41704a6008b8778c817e06ef558efe21b76e04ae +# HEAD_REF master +#) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lief-project/LIEF + REF 0d087c03936977cb7019d7ca52f761a347b80778 + SHA512 b1c59a504cef4a300e6e5e788b87252ab4ff5f2c373170fcb4b91aaf4ac122733ab677684fa2e1a7ffcaacf9fc9ae061157aec4ff821e1f5306bdff1dcb7c630 +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") + +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "target_link_libraries(LIB_LIEF PRIVATE lief_spdlog)" + "find_package(fmt CONFIG REQUIRED)\nfind_package(spdlog CONFIG REQUIRED)\ntarget_link_libraries(LIB_LIEF PRIVATE fmt::fmt spdlog::spdlog)" +) + +vcpkg_replace_string("${SOURCE_PATH}/cmake/LIEFConfig.cmake.in" + [[if("${lib_type}" STREQUAL "static")]] + [[if(1)]] +) + +vcpkg_replace_string("${SOURCE_PATH}/cmake/LIEFConfig.cmake.in" + "include(CMakeFindDependencyMacro)" + "include(CMakeFindDependencyMacro)\nfind_dependency(tl-expected)\nfind_dependency(fmt)\nif(@LIEF_EXTERNAL_MBEDTLS@)\nfind_dependency(MbedTLS)\nendif()" +) + +vcpkg_replace_string("${SOURCE_PATH}/cmake/LIEFConfig.cmake.in" + "if(DEFINED LIEF_INCLUDE_DIR)" + "check_required_components(lief)\nif(DEFINED LIEF_INCLUDE_DIR)" +) + +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "TARGETS LIB_LIEF lief_spdlog" + "TARGETS LIB_LIEF" +) + +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries" + "RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries" +) +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}" + "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries" +) +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}" + "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries" +) + +vcpkg_replace_string("${SOURCE_PATH}/src/BinaryStream/BinaryStream.cpp" + [[#include "third-party/utfcpp.hpp"]] + [[#include ]] +) +vcpkg_replace_string("${SOURCE_PATH}/src/utils.cpp" + [[#include "third-party/utfcpp.hpp"]] + [[#include ]] +) +vcpkg_replace_string("${SOURCE_PATH}/src/PE/Builder.cpp" + [[#include "third-party/utfcpp.hpp"]] + [[#include ]] +) + +vcpkg_replace_string("${SOURCE_PATH}/src/logging.cpp" + [[#include "spdlog/fmt/bundled/args.h"]] + "#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/src/logging.hpp" + "#include " + "#include \n#include " +) +vcpkg_replace_string("${SOURCE_PATH}/src/utils.cpp" + "#include " + "#include \n#include " +) +vcpkg_replace_string("${SOURCE_PATH}/src/internal_utils.hpp" + [[#include "spdlog/fmt/fmt.h"]] + "#include \n#include " +) +vcpkg_replace_string("${SOURCE_PATH}/src/PE/Header.cpp" + "#include " + "#include \n#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/src/PE/OptionalHeader.cpp" + "#include " + "#include \n#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/src/PE/TLS.cpp" + [[#include "spdlog/fmt/fmt.h"]] + "#include \n#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/src/MachO/BuildVersion.cpp" + "#include " + "#include \n#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/src/MachO/SourceVersion.cpp" + [[#include "spdlog/fmt/fmt.h"]] + "#include \n#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/src/MachO/DylibCommand.cpp" + [[#include "spdlog/fmt/fmt.h"]] + "#include \n#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" + [[#include "spdlog/fmt/fmt.h"]] + "#include \n#include " +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "tests" LIEF_TESTS # Enable tests + "c-api" LIEF_C_API # C API + "enable-json" LIEF_ENABLE_JSON # Enable JSON-related APIs + "examples" LIEF_EXAMPLES # Build LIEF C++ examples + "extra-warnings" LIEF_EXTRA_WARNINGS # Enable extra warning from the compiler + "force32" LIEF_FORCE32 # Force build LIEF 32 bits version + "logging" LIEF_LOGGING # Enable logging + "logging-debug" LIEF_LOGGING_DEBUG # Enable debug logging + + "use-ccache" LIEF_USE_CCACHE # Use ccache to speed up compilation + + "elf" LIEF_ELF # Build LIEF with ELF module + "pe" LIEF_PE # Build LIEF with PE module + "macho" LIEF_MACHO # Build LIEF with MachO module + + "oat" LIEF_OAT # Build LIEF with OAT module + "dex" LIEF_DEX # Build LIEF with DEX module + "vdex" LIEF_VDEX # Build LIEF with VDEX module + "art" LIEF_ART # Build LIEF with ART module + + # Sanitizer + "asan" LIEF_ASAN # Enable Address sanitizer + "lsan" LIEF_LSAN # Enable Leak sanitizer + "tsan" LIEF_TSAN # Enable Thread sanitizer + "usan" LIEF_USAN # Enable undefined sanitizer + + # Fuzzer + "fuzzing" LIEF_FUZZING # Fuzz LIEF + + # Profiling + "profiling" LIEF_PROFILING # Enable performance profiling + + INVERTED_FEATURES + "disable-frozen" LIEF_DISABLE_FROZEN # Disable Frozen even if it is supported +) + + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + + -DLIEF_PYTHON_API=OFF + + # Build with external vcpkg dependencies + -DLIEF_OPT_MBEDTLS_EXTERNAL=ON + -DLIEF_EXTERNAL_SPDLOG=ON + -DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON + -DLIEF_OPT_FROZEN_EXTERNAL=ON + -DLIEF_OPT_EXTERNAL_SPAN=ON + -DLIEF_OPT_UTFCPP_EXTERNAL=ON + -DLIEF_OPT_EXTERNAL_EXPECTED=ON +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") \ No newline at end of file diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json new file mode 100644 index 00000000000000..1d9dabb762a65d --- /dev/null +++ b/ports/lief/vcpkg.json @@ -0,0 +1,115 @@ +{ + "name": "lief", + "version-semver": "0.15.1", + "description": "LIEF - Library to Instrument Executable Formats", + "homepage": "https://lief.quarkslab.com", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + "boost-leaf", + "fmt", + "mbedtls", + "spdlog", + "tcb-span", + "tl-expected", + "utfcpp", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "art", + "c-api", + "dex", + "elf", + "enable-frozen", + "enable-json", + "logging", + "macho", + "oat", + "pe", + "vdex" + ], + "features": { + "art": { + "description": "Build LIEF with ART module" + }, + "asan": { + "description": "Enable Address sanitizer" + }, + "c-api": { + "description": "C API" + }, + "dex": { + "description": "Build LIEF with DEX module" + }, + "elf": { + "description": "Build LIEF with ELF module" + }, + "enable-frozen": { + "description": "Enable Frozen", + "dependencies": [ + "frozen" + ] + }, + "enable-json": { + "description": "Enable JSON-related APIs", + "dependencies": [ + "nlohmann-json" + ] + }, + "examples": { + "description": "Build LIEF C++ examples" + }, + "extra-warnings": { + "description": "Enable extra warning from the compiler" + }, + "force32": { + "description": "Force build LIEF 32 bits version" + }, + "fuzzing": { + "description": "Fuzz LIEF" + }, + "logging": { + "description": "Enable logging" + }, + "logging-debug": { + "description": "Enable debug logging" + }, + "lsan": { + "description": "Enable Leak sanitizer" + }, + "macho": { + "description": "Build LIEF with MachO module" + }, + "oat": { + "description": "Build LIEF with OAT module" + }, + "pe": { + "description": "Build LIEF with PE module" + }, + "profiling": { + "description": "Enable performance profiling" + }, + "tests": { + "description": "Enable tests" + }, + "tsan": { + "description": "Enable Thread sanitizer" + }, + "usan": { + "description": "Enable undefined sanitizer" + }, + "use-ccache": { + "description": "Use ccache to speed up compilation" + }, + "vdex": { + "description": "Build LIEF with VDEX module" + } + } +} From 5f08f620c82b0ed56490329fb4dd104813b9ac41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 02:28:29 +0300 Subject: [PATCH 02/84] ver --- versions/baseline.json | 4 ++++ versions/l-/lief.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/l-/lief.json diff --git a/versions/baseline.json b/versions/baseline.json index 139148aadd76de..6265b7f78cf74c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5524,6 +5524,10 @@ "baseline": "2020-11-24", "port-version": 0 }, + "lief": { + "baseline": "0.15.1", + "port-version": 0 + }, "lightgbm": { "baseline": "4.5.0", "port-version": 0 diff --git a/versions/l-/lief.json b/versions/l-/lief.json new file mode 100644 index 00000000000000..1ea3df636606ad --- /dev/null +++ b/versions/l-/lief.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "8deaaec6df3f8396bbc2f2783baa110439b2af4b", + "version-semver": "0.15.1", + "port-version": 0 + } + ] +} From 3ea5f30d8e0ad8e352fe41a205ab05f857424798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:05:58 +0300 Subject: [PATCH 03/84] enforce c++17 --- ports/lief/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index efacb3aea8627e..f6b367f76679f9 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -118,6 +118,11 @@ vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" "#include \n#include " ) +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "enable_language(CXX)" + "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" +) + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES "tests" LIEF_TESTS # Enable tests From 2cd7cf14f38a4f5e869bdb9acccfb79d8084937b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:06:12 +0300 Subject: [PATCH 04/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 1ea3df636606ad..422215090ccad1 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "8deaaec6df3f8396bbc2f2783baa110439b2af4b", + "git-tree": "603b4e5b54fa837f545b2af7dcd7634c003c9957", "version-semver": "0.15.1", "port-version": 0 } From c3a499ff81f87f2d0e648f4d69689bfab497373b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:23:14 +0300 Subject: [PATCH 05/84] push include into src/OAT/utils.cpp --- ports/lief/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index f6b367f76679f9..0f432dd45541f5 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -118,6 +118,11 @@ vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" "#include \n#include " ) +vcpkg_replace_string("${SOURCE_PATH}/src/OAT/utils.cpp" + [[#include "frozen.hpp"]] + "#include \n#include " +) + vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "enable_language(CXX)" "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" From f391c67ec5c9e43fd7383be1905c5b8de748f040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:23:44 +0300 Subject: [PATCH 06/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 422215090ccad1..07e8eaab3a721f 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "603b4e5b54fa837f545b2af7dcd7634c003c9957", + "git-tree": "c9422325fee2bb0f52b965e859990888be62ad62", "version-semver": "0.15.1", "port-version": 0 } From fde85010ed238a2a618f1096259504017e0bd82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:36:42 +0300 Subject: [PATCH 07/84] downgrade to 14 C++ std --- ports/lief/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 0f432dd45541f5..d19ea489bb5425 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -125,7 +125,7 @@ vcpkg_replace_string("${SOURCE_PATH}/src/OAT/utils.cpp" vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "enable_language(CXX)" - "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" + "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS From 991a8886474aa597a47c703bf83db3f2872aa454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:37:01 +0300 Subject: [PATCH 08/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 07e8eaab3a721f..eae1948c9cf3dc 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c9422325fee2bb0f52b965e859990888be62ad62", + "git-tree": "f794435da0397fd8a62829739e76806e3d4bb8e1", "version-semver": "0.15.1", "port-version": 0 } From 2dfaeba42e1e00d4dfb8587fbd073d3a441d10a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:46:01 +0300 Subject: [PATCH 09/84] downgrade to 11 C++ std --- ports/lief/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index d19ea489bb5425..98a98f61989da8 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -125,7 +125,7 @@ vcpkg_replace_string("${SOURCE_PATH}/src/OAT/utils.cpp" vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "enable_language(CXX)" - "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" + "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 11)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS From 6ae9a5793573c30f284a9844f24ab74f6a9f8a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 03:46:18 +0300 Subject: [PATCH 10/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index eae1948c9cf3dc..b7103ae0e25741 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f794435da0397fd8a62829739e76806e3d4bb8e1", + "git-tree": "6f145ed083d08b214a05041f85593bd201209843", "version-semver": "0.15.1", "port-version": 0 } From bea82606b73cc329e3c9f6c8814a55a626791332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 21:57:20 +0300 Subject: [PATCH 11/84] push #include instead & c++14 --- ports/lief/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 98a98f61989da8..996c206cae017e 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -120,12 +120,12 @@ vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" vcpkg_replace_string("${SOURCE_PATH}/src/OAT/utils.cpp" [[#include "frozen.hpp"]] - "#include \n#include " + "#include \n#include " ) vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "enable_language(CXX)" - "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 11)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" + "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS From d94531a0050c17b5aec999e2a9912fcef579261a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 27 Nov 2024 22:10:20 +0300 Subject: [PATCH 12/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index b7103ae0e25741..23683ebf18a446 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "6f145ed083d08b214a05041f85593bd201209843", + "git-tree": "acdb339cec0c6c4d91df51eb87f864d8c3019ea3", "version-semver": "0.15.1", "port-version": 0 } From 8dd31d3fc6813d5fbcb49e081fa976f5ac792ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 05:19:17 +0300 Subject: [PATCH 13/84] enforce frozen --- ports/lief/portfile.cmake | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 996c206cae017e..28fb19961bb60a 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -118,15 +118,15 @@ vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" "#include \n#include " ) -vcpkg_replace_string("${SOURCE_PATH}/src/OAT/utils.cpp" - [[#include "frozen.hpp"]] - "#include \n#include " -) +#vcpkg_replace_string("${SOURCE_PATH}/src/OAT/utils.cpp" +# [[#include "frozen.hpp"]] +# "#include " +#) -vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" - "enable_language(CXX)" - "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" -) +#vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" +# "enable_language(CXX)" +# "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" +#) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES @@ -162,8 +162,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS # Profiling "profiling" LIEF_PROFILING # Enable performance profiling - INVERTED_FEATURES - "disable-frozen" LIEF_DISABLE_FROZEN # Disable Frozen even if it is supported ) @@ -182,6 +180,7 @@ vcpkg_cmake_configure( -DLIEF_OPT_EXTERNAL_SPAN=ON -DLIEF_OPT_UTFCPP_EXTERNAL=ON -DLIEF_OPT_EXTERNAL_EXPECTED=ON + -DLIEF_DISABLE_FROZEN=OFF ) vcpkg_cmake_install() From 7f4b3a966b07971870a3f6a38bd3e29a76096a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 05:19:38 +0300 Subject: [PATCH 14/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 23683ebf18a446..80b32bfecdd2f5 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "acdb339cec0c6c4d91df51eb87f864d8c3019ea3", + "git-tree": "d4153b0c5ffc36d82c03ca3677d8a0d4607e7740", "version-semver": "0.15.1", "port-version": 0 } From ad8799d4a942ab476176b8d9cbd9fc0bdc7c3536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 21:44:31 +0300 Subject: [PATCH 15/84] test android --- ports/lief/portfile.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 28fb19961bb60a..70646bda451b40 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -184,9 +184,11 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() - -vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") - +if (VCPKG_TARGET_TRIPLET STREQUAL "arm64_android" OR VCPKG_TARGET_TRIPLET STREQUAL "x64_android" OR VCPKG_TARGET_TRIPLET STREQUAL "arm_neon_android") + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") +else() + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") +endif() vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE From 73a7bfa3c9e3610f76ff69a514979d4a400aa6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 21:44:52 +0300 Subject: [PATCH 16/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 80b32bfecdd2f5..05d4ecebef2877 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d4153b0c5ffc36d82c03ca3677d8a0d4607e7740", + "git-tree": "da73b52df90d055e01211d6e9547d4fee5eae701", "version-semver": "0.15.1", "port-version": 0 } From 301779135e31e693f707277db03a2a6b5c51e424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 22:20:53 +0300 Subject: [PATCH 17/84] simplify test --- ports/lief/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 70646bda451b40..fe992c0b1067e9 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -184,7 +184,7 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -if (VCPKG_TARGET_TRIPLET STREQUAL "arm64_android" OR VCPKG_TARGET_TRIPLET STREQUAL "x64_android" OR VCPKG_TARGET_TRIPLET STREQUAL "arm_neon_android") +if (VCPKG_TARGET_IS_ANDROID) vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") else() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") From f85f0d1f910136bb6b89ec58d681c32d87b78679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 22:21:12 +0300 Subject: [PATCH 18/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 05d4ecebef2877..798723b9f9b15b 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "da73b52df90d055e01211d6e9547d4fee5eae701", + "git-tree": "f332e4f3d76c75804f4e11d282198950eac50883", "version-semver": "0.15.1", "port-version": 0 } From 61f58eb801b56ce955674af7cb61a1484a0426f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 22:33:52 +0300 Subject: [PATCH 19/84] checking uwp --- ports/lief/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 1d9dabb762a65d..77a26e0418a590 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -4,7 +4,6 @@ "description": "LIEF - Library to Instrument Executable Formats", "homepage": "https://lief.quarkslab.com", "license": "Apache-2.0", - "supports": "!uwp", "dependencies": [ "boost-leaf", "fmt", From 7cf39fcf4563b9d18968c76ba01cdff0367be0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 28 Nov 2024 22:34:10 +0300 Subject: [PATCH 20/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 798723b9f9b15b..208472d690260b 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f332e4f3d76c75804f4e11d282198950eac50883", + "git-tree": "969d56b864a4fda2bc0275070abf05a7146696bc", "version-semver": "0.15.1", "port-version": 0 } From b7f5b4662a71fc51fbb1783b2923a24d0a6fed89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 01:28:29 +0300 Subject: [PATCH 21/84] clean --- ports/lief/portfile.cmake | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index fe992c0b1067e9..e04e404aad9439 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -1,11 +1,3 @@ -#vcpkg_from_github( -# OUT_SOURCE_PATH SOURCE_PATH -# REPO lief-project/LIEF -# REF ${VERSION} -# SHA512 30f248ce5c77993ccc08a360bfd74562ff1e661233abf7e6017cd11351ee359c67848a1ac4159b82a38e971f41704a6008b8778c817e06ef558efe21b76e04ae -# HEAD_REF master -#) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lief-project/LIEF @@ -118,16 +110,6 @@ vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" "#include \n#include " ) -#vcpkg_replace_string("${SOURCE_PATH}/src/OAT/utils.cpp" -# [[#include "frozen.hpp"]] -# "#include " -#) - -#vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" -# "enable_language(CXX)" -# "enable_language(CXX)\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)" -#) - vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES "tests" LIEF_TESTS # Enable tests @@ -184,11 +166,9 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -if (VCPKG_TARGET_IS_ANDROID) - vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") -else() - vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") -endif() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") + vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE @@ -197,4 +177,4 @@ file(REMOVE_RECURSE ) # Handle copyright -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") \ No newline at end of file +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") From 23aedc7f3289d69e2d50260f79230a6f9e74e390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 01:28:48 +0300 Subject: [PATCH 22/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 208472d690260b..d4a71aad9ddeea 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "969d56b864a4fda2bc0275070abf05a7146696bc", + "git-tree": "67c3b09c265fe8bd687b4d4ef61e08c038b5c2e0", "version-semver": "0.15.1", "port-version": 0 } From 243ac62b50e67f1188dba652ee95021f0488646a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 01:39:25 +0300 Subject: [PATCH 23/84] test linux --- ports/lief/portfile.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index e04e404aad9439..312fa9065f0aa5 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -110,6 +110,12 @@ vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" "#include \n#include " ) +if (VCPKG_TARGET_IS_LINUX) + vcpkg_replace_string("${SOURCE_PATH}/src/internal_utils.hpp" + [[#include "LIEF/iterators.hpp"]] + "#include \n#include " +endif() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES "tests" LIEF_TESTS # Enable tests From 8315f34229f45f2caaa551c9fd1546fe227d6ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 01:39:39 +0300 Subject: [PATCH 24/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index d4a71aad9ddeea..87ff7406b8dd69 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "67c3b09c265fe8bd687b4d4ef61e08c038b5c2e0", + "git-tree": "5031f16a883f0d190a1eccf138da626d425f21b3", "version-semver": "0.15.1", "port-version": 0 } From 7552ead101d41388af86e59085009f1ba5b78557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 01:43:05 +0300 Subject: [PATCH 25/84] fix --- ports/lief/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 312fa9065f0aa5..1d7cea73a4256c 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -114,6 +114,7 @@ if (VCPKG_TARGET_IS_LINUX) vcpkg_replace_string("${SOURCE_PATH}/src/internal_utils.hpp" [[#include "LIEF/iterators.hpp"]] "#include \n#include " + ) endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS From a9206d8423a0e5de2204b8d78bd086bc2f8a1256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 01:43:22 +0300 Subject: [PATCH 26/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 87ff7406b8dd69..13f5021cc41da1 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5031f16a883f0d190a1eccf138da626d425f21b3", + "git-tree": "42a0e38de9526f102f6cfdc2514a39bcc600a03c", "version-semver": "0.15.1", "port-version": 0 } From 36819c599800df7541e0f0c4174837b95db14b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 02:17:32 +0300 Subject: [PATCH 27/84] test2 linux --- ports/lief/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 1d7cea73a4256c..9af6fce73eda70 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -170,6 +170,7 @@ vcpkg_cmake_configure( -DLIEF_OPT_UTFCPP_EXTERNAL=ON -DLIEF_OPT_EXTERNAL_EXPECTED=ON -DLIEF_DISABLE_FROZEN=OFF + -DLIEF_DISABLE_EXCEPTIONS=OFF ) vcpkg_cmake_install() From 2a81ceb09e968219bfa7cc4a0d3e4f03279c1cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 02:17:50 +0300 Subject: [PATCH 28/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 13f5021cc41da1..d384c52fd51e2c 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "42a0e38de9526f102f6cfdc2514a39bcc600a03c", + "git-tree": "a88c5722843b13089f363a80fdacf9456a3c30b6", "version-semver": "0.15.1", "port-version": 0 } From c4a2a649e9da9c0b51dbf92db7088be8c1dfd9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 05:10:43 +0300 Subject: [PATCH 29/84] clean --- ports/lief/portfile.cmake | 7 +------ ports/lief/vcpkg.json | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 9af6fce73eda70..884eaf12275362 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_replace_string("${SOURCE_PATH}/cmake/LIEFConfig.cmake.in" vcpkg_replace_string("${SOURCE_PATH}/cmake/LIEFConfig.cmake.in" "include(CMakeFindDependencyMacro)" - "include(CMakeFindDependencyMacro)\nfind_dependency(tl-expected)\nfind_dependency(fmt)\nif(@LIEF_EXTERNAL_MBEDTLS@)\nfind_dependency(MbedTLS)\nendif()" + "include(CMakeFindDependencyMacro)\nfind_dependency(tl-expected)\nfind_dependency(fmt)" ) vcpkg_replace_string("${SOURCE_PATH}/cmake/LIEFConfig.cmake.in" @@ -119,7 +119,6 @@ endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - "tests" LIEF_TESTS # Enable tests "c-api" LIEF_C_API # C API "enable-json" LIEF_ENABLE_JSON # Enable JSON-related APIs "examples" LIEF_EXAMPLES # Build LIEF C++ examples @@ -147,10 +146,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS # Fuzzer "fuzzing" LIEF_FUZZING # Fuzz LIEF - - # Profiling - "profiling" LIEF_PROFILING # Enable performance profiling - ) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 77a26e0418a590..7744572237e39c 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -12,6 +12,7 @@ "tcb-span", "tl-expected", "utfcpp", + "frozen", { "name": "vcpkg-cmake", "host": true @@ -26,7 +27,6 @@ "c-api", "dex", "elf", - "enable-frozen", "enable-json", "logging", "macho", @@ -39,7 +39,8 @@ "description": "Build LIEF with ART module" }, "asan": { - "description": "Enable Address sanitizer" + "description": "Enable Address sanitizer", + "supports": "!windows" }, "c-api": { "description": "C API" @@ -50,12 +51,6 @@ "elf": { "description": "Build LIEF with ELF module" }, - "enable-frozen": { - "description": "Enable Frozen", - "dependencies": [ - "frozen" - ] - }, "enable-json": { "description": "Enable JSON-related APIs", "dependencies": [ @@ -69,10 +64,12 @@ "description": "Enable extra warning from the compiler" }, "force32": { - "description": "Force build LIEF 32 bits version" + "description": "Force build LIEF 32 bits version", + "supports": "!windows" }, "fuzzing": { - "description": "Fuzz LIEF" + "description": "Fuzz LIEF", + "supports": "!windows" }, "logging": { "description": "Enable logging" @@ -81,7 +78,8 @@ "description": "Enable debug logging" }, "lsan": { - "description": "Enable Leak sanitizer" + "description": "Enable Leak sanitizer", + "supports": "!windows" }, "macho": { "description": "Build LIEF with MachO module" @@ -92,17 +90,13 @@ "pe": { "description": "Build LIEF with PE module" }, - "profiling": { - "description": "Enable performance profiling" - }, - "tests": { - "description": "Enable tests" - }, "tsan": { - "description": "Enable Thread sanitizer" + "description": "Enable Thread sanitizer", + "supports": "!windows" }, "usan": { - "description": "Enable undefined sanitizer" + "description": "Enable undefined sanitizer", + "supports": "!windows" }, "use-ccache": { "description": "Use ccache to speed up compilation" From e5436541ef1e0fd498dc2f9706e09242aa055fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 05:11:29 +0300 Subject: [PATCH 30/84] ver --- ports/lief/vcpkg.json | 2 +- versions/l-/lief.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 7744572237e39c..b7e1610f03db9e 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -7,12 +7,12 @@ "dependencies": [ "boost-leaf", "fmt", + "frozen", "mbedtls", "spdlog", "tcb-span", "tl-expected", "utfcpp", - "frozen", { "name": "vcpkg-cmake", "host": true diff --git a/versions/l-/lief.json b/versions/l-/lief.json index d384c52fd51e2c..83917cb3b847cc 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a88c5722843b13089f363a80fdacf9456a3c30b6", + "git-tree": "7d16dd9f75babaaf3d570b85a81017aff92271fe", "version-semver": "0.15.1", "port-version": 0 } From 667b350941e7be44ff1dff4573d776fab5792feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 05:12:33 +0300 Subject: [PATCH 31/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 83917cb3b847cc..b6a58a2e134a4f 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7d16dd9f75babaaf3d570b85a81017aff92271fe", + "git-tree": "5a41b98849815db3d1d6db0df5b29aa73e0d4c94", "version-semver": "0.15.1", "port-version": 0 } From b7fd1d1aec1c1b458c26ba8cd47919b9ad784054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 06:57:01 +0300 Subject: [PATCH 32/84] clean --- ports/lief/portfile.cmake | 1 - ports/lief/vcpkg.json | 212 +++++++++++++++++++------------------- 2 files changed, 104 insertions(+), 109 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 884eaf12275362..f61df57105bdb8 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -123,7 +123,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "enable-json" LIEF_ENABLE_JSON # Enable JSON-related APIs "examples" LIEF_EXAMPLES # Build LIEF C++ examples "extra-warnings" LIEF_EXTRA_WARNINGS # Enable extra warning from the compiler - "force32" LIEF_FORCE32 # Force build LIEF 32 bits version "logging" LIEF_LOGGING # Enable logging "logging-debug" LIEF_LOGGING_DEBUG # Enable debug logging diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index b7e1610f03db9e..af1ffc35cc93fe 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -1,108 +1,104 @@ -{ - "name": "lief", - "version-semver": "0.15.1", - "description": "LIEF - Library to Instrument Executable Formats", - "homepage": "https://lief.quarkslab.com", - "license": "Apache-2.0", - "dependencies": [ - "boost-leaf", - "fmt", - "frozen", - "mbedtls", - "spdlog", - "tcb-span", - "tl-expected", - "utfcpp", - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ], - "default-features": [ - "art", - "c-api", - "dex", - "elf", - "enable-json", - "logging", - "macho", - "oat", - "pe", - "vdex" - ], - "features": { - "art": { - "description": "Build LIEF with ART module" - }, - "asan": { - "description": "Enable Address sanitizer", - "supports": "!windows" - }, - "c-api": { - "description": "C API" - }, - "dex": { - "description": "Build LIEF with DEX module" - }, - "elf": { - "description": "Build LIEF with ELF module" - }, - "enable-json": { - "description": "Enable JSON-related APIs", - "dependencies": [ - "nlohmann-json" - ] - }, - "examples": { - "description": "Build LIEF C++ examples" - }, - "extra-warnings": { - "description": "Enable extra warning from the compiler" - }, - "force32": { - "description": "Force build LIEF 32 bits version", - "supports": "!windows" - }, - "fuzzing": { - "description": "Fuzz LIEF", - "supports": "!windows" - }, - "logging": { - "description": "Enable logging" - }, - "logging-debug": { - "description": "Enable debug logging" - }, - "lsan": { - "description": "Enable Leak sanitizer", - "supports": "!windows" - }, - "macho": { - "description": "Build LIEF with MachO module" - }, - "oat": { - "description": "Build LIEF with OAT module" - }, - "pe": { - "description": "Build LIEF with PE module" - }, - "tsan": { - "description": "Enable Thread sanitizer", - "supports": "!windows" - }, - "usan": { - "description": "Enable undefined sanitizer", - "supports": "!windows" - }, - "use-ccache": { - "description": "Use ccache to speed up compilation" - }, - "vdex": { - "description": "Build LIEF with VDEX module" - } - } -} +{ + "name": "lief", + "version-semver": "0.15.1", + "description": "LIEF - Library to Instrument Executable Formats", + "homepage": "https://lief.quarkslab.com", + "license": "Apache-2.0", + "dependencies": [ + "boost-leaf", + "fmt", + "frozen", + "mbedtls", + "spdlog", + "tcb-span", + "tl-expected", + "utfcpp", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "art", + "c-api", + "dex", + "elf", + "enable-json", + "logging", + "macho", + "oat", + "pe", + "vdex" + ], + "features": { + "art": { + "description": "Build LIEF with ART module" + }, + "asan": { + "description": "Enable Address sanitizer", + "supports": "!windows & !uwp" + }, + "c-api": { + "description": "C API" + }, + "dex": { + "description": "Build LIEF with DEX module" + }, + "elf": { + "description": "Build LIEF with ELF module" + }, + "enable-json": { + "description": "Enable JSON-related APIs", + "dependencies": [ + "nlohmann-json" + ] + }, + "examples": { + "description": "Build LIEF C++ examples" + }, + "extra-warnings": { + "description": "Enable extra warning from the compiler" + }, + "fuzzing": { + "description": "Fuzz LIEF", + "supports": "!windows & !uwp" + }, + "logging": { + "description": "Enable logging" + }, + "logging-debug": { + "description": "Enable debug logging" + }, + "lsan": { + "description": "Enable Leak sanitizer", + "supports": "!windows & !uwp" + }, + "macho": { + "description": "Build LIEF with MachO module" + }, + "oat": { + "description": "Build LIEF with OAT module" + }, + "pe": { + "description": "Build LIEF with PE module" + }, + "tsan": { + "description": "Enable Thread sanitizer", + "supports": "!windows & !uwp" + }, + "usan": { + "description": "Enable undefined sanitizer", + "supports": "!windows & !uwp" + }, + "use-ccache": { + "description": "Use ccache to speed up compilation" + }, + "vdex": { + "description": "Build LIEF with VDEX module" + } + } + } From 235391443b25cfe708f49c8d4baeb92a013b06db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 06:57:25 +0300 Subject: [PATCH 33/84] ver --- ports/lief/vcpkg.json | 208 +++++++++++++++++++++--------------------- versions/l-/lief.json | 2 +- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index af1ffc35cc93fe..1389979c45d6e7 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -1,104 +1,104 @@ -{ - "name": "lief", - "version-semver": "0.15.1", - "description": "LIEF - Library to Instrument Executable Formats", - "homepage": "https://lief.quarkslab.com", - "license": "Apache-2.0", - "dependencies": [ - "boost-leaf", - "fmt", - "frozen", - "mbedtls", - "spdlog", - "tcb-span", - "tl-expected", - "utfcpp", - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ], - "default-features": [ - "art", - "c-api", - "dex", - "elf", - "enable-json", - "logging", - "macho", - "oat", - "pe", - "vdex" - ], - "features": { - "art": { - "description": "Build LIEF with ART module" - }, - "asan": { - "description": "Enable Address sanitizer", - "supports": "!windows & !uwp" - }, - "c-api": { - "description": "C API" - }, - "dex": { - "description": "Build LIEF with DEX module" - }, - "elf": { - "description": "Build LIEF with ELF module" - }, - "enable-json": { - "description": "Enable JSON-related APIs", - "dependencies": [ - "nlohmann-json" - ] - }, - "examples": { - "description": "Build LIEF C++ examples" - }, - "extra-warnings": { - "description": "Enable extra warning from the compiler" - }, - "fuzzing": { - "description": "Fuzz LIEF", - "supports": "!windows & !uwp" - }, - "logging": { - "description": "Enable logging" - }, - "logging-debug": { - "description": "Enable debug logging" - }, - "lsan": { - "description": "Enable Leak sanitizer", - "supports": "!windows & !uwp" - }, - "macho": { - "description": "Build LIEF with MachO module" - }, - "oat": { - "description": "Build LIEF with OAT module" - }, - "pe": { - "description": "Build LIEF with PE module" - }, - "tsan": { - "description": "Enable Thread sanitizer", - "supports": "!windows & !uwp" - }, - "usan": { - "description": "Enable undefined sanitizer", - "supports": "!windows & !uwp" - }, - "use-ccache": { - "description": "Use ccache to speed up compilation" - }, - "vdex": { - "description": "Build LIEF with VDEX module" - } - } - } +{ + "name": "lief", + "version-semver": "0.15.1", + "description": "LIEF - Library to Instrument Executable Formats", + "homepage": "https://lief.quarkslab.com", + "license": "Apache-2.0", + "dependencies": [ + "boost-leaf", + "fmt", + "frozen", + "mbedtls", + "spdlog", + "tcb-span", + "tl-expected", + "utfcpp", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "art", + "c-api", + "dex", + "elf", + "enable-json", + "logging", + "macho", + "oat", + "pe", + "vdex" + ], + "features": { + "art": { + "description": "Build LIEF with ART module" + }, + "asan": { + "description": "Enable Address sanitizer", + "supports": "!windows & !uwp" + }, + "c-api": { + "description": "C API" + }, + "dex": { + "description": "Build LIEF with DEX module" + }, + "elf": { + "description": "Build LIEF with ELF module" + }, + "enable-json": { + "description": "Enable JSON-related APIs", + "dependencies": [ + "nlohmann-json" + ] + }, + "examples": { + "description": "Build LIEF C++ examples" + }, + "extra-warnings": { + "description": "Enable extra warning from the compiler" + }, + "fuzzing": { + "description": "Fuzz LIEF", + "supports": "!windows & !uwp" + }, + "logging": { + "description": "Enable logging" + }, + "logging-debug": { + "description": "Enable debug logging" + }, + "lsan": { + "description": "Enable Leak sanitizer", + "supports": "!windows & !uwp" + }, + "macho": { + "description": "Build LIEF with MachO module" + }, + "oat": { + "description": "Build LIEF with OAT module" + }, + "pe": { + "description": "Build LIEF with PE module" + }, + "tsan": { + "description": "Enable Thread sanitizer", + "supports": "!windows & !uwp" + }, + "usan": { + "description": "Enable undefined sanitizer", + "supports": "!windows & !uwp" + }, + "use-ccache": { + "description": "Use ccache to speed up compilation" + }, + "vdex": { + "description": "Build LIEF with VDEX module" + } + } +} diff --git a/versions/l-/lief.json b/versions/l-/lief.json index b6a58a2e134a4f..3a154ffa9b2599 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5a41b98849815db3d1d6db0df5b29aa73e0d4c94", + "git-tree": "0bca4ece0f2c286f068c4e3fff9794e58d092dff", "version-semver": "0.15.1", "port-version": 0 } From df580df4252d652a7b107febbfebf6a68b4252c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 29 Nov 2024 06:57:46 +0300 Subject: [PATCH 34/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 3a154ffa9b2599..6cfb5c21feaaf2 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0bca4ece0f2c286f068c4e3fff9794e58d092dff", + "git-tree": "53c97539c3184c2abf6e287c123c6585b6ec2fc3", "version-semver": "0.15.1", "port-version": 0 } From b29d770e8c9217e37e1465bcb02d549327a43232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 17:10:08 +0300 Subject: [PATCH 35/84] test --- ports/lief/portfile.cmake | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index f61df57105bdb8..f7e335483146b8 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -169,7 +169,37 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(REMOVE + "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" + "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" + ) + file(RENAME + "${CURRENT_PACKAGES_DIR}/lib" + "${CURRENT_PACKAGES_DIR}/bin" + ) + file(RENAME + "${CURRENT_PACKAGES_DIR}/debug/lib" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) + + file(MAKE_DIRECTORY + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" + "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" + ) + file(RENAME + "${CURRENT_PACKAGES_DIR}/bin/pkgconfig/LIEF.pc" + "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/LIEF.pc" + ) + file(RENAME + "${CURRENT_PACKAGES_DIR}/debug/bin/pkgconfig/LIEF.pc" + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/LIEF.pc" + ) + + vcpkg_cmake_config_fixup(CONFIG_PATH "bin/cmake/LIEF") +else() + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") +endif() vcpkg_fixup_pkgconfig() From ca48233b0117b138a0cbb6241176bafa7deca961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 17:10:25 +0300 Subject: [PATCH 36/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 6cfb5c21feaaf2..aa6a22147243d0 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "53c97539c3184c2abf6e287c123c6585b6ec2fc3", + "git-tree": "391778fe558b07a14637800bf60d474b26bbfbd8", "version-semver": "0.15.1", "port-version": 0 } From 4bc73c3ee2244216ec40d46f9fd6db692da833bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 17:28:14 +0300 Subject: [PATCH 37/84] fix2 --- ports/lief/portfile.cmake | 6 +++++- ports/lief/vcpkg.json | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index f7e335483146b8..6b815be89cc610 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -170,6 +170,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" @@ -195,7 +196,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") "${CURRENT_PACKAGES_DIR}/debug/bin/pkgconfig/LIEF.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/LIEF.pc" ) - + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin/pkgconfig" + "${CURRENT_PACKAGES_DIR}/debug/bin/pkgconfig" + ) vcpkg_cmake_config_fixup(CONFIG_PATH "bin/cmake/LIEF") else() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 1389979c45d6e7..a444a53858e883 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -5,7 +5,6 @@ "homepage": "https://lief.quarkslab.com", "license": "Apache-2.0", "dependencies": [ - "boost-leaf", "fmt", "frozen", "mbedtls", From d7f5c63babea3a3bb0c1408394ae4b1a9542debb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 17:28:30 +0300 Subject: [PATCH 38/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index aa6a22147243d0..288d09a7864d93 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "391778fe558b07a14637800bf60d474b26bbfbd8", + "git-tree": "b84063497888a40618fa5d69803c5ee7bfa79639", "version-semver": "0.15.1", "port-version": 0 } From 756a4fbcf0e233d478a2b51e6e6d5b3e0c8da7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 18:11:32 +0300 Subject: [PATCH 39/84] fix3 --- ports/lief/portfile.cmake | 51 ++++++++++++--------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 6b815be89cc610..7bdb8bd376b9e2 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -169,41 +169,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) - file(REMOVE - "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" - "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" - ) - file(RENAME - "${CURRENT_PACKAGES_DIR}/lib" - "${CURRENT_PACKAGES_DIR}/bin" - ) - file(RENAME - "${CURRENT_PACKAGES_DIR}/debug/lib" - "${CURRENT_PACKAGES_DIR}/debug/bin" - ) - - file(MAKE_DIRECTORY - "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" - "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" - ) - file(RENAME - "${CURRENT_PACKAGES_DIR}/bin/pkgconfig/LIEF.pc" - "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/LIEF.pc" - ) - file(RENAME - "${CURRENT_PACKAGES_DIR}/debug/bin/pkgconfig/LIEF.pc" - "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/LIEF.pc" - ) - file(REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/bin/pkgconfig" - "${CURRENT_PACKAGES_DIR}/debug/bin/pkgconfig" - ) - vcpkg_cmake_config_fixup(CONFIG_PATH "bin/cmake/LIEF") -else() - vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") -endif() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") vcpkg_fixup_pkgconfig() @@ -214,3 +180,18 @@ file(REMOVE_RECURSE # Handle copyright vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS) + file(MAKE_DIRECTORY + "${CURRENT_PACKAGES_DIR}/debug/bin" + "${CURRENT_PACKAGES_DIR}/bin" + ) + file(RENAME + "${CURRENT_PACKAGES_DIR}/lib/LIEF.dll" + "${CURRENT_PACKAGES_DIR}/bin/LIEF.dll" + ) + file(RENAME + "${CURRENT_PACKAGES_DIR}/debug/lib/LIEF.dll" + "${CURRENT_PACKAGES_DIR}/debug/bin/LIEF.dll" + ) +endif() \ No newline at end of file From f58b4bd79fafe264a9e9f0d93a2f6cc800dc726c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 18:11:51 +0300 Subject: [PATCH 40/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 288d09a7864d93..325b03a0a53a52 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b84063497888a40618fa5d69803c5ee7bfa79639", + "git-tree": "eeeae79c2887432325b3d04385a8b689e2d2db26", "version-semver": "0.15.1", "port-version": 0 } From 0f043ae22a2b46c3dd18727a46bfa297cba7cd4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 18:13:33 +0300 Subject: [PATCH 41/84] fix4 --- ports/lief/portfile.cmake | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 7bdb8bd376b9e2..58181631565cd7 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -169,19 +169,11 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") - -vcpkg_fixup_pkgconfig() - -file(REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/debug/include" - "${CURRENT_PACKAGES_DIR}/debug/share" -) - -# Handle copyright -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS) + file(REMOVE + "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" + "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" + ) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin" @@ -194,4 +186,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS) "${CURRENT_PACKAGES_DIR}/debug/lib/LIEF.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/LIEF.dll" ) -endif() \ No newline at end of file +endif() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") From 834178f9f117c461f772ac258624268de74dc81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 18:13:55 +0300 Subject: [PATCH 42/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 325b03a0a53a52..5a3def4afedb56 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "eeeae79c2887432325b3d04385a8b689e2d2db26", + "git-tree": "7a33f302ad9b08e25c274dd60e6d0712566385df", "version-semver": "0.15.1", "port-version": 0 } From d09196d6f7a08b4530df94c91169fccb57014546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 19:00:50 +0300 Subject: [PATCH 43/84] fix5 --- ports/lief/portfile.cmake | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 58181631565cd7..d7c5ff91a37287 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -117,6 +117,13 @@ if (VCPKG_TARGET_IS_LINUX) ) endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string( + "${SOURCE_PATH}/CMakeLists.txt", + "enable_language(C)" + "enable_language(C)\nadd_definitions(-DLIEF_IMPORT)") +endif() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES "c-api" LIEF_C_API # C API @@ -147,14 +154,10 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "fuzzing" LIEF_FUZZING # Fuzz LIEF ) - vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} - - -DLIEF_PYTHON_API=OFF - # Build with external vcpkg dependencies -DLIEF_OPT_MBEDTLS_EXTERNAL=ON -DLIEF_EXTERNAL_SPDLOG=ON @@ -169,20 +172,21 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS) - file(REMOVE +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" ) - file(MAKE_DIRECTORY + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin" ) - file(RENAME + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/LIEF.dll" "${CURRENT_PACKAGES_DIR}/bin/LIEF.dll" ) - file(RENAME + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/LIEF.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/LIEF.dll" ) From 3b311d60b9bfe2b6fed3a41a85bb15c5391d2e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 19:01:10 +0300 Subject: [PATCH 44/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 5a3def4afedb56..e7aa229397b108 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7a33f302ad9b08e25c274dd60e6d0712566385df", + "git-tree": "cbee51a81477ab2d55e61ee0aa9dd0ad59be3540", "version-semver": "0.15.1", "port-version": 0 } From 084abebc56c459ffbdc1b0e4d852e9ebe6d5435b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 23:16:28 +0300 Subject: [PATCH 45/84] test --- ports/lief/portfile.cmake | 71 +++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index d7c5ff91a37287..d41eb99416af19 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -32,17 +32,10 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "TARGETS LIB_LIEF" ) -vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" - "RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries" - "RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries" -) -vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" - "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}" - "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries" -) + vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}" - "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries" + "ARCHIVE DESTINATION lib" ) vcpkg_replace_string("${SOURCE_PATH}/src/BinaryStream/BinaryStream.cpp" @@ -117,13 +110,6 @@ if (VCPKG_TARGET_IS_LINUX) ) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_replace_string( - "${SOURCE_PATH}/CMakeLists.txt", - "enable_language(C)" - "enable_language(C)\nadd_definitions(-DLIEF_IMPORT)") -endif() - vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES "c-api" LIEF_C_API # C API @@ -158,6 +144,7 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} + -DBUILD_SHARED_LIBS=ON # Build with external vcpkg dependencies -DLIEF_OPT_MBEDTLS_EXTERNAL=ON -DLIEF_EXTERNAL_SPDLOG=ON @@ -173,23 +160,57 @@ vcpkg_cmake_configure( vcpkg_cmake_install() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + # Remove the static export cmake files file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" ) + + # Create necessary directories for debug/bin and bin file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin" ) - file(RENAME - "${CURRENT_PACKAGES_DIR}/lib/LIEF.dll" - "${CURRENT_PACKAGES_DIR}/bin/LIEF.dll" - ) - file(RENAME - "${CURRENT_PACKAGES_DIR}/debug/lib/LIEF.dll" - "${CURRENT_PACKAGES_DIR}/debug/bin/LIEF.dll" - ) + + # Move all files (excluding folders) from lib to bin + file(GLOB all_files_in_lib "${CURRENT_PACKAGES_DIR}/lib/*") # Get all contents of the lib directory + foreach(item IN LISTS all_files_in_lib) + if(NOT IS_DIRECTORY "${item}") # Check if the item is NOT a directory + get_filename_component(filename "${item}" NAME) # Extract the filename + file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/bin/${filename}") # Move the file + endif() + endforeach() + + # Move all files (excluding folders) from debug/lib to debug/bin + file(GLOB all_files_in_debug_lib "${CURRENT_PACKAGES_DIR}/debug/lib/*") # Get all contents of the debug/lib directory + foreach(item IN LISTS all_files_in_debug_lib) + if(NOT IS_DIRECTORY "${item}") # Check if the item is NOT a directory + get_filename_component(filename "${item}" NAME) # Extract the filename + file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/debug/bin/${filename}") # Move the file + endif() + endforeach() + + # Move all files from liblib to lib + file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/liblib/*") # Get all files in liblib + foreach(file_path IN LISTS liblib_files) + get_filename_component(filename "${file_path}" NAME) # Extract the filename + file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/lib/${filename}") # Move file to lib + endforeach() + + # Remove the liblib directory + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/liblib") + + # Move all files from liblib to lib + file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/debug/liblib/*") # Get all files in liblib + foreach(file_path IN LISTS liblib_files) + get_filename_component(filename "${file_path}" NAME) # Extract the filename + file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/debug/lib/${filename}") # Move file to lib + endforeach() + + # Remove the liblib directory + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/liblib") + + endif() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") From 32191c3bfa3fc93b70f0f2c49e58b723b0cdbef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 3 Dec 2024 23:16:49 +0300 Subject: [PATCH 46/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index e7aa229397b108..9f9752f41218f4 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cbee51a81477ab2d55e61ee0aa9dd0ad59be3540", + "git-tree": "393ea33cdac7173bb0bcc3944187eb48f3833b96", "version-semver": "0.15.1", "port-version": 0 } From 8116f9b454b20626d3cbcd444f9248ab9fbaacf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 01:37:11 +0300 Subject: [PATCH 47/84] test --- ports/lief/portfile.cmake | 80 +++++++++++++++++++++++++++------------ 1 file changed, 55 insertions(+), 25 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index d41eb99416af19..ce9a9a050c8d6a 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -32,7 +32,6 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "TARGETS LIB_LIEF" ) - vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}" "ARCHIVE DESTINATION lib" @@ -160,61 +159,92 @@ vcpkg_cmake_configure( vcpkg_cmake_install() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - # Remove the static export cmake files file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" ) - # Create necessary directories for debug/bin and bin file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin" ) - # Move all files (excluding folders) from lib to bin - file(GLOB all_files_in_lib "${CURRENT_PACKAGES_DIR}/lib/*") # Get all contents of the lib directory + file(GLOB all_files_in_lib "${CURRENT_PACKAGES_DIR}/lib/*") foreach(item IN LISTS all_files_in_lib) - if(NOT IS_DIRECTORY "${item}") # Check if the item is NOT a directory - get_filename_component(filename "${item}" NAME) # Extract the filename - file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/bin/${filename}") # Move the file + if(NOT IS_DIRECTORY "${item}") + get_filename_component(filename "${item}" NAME) + file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/bin/${filename}") endif() endforeach() - # Move all files (excluding folders) from debug/lib to debug/bin - file(GLOB all_files_in_debug_lib "${CURRENT_PACKAGES_DIR}/debug/lib/*") # Get all contents of the debug/lib directory + file(GLOB all_files_in_debug_lib "${CURRENT_PACKAGES_DIR}/debug/lib/*") foreach(item IN LISTS all_files_in_debug_lib) - if(NOT IS_DIRECTORY "${item}") # Check if the item is NOT a directory - get_filename_component(filename "${item}" NAME) # Extract the filename - file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/debug/bin/${filename}") # Move the file + if(NOT IS_DIRECTORY "${item}") + get_filename_component(filename "${item}" NAME) + file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/debug/bin/${filename}") endif() endforeach() - # Move all files from liblib to lib - file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/liblib/*") # Get all files in liblib + file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/liblib/*") foreach(file_path IN LISTS liblib_files) - get_filename_component(filename "${file_path}" NAME) # Extract the filename - file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/lib/${filename}") # Move file to lib + get_filename_component(filename "${file_path}" NAME) + file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/lib/${filename}") endforeach() - # Remove the liblib directory file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/liblib") - # Move all files from liblib to lib - file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/debug/liblib/*") # Get all files in liblib + file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/debug/liblib/*") foreach(file_path IN LISTS liblib_files) - get_filename_component(filename "${file_path}" NAME) # Extract the filename - file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/debug/lib/${filename}") # Move file to lib + get_filename_component(filename "${file_path}" NAME) + file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/debug/lib/${filename}") endforeach() - # Remove the liblib directory file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/liblib") - - endif() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + [[IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/liblib]] + [[IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib]] + ) + + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + [[IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib]] + [[IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin]] + ) + + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/liblib]] + [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/lib]] + ) + + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + [[" "${_IMPORT_PREFIX}/lib]] + [[" "${_IMPORT_PREFIX}/bin]] + ) + + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + [[IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/liblib]] + [[IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib]] + ) + + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + [[IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/lib]] + [[IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin]] + ) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/debug/liblib]] + [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/debug/lib]] + ) + + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + [[" "${_IMPORT_PREFIX}/debug/lib]] + [[" "${_IMPORT_PREFIX}/debug/bin]] + ) + +endif() vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE From 5b0da051f9bf20a271e547f967c75316eb13d47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 01:37:28 +0300 Subject: [PATCH 48/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 9f9752f41218f4..ca04ca8bf69686 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "393ea33cdac7173bb0bcc3944187eb48f3833b96", + "git-tree": "d4ea0e832faa21a51d88dabdb1385c81e10e9f13", "version-semver": "0.15.1", "port-version": 0 } From a57caeaeb03a26954821b01e06b0bdf502c527d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 03:35:00 +0300 Subject: [PATCH 49/84] release --- ports/lief/portfile.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index ce9a9a050c8d6a..ee8e0e01e8cf4d 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -245,6 +245,12 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") ) endif() + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFConfig.cmake" + [[include("${LIEF_${lib_type}_export}")]] + [[include("${CMAKE_CURRENT_LIST_DIR}/LIEFExport-${lib_type}.cmake")]] +) + vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE From e13c4751d843f031ce3e6490cd05c56640200c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 03:35:20 +0300 Subject: [PATCH 50/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index ca04ca8bf69686..42974394be4fb3 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d4ea0e832faa21a51d88dabdb1385c81e10e9f13", + "git-tree": "1e079d7003c85c7ee0b4d4d5ee2cdb08e1bd859c", "version-semver": "0.15.1", "port-version": 0 } From 08938ed6bd5c61260dcc5379db4690a97220bc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 03:52:36 +0300 Subject: [PATCH 51/84] test for linux --- ports/lief/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index ee8e0e01e8cf4d..6ea969aaf4af73 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -246,7 +246,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") endif() -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFConfig.cmake" +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFConfig.cmake" [[include("${LIEF_${lib_type}_export}")]] [[include("${CMAKE_CURRENT_LIST_DIR}/LIEFExport-${lib_type}.cmake")]] ) From c4dfaa5e2a131f1a19c2396c6546440e3eb1438b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 03:52:56 +0300 Subject: [PATCH 52/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 42974394be4fb3..64959fa8b38a50 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1e079d7003c85c7ee0b4d4d5ee2cdb08e1bd859c", + "git-tree": "17eebd75f856de1955fabf926ce47002e7b21570", "version-semver": "0.15.1", "port-version": 0 } From 09db38163f471636bae81438f2d9737743ff4e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 04:01:44 +0300 Subject: [PATCH 53/84] clean --- ports/lief/portfile.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 6ea969aaf4af73..5ca249ed995dee 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -204,42 +204,42 @@ endif() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" [[IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/liblib]] [[IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib]] ) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" [[IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib]] [[IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin]] ) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/liblib]] [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/lib]] ) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-release.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" [[" "${_IMPORT_PREFIX}/lib]] [[" "${_IMPORT_PREFIX}/bin]] ) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" [[IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/liblib]] [[IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib]] ) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" [[IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/lib]] [[IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin]] ) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/debug/liblib]] [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/debug/lib]] ) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/LIEF/LIEFExport-shared-debug.cmake" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" [[" "${_IMPORT_PREFIX}/debug/lib]] [[" "${_IMPORT_PREFIX}/debug/bin]] ) From ad62504220d4bd1b3430be26bb5244c1b3eebe76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 04:02:02 +0300 Subject: [PATCH 54/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 64959fa8b38a50..9b8b8bab6bec56 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "17eebd75f856de1955fabf926ce47002e7b21570", + "git-tree": "9fe59859e2aaa5edb2e143a73e1edac805c218d3", "version-semver": "0.15.1", "port-version": 0 } From 1e1ba2a5d4a2b0ff75b91c5ceebc455767c42b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 04:24:43 +0300 Subject: [PATCH 55/84] usage --- ports/lief/portfile.cmake | 2 +- ports/lief/usage | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 ports/lief/usage diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 5ca249ed995dee..6e951a52c478e9 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -258,5 +258,5 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" ) -# Handle copyright +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/lief/usage b/ports/lief/usage new file mode 100644 index 00000000000000..8a738c9f0f8e6a --- /dev/null +++ b/ports/lief/usage @@ -0,0 +1,9 @@ +lief provides CMake targets: + + find_package(LIEF CONFIG REQUIRED) + target_link_libraries(main PRIVATE LIEF::LIEF) + +lief provides pkg-config modules: + + # Library to Instrument Executable Formats + LIEF \ No newline at end of file From 0261c79ce6f51efcac6075e59087ff1a8b9d491f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 4 Dec 2024 04:25:02 +0300 Subject: [PATCH 56/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 9b8b8bab6bec56..df27611ebad8b6 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9fe59859e2aaa5edb2e143a73e1edac805c218d3", + "git-tree": "54e4fda69e205a714341dca7a12b85d4bc137b2e", "version-semver": "0.15.1", "port-version": 0 } From 4115000306c1f321679cbc784fae7990414c17b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 5 Dec 2024 08:59:56 +0300 Subject: [PATCH 57/84] fuzzing & sanitizer remove --- ports/lief/portfile.cmake | 9 --------- ports/lief/vcpkg.json | 20 -------------------- 2 files changed, 29 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 6e951a52c478e9..c0f5da212a8c11 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -128,15 +128,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "dex" LIEF_DEX # Build LIEF with DEX module "vdex" LIEF_VDEX # Build LIEF with VDEX module "art" LIEF_ART # Build LIEF with ART module - - # Sanitizer - "asan" LIEF_ASAN # Enable Address sanitizer - "lsan" LIEF_LSAN # Enable Leak sanitizer - "tsan" LIEF_TSAN # Enable Thread sanitizer - "usan" LIEF_USAN # Enable undefined sanitizer - - # Fuzzer - "fuzzing" LIEF_FUZZING # Fuzz LIEF ) vcpkg_cmake_configure( diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index a444a53858e883..a6a05ca70b0a1f 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -37,10 +37,6 @@ "art": { "description": "Build LIEF with ART module" }, - "asan": { - "description": "Enable Address sanitizer", - "supports": "!windows & !uwp" - }, "c-api": { "description": "C API" }, @@ -62,20 +58,12 @@ "extra-warnings": { "description": "Enable extra warning from the compiler" }, - "fuzzing": { - "description": "Fuzz LIEF", - "supports": "!windows & !uwp" - }, "logging": { "description": "Enable logging" }, "logging-debug": { "description": "Enable debug logging" }, - "lsan": { - "description": "Enable Leak sanitizer", - "supports": "!windows & !uwp" - }, "macho": { "description": "Build LIEF with MachO module" }, @@ -85,14 +73,6 @@ "pe": { "description": "Build LIEF with PE module" }, - "tsan": { - "description": "Enable Thread sanitizer", - "supports": "!windows & !uwp" - }, - "usan": { - "description": "Enable undefined sanitizer", - "supports": "!windows & !uwp" - }, "use-ccache": { "description": "Use ccache to speed up compilation" }, From 06e5138b00369d5a1f4d425bdcf847a7f8b62be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 5 Dec 2024 09:00:27 +0300 Subject: [PATCH 58/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index df27611ebad8b6..7a912e5c1f3349 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "54e4fda69e205a714341dca7a12b85d4bc137b2e", + "git-tree": "1ddd40870b189aa044b87c657618383c3eef9139", "version-semver": "0.15.1", "port-version": 0 } From f066b24f6f90f8a6b62db157286b0d5441bcecc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 5 Dec 2024 15:58:49 +0300 Subject: [PATCH 59/84] optimize --- ports/lief/portfile.cmake | 112 ++++++++------------------------------ 1 file changed, 24 insertions(+), 88 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index c0f5da212a8c11..d1196d51a9248e 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -33,8 +33,30 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" ) vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" - "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}" - "ARCHIVE DESTINATION lib" + [[set(CMAKE_INSTALL_LIBDIR "lib")]] + [[#set(CMAKE_INSTALL_LIBDIR "lib")]] +) +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "set(CMAKE_INSTALL_LIBDIR \"lib\")" + "#[[set(CMAKE_INSTALL_LIBDIR \"lib\")" +) + +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" +"set(CMAKE_INSTALL_DATAROOTDIR \"share\")" +"set(CMAKE_INSTALL_DATAROOTDIR \"share\")]]\nset(CMAKE_INSTALL_INCLUDEDIR \"include\")" +) +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + "COMPONENT libraries" + " " +) +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + [[ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}]] + " " +) + +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" + [[RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}]] + " " ) vcpkg_replace_string("${SOURCE_PATH}/src/BinaryStream/BinaryStream.cpp" @@ -149,93 +171,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(REMOVE - "${CURRENT_PACKAGES_DIR}/lib/cmake/LIEF/LIEFExport-static.cmake" - "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/LIEF/LIEFExport-static.cmake" - ) - - file(MAKE_DIRECTORY - "${CURRENT_PACKAGES_DIR}/debug/bin" - "${CURRENT_PACKAGES_DIR}/bin" - ) - - file(GLOB all_files_in_lib "${CURRENT_PACKAGES_DIR}/lib/*") - foreach(item IN LISTS all_files_in_lib) - if(NOT IS_DIRECTORY "${item}") - get_filename_component(filename "${item}" NAME) - file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/bin/${filename}") - endif() - endforeach() - - file(GLOB all_files_in_debug_lib "${CURRENT_PACKAGES_DIR}/debug/lib/*") - foreach(item IN LISTS all_files_in_debug_lib) - if(NOT IS_DIRECTORY "${item}") - get_filename_component(filename "${item}" NAME) - file(RENAME "${item}" "${CURRENT_PACKAGES_DIR}/debug/bin/${filename}") - endif() - endforeach() - - file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/liblib/*") - foreach(file_path IN LISTS liblib_files) - get_filename_component(filename "${file_path}" NAME) - file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/lib/${filename}") - endforeach() - - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/liblib") - - file(GLOB liblib_files "${CURRENT_PACKAGES_DIR}/debug/liblib/*") - foreach(file_path IN LISTS liblib_files) - get_filename_component(filename "${file_path}" NAME) - file(RENAME "${file_path}" "${CURRENT_PACKAGES_DIR}/debug/lib/${filename}") - endforeach() - - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/liblib") -endif() - vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" - [[IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/liblib]] - [[IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib]] - ) - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" - [[IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib]] - [[IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin]] - ) - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" - [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/liblib]] - [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/lib]] - ) - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-release.cmake" - [[" "${_IMPORT_PREFIX}/lib]] - [[" "${_IMPORT_PREFIX}/bin]] - ) - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" - [[IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/liblib]] - [[IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib]] - ) - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" - [[IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/lib]] - [[IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin]] - ) - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" - [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/debug/liblib]] - [[APPEND _cmake_import_check_files_for_LIEF::LIEF "${_IMPORT_PREFIX}/debug/lib]] - ) - - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFExport-shared-debug.cmake" - [[" "${_IMPORT_PREFIX}/debug/lib]] - [[" "${_IMPORT_PREFIX}/debug/bin]] - ) - -endif() vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFConfig.cmake" [[include("${LIEF_${lib_type}_export}")]] From 83f0c54e47032131c031697337f949827eb8c324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 5 Dec 2024 15:59:10 +0300 Subject: [PATCH 60/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 7a912e5c1f3349..7f0d23a0d095a8 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1ddd40870b189aa044b87c657618383c3eef9139", + "git-tree": "cc9d3d6040d11413c9c4cc586b73242aa643f582", "version-semver": "0.15.1", "port-version": 0 } From 25bcf6107869b26042436a7113d449982172f1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 5 Dec 2024 19:16:33 +0300 Subject: [PATCH 61/84] fmt --- ports/lief/portfile.cmake | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index d1196d51a9248e..0c7f1ee982e8f9 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -42,13 +42,15 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" ) vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" -"set(CMAKE_INSTALL_DATAROOTDIR \"share\")" -"set(CMAKE_INSTALL_DATAROOTDIR \"share\")]]\nset(CMAKE_INSTALL_INCLUDEDIR \"include\")" + "set(CMAKE_INSTALL_DATAROOTDIR \"share\")" + "set(CMAKE_INSTALL_DATAROOTDIR \"share\")]]\nset(CMAKE_INSTALL_INCLUDEDIR \"include\")" ) + vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "COMPONENT libraries" " " ) + vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" [[ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}]] " " @@ -63,10 +65,12 @@ vcpkg_replace_string("${SOURCE_PATH}/src/BinaryStream/BinaryStream.cpp" [[#include "third-party/utfcpp.hpp"]] [[#include ]] ) + vcpkg_replace_string("${SOURCE_PATH}/src/utils.cpp" [[#include "third-party/utfcpp.hpp"]] [[#include ]] ) + vcpkg_replace_string("${SOURCE_PATH}/src/PE/Builder.cpp" [[#include "third-party/utfcpp.hpp"]] [[#include ]] @@ -81,14 +85,17 @@ vcpkg_replace_string("${SOURCE_PATH}/src/logging.hpp" "#include " "#include \n#include " ) + vcpkg_replace_string("${SOURCE_PATH}/src/utils.cpp" "#include " "#include \n#include " ) + vcpkg_replace_string("${SOURCE_PATH}/src/internal_utils.hpp" [[#include "spdlog/fmt/fmt.h"]] "#include \n#include " ) + vcpkg_replace_string("${SOURCE_PATH}/src/PE/Header.cpp" "#include " "#include \n#include " @@ -126,8 +133,8 @@ vcpkg_replace_string("${SOURCE_PATH}/src/MachO/VersionMin.cpp" if (VCPKG_TARGET_IS_LINUX) vcpkg_replace_string("${SOURCE_PATH}/src/internal_utils.hpp" - [[#include "LIEF/iterators.hpp"]] - "#include \n#include " + [[#include "LIEF/iterators.hpp"]] + "#include \n#include " ) endif() From 5c03fbcfcd6d9d6030a204018bc9f990f535fc4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 5 Dec 2024 19:16:52 +0300 Subject: [PATCH 62/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 7f0d23a0d095a8..e9221e3b2de5c6 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cc9d3d6040d11413c9c4cc586b73242aa643f582", + "git-tree": "b31fbc2f6087073ea82d4bd87adacb5515570111", "version-semver": "0.15.1", "port-version": 0 } From 2787775bcab1f17d66e9c8dad01cb0e98c8f1423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 15:18:46 +0300 Subject: [PATCH 63/84] test --- ports/lief/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 0c7f1ee982e8f9..b970921f5f7f16 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -1,8 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lief-project/LIEF - REF 0d087c03936977cb7019d7ca52f761a347b80778 - SHA512 b1c59a504cef4a300e6e5e788b87252ab4ff5f2c373170fcb4b91aaf4ac122733ab677684fa2e1a7ffcaacf9fc9ae061157aec4ff821e1f5306bdff1dcb7c630 + REF ${VERSION} + SHA512 7df75fab6c7023e37a6a4d27fac8dcb4200e0235625fc5952bb23cedb2e582a37fb67ee471c1ae953c0b205fd9cca5538a835f65ef80a771f72dc7ff68000ed9 + HEAD_REF master ) file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") @@ -163,7 +164,6 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} - -DBUILD_SHARED_LIBS=ON # Build with external vcpkg dependencies -DLIEF_OPT_MBEDTLS_EXTERNAL=ON -DLIEF_EXTERNAL_SPDLOG=ON From 8d55be8d27330d064c7a8205f96d6a280e24ebbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 15:19:10 +0300 Subject: [PATCH 64/84] test2 --- versions/baseline.json | 2 +- versions/l-/lief.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 6265b7f78cf74c..6d0e958a1b2891 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5525,7 +5525,7 @@ "port-version": 0 }, "lief": { - "baseline": "0.15.1", + "baseline": "0.16.0", "port-version": 0 }, "lightgbm": { diff --git a/versions/l-/lief.json b/versions/l-/lief.json index e9221e3b2de5c6..978ce79d39f7e1 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b31fbc2f6087073ea82d4bd87adacb5515570111", + "git-tree": "17673ed1464bfee6783398fd5f1ffa5025939d7c", "version-semver": "0.15.1", "port-version": 0 } From 7a65f59ecbf8eb3ffb86c6f4c226087f5c46ba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 15:20:04 +0300 Subject: [PATCH 65/84] ver --- versions/baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 6d0e958a1b2891..6265b7f78cf74c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5525,7 +5525,7 @@ "port-version": 0 }, "lief": { - "baseline": "0.16.0", + "baseline": "0.15.1", "port-version": 0 }, "lightgbm": { From 1fde52a111e3d1ad3d258c5b3b680e5b1972b059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 15:20:50 +0300 Subject: [PATCH 66/84] test3 --- ports/lief/vcpkg.json | 2 +- versions/baseline.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index a6a05ca70b0a1f..051bc9eb1a5938 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -1,6 +1,6 @@ { "name": "lief", - "version-semver": "0.15.1", + "version-semver": "0.16.0", "description": "LIEF - Library to Instrument Executable Formats", "homepage": "https://lief.quarkslab.com", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index 6265b7f78cf74c..6d0e958a1b2891 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5525,7 +5525,7 @@ "port-version": 0 }, "lief": { - "baseline": "0.15.1", + "baseline": "0.16.0", "port-version": 0 }, "lightgbm": { From 4a1afed7ec831df79bdf422034c11b6eca60131d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 15:21:10 +0300 Subject: [PATCH 67/84] ver --- versions/l-/lief.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 978ce79d39f7e1..55acfb2470eeab 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "fc429b5055a4002a29c95f5b4d0b4596200ba195", + "version-semver": "0.16.0", + "port-version": 0 + }, { "git-tree": "17673ed1464bfee6783398fd5f1ffa5025939d7c", "version-semver": "0.15.1", From 5403ff9819f8f02bde32ffe4b725fc7baa402830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 17:48:06 +0300 Subject: [PATCH 68/84] testing --- ports/lief/portfile.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index b970921f5f7f16..c59ebcae8f0dc9 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -139,6 +139,16 @@ if (VCPKG_TARGET_IS_LINUX) ) endif() +vcpkg_replace_string("${SOURCE_PATH}/include/LIEF/errors.hpp" + [[#include ]] + "#include " +) + +vcpkg_replace_string("${SOURCE_PATH}/include/LIEF/span.hpp" + [[#include ]] + "#include " +) + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES "c-api" LIEF_C_API # C API @@ -164,6 +174,12 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} + + -DLIEF_DEBUG_INFO=ON + -DLIEF_OBJC=ON + -DLIEF_DYLD_SHARED_CACHE=ON + -DLIEF_ASM=ON + # Build with external vcpkg dependencies -DLIEF_OPT_MBEDTLS_EXTERNAL=ON -DLIEF_EXTERNAL_SPDLOG=ON From 8c8ddb2f0904a4c5565cc382043640d24ada2335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 17:48:26 +0300 Subject: [PATCH 69/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 55acfb2470eeab..eba1a2ac4bb2d4 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fc429b5055a4002a29c95f5b4d0b4596200ba195", + "git-tree": "265adee4c28762d2dafee6585f9ba6753284af00", "version-semver": "0.16.0", "port-version": 0 }, From d796d9f61dcb12c2af11fecfe942ecc2e4444472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:05:24 +0300 Subject: [PATCH 70/84] testing2 --- ports/lief/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index c59ebcae8f0dc9..26710f75d1d7ad 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -175,7 +175,7 @@ vcpkg_cmake_configure( OPTIONS ${FEATURE_OPTIONS} - -DLIEF_DEBUG_INFO=ON + -DLIEF_DEBUG_INFO=OFF -DLIEF_OBJC=ON -DLIEF_DYLD_SHARED_CACHE=ON -DLIEF_ASM=ON From 43a9181af8623ac0b16a05c359d2a63bd094048e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:05:43 +0300 Subject: [PATCH 71/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index eba1a2ac4bb2d4..f2cac6834a9d98 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "265adee4c28762d2dafee6585f9ba6753284af00", + "git-tree": "be2eb1b78e6848116c19a2c065d4962ca5336813", "version-semver": "0.16.0", "port-version": 0 }, From 9f8aa76312ab91a795a97b9b5ad66bdab7b0484a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:11:04 +0300 Subject: [PATCH 72/84] testing3 --- ports/lief/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 26710f75d1d7ad..38ef9cf3ce291a 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -175,10 +175,10 @@ vcpkg_cmake_configure( OPTIONS ${FEATURE_OPTIONS} - -DLIEF_DEBUG_INFO=OFF - -DLIEF_OBJC=ON + -DLIEF_DEBUG_INFO=ON + -DLIEF_OBJC=OFF -DLIEF_DYLD_SHARED_CACHE=ON - -DLIEF_ASM=ON + -DLIEF_ASM=OFF # Build with external vcpkg dependencies -DLIEF_OPT_MBEDTLS_EXTERNAL=ON From 3e47dff63655f72734b205651845517c2c46488c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:11:20 +0300 Subject: [PATCH 73/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index f2cac6834a9d98..5404e86f61b894 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "be2eb1b78e6848116c19a2c065d4962ca5336813", + "git-tree": "b300dcadb4224ab47a1d8a9fc80e8802ba5d478e", "version-semver": "0.16.0", "port-version": 0 }, From 60565779ff83aa327479afbe54ae55d6a4b9e9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:21:05 +0300 Subject: [PATCH 74/84] testing4 --- ports/lief/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 38ef9cf3ce291a..63762c27bccec0 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -175,7 +175,7 @@ vcpkg_cmake_configure( OPTIONS ${FEATURE_OPTIONS} - -DLIEF_DEBUG_INFO=ON + -DLIEF_DEBUG_INFO=OFF -DLIEF_OBJC=OFF -DLIEF_DYLD_SHARED_CACHE=ON -DLIEF_ASM=OFF From 09db3023d57f1484954d25aa71323dc8ec621ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:21:23 +0300 Subject: [PATCH 75/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 5404e86f61b894..03878ec770961c 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b300dcadb4224ab47a1d8a9fc80e8802ba5d478e", + "git-tree": "5c747e2d684fdc085b83f4ffa6f10fffcc25e428", "version-semver": "0.16.0", "port-version": 0 }, From 643488ef4fce81beca33be4cfdbefec3d806c3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:25:20 +0300 Subject: [PATCH 76/84] testing5 --- ports/lief/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 63762c27bccec0..42c3c13bc8d534 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -175,9 +175,9 @@ vcpkg_cmake_configure( OPTIONS ${FEATURE_OPTIONS} - -DLIEF_DEBUG_INFO=OFF + -DLIEF_DEBUG_INFO=ON -DLIEF_OBJC=OFF - -DLIEF_DYLD_SHARED_CACHE=ON + -DLIEF_DYLD_SHARED_CACHE=OFF -DLIEF_ASM=OFF # Build with external vcpkg dependencies From 7466fde5828e9180a44d86898e3696be2fc33893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:25:35 +0300 Subject: [PATCH 77/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 03878ec770961c..e4250cb4ce111b 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5c747e2d684fdc085b83f4ffa6f10fffcc25e428", + "git-tree": "cdb7c1617533e48df33ebf12c726b19e31f4a71c", "version-semver": "0.16.0", "port-version": 0 }, From 68ddc980aff9f0d7a5b0b8911ebf4864516d0892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:47:27 +0300 Subject: [PATCH 78/84] features --- ports/lief/portfile.cmake | 14 +++++++++----- ports/lief/vcpkg.json | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 42c3c13bc8d534..9558c168716947 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -168,6 +168,11 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "dex" LIEF_DEX # Build LIEF with DEX module "vdex" LIEF_VDEX # Build LIEF with VDEX module "art" LIEF_ART # Build LIEF with ART module + + "debug" LIEF_DEBUG_INFO # Build LIEF with DWARF/PDB support + "objc" LIEF_OBJC # Build LIEF with inspect Objective-C metadata support + "dyld-shared-cache" LIEF_DYLD_SHARED_CACHE # Build LIEF with dyld shared cache support + "asm" LIEF_ASM # Build LIEF with assembler/disassembler support ) vcpkg_cmake_configure( @@ -175,11 +180,6 @@ vcpkg_cmake_configure( OPTIONS ${FEATURE_OPTIONS} - -DLIEF_DEBUG_INFO=ON - -DLIEF_OBJC=OFF - -DLIEF_DYLD_SHARED_CACHE=OFF - -DLIEF_ASM=OFF - # Build with external vcpkg dependencies -DLIEF_OPT_MBEDTLS_EXTERNAL=ON -DLIEF_EXTERNAL_SPDLOG=ON @@ -203,6 +203,10 @@ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFConfig.cmake" vcpkg_fixup_pkgconfig() +if("debug" IN_LIST FEATURES) + vcpkg_copy_pdbs() +endif() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 051bc9eb1a5938..32415183c6b5e4 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -37,12 +37,24 @@ "art": { "description": "Build LIEF with ART module" }, + "asm": { + "description": "Build LIEF with assembler/disassembler support", + "support": "!(windows & static)" + }, "c-api": { "description": "C API" }, + "debug": { + "description": "Build LIEF with DWARF/PDB support", + "support": "!(windows & static)" + }, "dex": { "description": "Build LIEF with DEX module" }, + "dyld-shared-cache": { + "description": "Build LIEF with Dyld shared cache support", + "support": "!(windows & static)" + }, "elf": { "description": "Build LIEF with ELF module" }, @@ -70,6 +82,10 @@ "oat": { "description": "Build LIEF with OAT module" }, + "objc": { + "description": "Build LIEF with ObjC metadata support", + "support": "!(windows & static)" + }, "pe": { "description": "Build LIEF with PE module" }, From 2727050c349bfb2565faaacc1de9a0bff947f24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:47:59 +0300 Subject: [PATCH 79/84] fixup --- ports/lief/vcpkg.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 32415183c6b5e4..a78eda4cda7242 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -39,21 +39,21 @@ }, "asm": { "description": "Build LIEF with assembler/disassembler support", - "support": "!(windows & static)" + "supports": "!(windows & static)" }, "c-api": { "description": "C API" }, "debug": { "description": "Build LIEF with DWARF/PDB support", - "support": "!(windows & static)" + "supports": "!(windows & static)" }, "dex": { "description": "Build LIEF with DEX module" }, "dyld-shared-cache": { "description": "Build LIEF with Dyld shared cache support", - "support": "!(windows & static)" + "supports": "!(windows & static)" }, "elf": { "description": "Build LIEF with ELF module" @@ -84,7 +84,7 @@ }, "objc": { "description": "Build LIEF with ObjC metadata support", - "support": "!(windows & static)" + "supports": "!(windows & static)" }, "pe": { "description": "Build LIEF with PE module" From b7660e3edf681bb5a4e6db9776e3fa670e9eb103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:48:17 +0300 Subject: [PATCH 80/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index e4250cb4ce111b..4afb6bff8ff543 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cdb7c1617533e48df33ebf12c726b19e31f4a71c", + "git-tree": "a6de84d28232d834dc11ead53a22c718ae4de6fc", "version-semver": "0.16.0", "port-version": 0 }, From 6eff159a194ccf8f5c9cbd6281a24584ce50fbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:48:55 +0300 Subject: [PATCH 81/84] fixup2 --- ports/lief/vcpkg.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index a78eda4cda7242..6c1ffa1efe8649 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -39,21 +39,21 @@ }, "asm": { "description": "Build LIEF with assembler/disassembler support", - "supports": "!(windows & static)" + "supports": "!(windows & !static)" }, "c-api": { "description": "C API" }, "debug": { "description": "Build LIEF with DWARF/PDB support", - "supports": "!(windows & static)" + "supports": "!(windows & !static)" }, "dex": { "description": "Build LIEF with DEX module" }, "dyld-shared-cache": { "description": "Build LIEF with Dyld shared cache support", - "supports": "!(windows & static)" + "supports": "!(windows & !static)" }, "elf": { "description": "Build LIEF with ELF module" @@ -84,7 +84,7 @@ }, "objc": { "description": "Build LIEF with ObjC metadata support", - "supports": "!(windows & static)" + "supports": "!(windows & !static)" }, "pe": { "description": "Build LIEF with PE module" From 30008973c4db237825390b19e7fc408669f392ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Tue, 10 Dec 2024 18:49:14 +0300 Subject: [PATCH 82/84] ver --- versions/l-/lief.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 4afb6bff8ff543..269ab1e42cddcb 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a6de84d28232d834dc11ead53a22c718ae4de6fc", + "git-tree": "aff018b24b685b86596713f8819c4e3d13d1e6d4", "version-semver": "0.16.0", "port-version": 0 }, From 8bc2940bcc4eb28071c95c76f392014070babb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Wed, 11 Dec 2024 12:12:48 +0300 Subject: [PATCH 83/84] one ver --- versions/l-/lief.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/versions/l-/lief.json b/versions/l-/lief.json index 269ab1e42cddcb..e41a2d69f254ea 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -4,11 +4,6 @@ "git-tree": "aff018b24b685b86596713f8819c4e3d13d1e6d4", "version-semver": "0.16.0", "port-version": 0 - }, - { - "git-tree": "17673ed1464bfee6783398fd5f1ffa5025939d7c", - "version-semver": "0.15.1", - "port-version": 0 } ] } From e1c036164fccd098b7175d2a2d2e93238cc968ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 12 Dec 2024 14:29:18 +0300 Subject: [PATCH 84/84] test ci --- scripts/test_ports/vcpkg-ci-lief/portfile.cmake | 7 +++++++ .../test_ports/vcpkg-ci-lief/project/CMakeLists.txt | 11 +++++++++++ scripts/test_ports/vcpkg-ci-lief/project/main.cpp | 11 +++++++++++ scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 13 +++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 scripts/test_ports/vcpkg-ci-lief/portfile.cmake create mode 100644 scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt create mode 100644 scripts/test_ports/vcpkg-ci-lief/project/main.cpp create mode 100644 scripts/test_ports/vcpkg-ci-lief/vcpkg.json diff --git a/scripts/test_ports/vcpkg-ci-lief/portfile.cmake b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake new file mode 100644 index 00000000000000..11e54c088578a0 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake @@ -0,0 +1,7 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" +) + +vcpkg_cmake_build() \ No newline at end of file diff --git a/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt new file mode 100644 index 00000000000000..545650d59ed497 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.24) + +project(vcpkg-ci-lief LANGUAGES C CXX) + +set(CMAKE_CXX_STANDARD 14) + +find_package(LIEF CONFIG REQUIRED) + +add_executable(main main.cpp) + +target_link_libraries(main PRIVATE LIEF::LIEF) diff --git a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp new file mode 100644 index 00000000000000..ea2490fb7c62fc --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp @@ -0,0 +1,11 @@ +#include +#include +#include +using namespace std; +using namespace LIEF; +int main() +{ + std::cout << "access flags public = " << LIEF::DEX::to_string(LIEF::DEX::access_flags_list[1]) << std::endl; + std::cout << "Version = " << LIEF_VERSION << std::endl; + return 0; +} \ No newline at end of file diff --git a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json new file mode 100644 index 00000000000000..2bab34a57ba74c --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "vcpkg-ci-lief", + "version-string": "ci", + "description": "Testing packages which provide lief", + "license": null, + "dependencies": [ + "lief", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} \ No newline at end of file