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 001/142] 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 002/142] 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 003/142] 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 004/142] 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 005/142] 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 006/142] 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 007/142] 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 008/142] 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 009/142] 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 010/142] 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 011/142] 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 012/142] 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 013/142] 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 014/142] 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 015/142] 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 016/142] 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 017/142] 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 018/142] 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 019/142] 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 020/142] 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 021/142] 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 022/142] 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 023/142] 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 024/142] 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 025/142] 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 026/142] 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 027/142] 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 028/142] 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 029/142] 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 030/142] 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 031/142] 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 032/142] 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 033/142] 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 034/142] 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 035/142] 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 036/142] 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 037/142] 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 038/142] 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 039/142] 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 040/142] 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 041/142] 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 042/142] 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 043/142] 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 044/142] 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 045/142] 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 046/142] 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 047/142] 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 048/142] 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 049/142] 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 050/142] 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 051/142] 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 052/142] 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 053/142] 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 054/142] 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 055/142] 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 056/142] 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 057/142] 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 058/142] 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 059/142] 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 060/142] 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 061/142] 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 062/142] 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 063/142] 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 064/142] 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 065/142] 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 066/142] 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 067/142] 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 068/142] 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 069/142] 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 070/142] 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 071/142] 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 072/142] 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 073/142] 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 074/142] 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 075/142] 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 076/142] 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 077/142] 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 078/142] 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 079/142] 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 080/142] 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 081/142] 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 082/142] 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 083/142] 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 084/142] 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 From 4b0da2dabaa3493d1b71387988497724a6f80df2 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: Sun, 15 Dec 2024 16:45:30 +0300 Subject: [PATCH 085/142] newline EOF --- scripts/test_ports/vcpkg-ci-lief/portfile.cmake | 2 +- scripts/test_ports/vcpkg-ci-lief/project/main.cpp | 2 +- scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/test_ports/vcpkg-ci-lief/portfile.cmake b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake index 11e54c088578a0..62422cac0028d9 100644 --- a/scripts/test_ports/vcpkg-ci-lief/portfile.cmake +++ b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake @@ -4,4 +4,4 @@ vcpkg_cmake_configure( SOURCE_PATH "${CURRENT_PORT_DIR}/project" ) -vcpkg_cmake_build() \ No newline at end of file +vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp index ea2490fb7c62fc..6c1fc0a8744796 100644 --- a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp +++ b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp @@ -8,4 +8,4 @@ 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 index 2bab34a57ba74c..829b6218bf8936 100644 --- a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -10,4 +10,4 @@ "host": true } ] -} \ No newline at end of file +} From 7a2a629b18672587deee09037ca0cf64fab21bdf 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: Sun, 15 Dec 2024 17:48:34 +0300 Subject: [PATCH 086/142] fix-liefconfig-cmake-in.patch --- ports/lief/fix-liefconfig-cmake-in.patch | 26 ++++++++++++++++++++++++ ports/lief/portfile.cmake | 17 ++-------------- ports/lief/usage | 2 +- 3 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 ports/lief/fix-liefconfig-cmake-in.patch diff --git a/ports/lief/fix-liefconfig-cmake-in.patch b/ports/lief/fix-liefconfig-cmake-in.patch new file mode 100644 index 00000000000000..d2d7db9423e98b --- /dev/null +++ b/ports/lief/fix-liefconfig-cmake-in.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/LIEFConfig.cmake.in b/cmake/LIEFConfig.cmake.in +index dba7363..210b64b 100644 +--- a/cmake/LIEFConfig.cmake.in ++++ b/cmake/LIEFConfig.cmake.in +@@ -69,11 +69,14 @@ macro(LIEF_load_targets lib_type) + return() + endif () + +- if("${lib_type}" STREQUAL "static") ++ if(1) + # Need to find all dependencies even if they're private when LIEF is + # compiled statically + include(CMakeFindDependencyMacro) + ++ find_dependency(tl-expected) ++ find_dependency(fmt) ++ + if(@LIEF_EXTERNAL_MBEDTLS@) + find_dependency(MbedTLS) + endif() +@@ -183,3 +186,5 @@ if(DEFINED LIEF_INCLUDE_DIR) + set(LIEF_PATCH_VERSION "${LIEF_VERSION_PATCH}") + endif() + endif() ++ ++check_required_components(lief) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 9558c168716947..efb4dc75136f7e 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF ${VERSION} SHA512 7df75fab6c7023e37a6a4d27fac8dcb4200e0235625fc5952bb23cedb2e582a37fb67ee471c1ae953c0b205fd9cca5538a835f65ef80a771f72dc7ff68000ed9 HEAD_REF master + PATCHES + fix-liefconfig-cmake-in.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") @@ -13,21 +15,6 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "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)" -) - -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" diff --git a/ports/lief/usage b/ports/lief/usage index 8a738c9f0f8e6a..720b194ef2a7c1 100644 --- a/ports/lief/usage +++ b/ports/lief/usage @@ -6,4 +6,4 @@ lief provides CMake targets: lief provides pkg-config modules: # Library to Instrument Executable Formats - LIEF \ No newline at end of file + LIEF From 64bb3c3ebf3f44622f420560b08142b18ec1780b 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: Sun, 15 Dec 2024 17:48:58 +0300 Subject: [PATCH 087/142] 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 e41a2d69f254ea..6cc51d1f652f5e 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "aff018b24b685b86596713f8819c4e3d13d1e6d4", + "git-tree": "0239620600d8a48e1375bfe496445b8f121cc29f", "version-semver": "0.16.0", "port-version": 0 } From 8d8dba325dbd4aab77a1b947e49b8721c1b13981 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: Sun, 15 Dec 2024 19:33:13 +0300 Subject: [PATCH 088/142] test --- ports/lief/fix-liefconfig-cmake-in.patch | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/ports/lief/fix-liefconfig-cmake-in.patch b/ports/lief/fix-liefconfig-cmake-in.patch index d2d7db9423e98b..637686f1466812 100644 --- a/ports/lief/fix-liefconfig-cmake-in.patch +++ b/ports/lief/fix-liefconfig-cmake-in.patch @@ -1,26 +1,24 @@ diff --git a/cmake/LIEFConfig.cmake.in b/cmake/LIEFConfig.cmake.in -index dba7363..210b64b 100644 +index dba7363..7f88f98 100644 --- a/cmake/LIEFConfig.cmake.in +++ b/cmake/LIEFConfig.cmake.in -@@ -69,11 +69,14 @@ macro(LIEF_load_targets lib_type) +@@ -69,7 +69,7 @@ macro(LIEF_load_targets lib_type) return() endif () - + - if("${lib_type}" STREQUAL "static") + if(1) # Need to find all dependencies even if they're private when LIEF is # compiled statically include(CMakeFindDependencyMacro) - +@@ -93,6 +93,10 @@ macro(LIEF_load_targets lib_type) + if(NOT @LIEF_DISABLE_FROZEN@ AND @LIEF_OPT_FROZEN_EXTERNAL@) + find_dependency(frozen) + endif() ++ + find_dependency(tl-expected) + find_dependency(fmt) -+ - if(@LIEF_EXTERNAL_MBEDTLS@) - find_dependency(MbedTLS) - endif() -@@ -183,3 +186,5 @@ if(DEFINED LIEF_INCLUDE_DIR) - set(LIEF_PATCH_VERSION "${LIEF_VERSION_PATCH}") ++ check_required_components(lief) endif() - endif() -+ -+check_required_components(lief) + + # Include the respective targets file From c8583942436cd038d7ea71b25d6ffca82a3a4586 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: Sun, 15 Dec 2024 19:33:33 +0300 Subject: [PATCH 089/142] 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 6cc51d1f652f5e..6af00984c6447a 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0239620600d8a48e1375bfe496445b8f121cc29f", + "git-tree": "fd077bcf27961407633c26cabe7272ab4686a948", "version-semver": "0.16.0", "port-version": 0 } From 3845f258c9e803d0d66649c9d1ffd9f9505bc06c 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, 18 Dec 2024 22:53:49 +0300 Subject: [PATCH 090/142] test feats without extended feats --- scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json index 829b6218bf8936..abf9803d4e21ac 100644 --- a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -4,7 +4,25 @@ "description": "Testing packages which provide lief", "license": null, "dependencies": [ - "lief", + { + "name": "lief", + "features": [ + "c-api", + "enable-json", + "examples", + "extra-warnings", + "logging", + "logging-debug", + "use-ccache", + "elf", + "pe", + "macho", + "oat", + "dex", + "vdex", + "art" + ] + }, { "name": "vcpkg-cmake", "host": true From aa8e377909fc3f04aedc37b4f181e4114e2d2957 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, 18 Dec 2024 23:11:59 +0300 Subject: [PATCH 091/142] test all feats --- scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json index abf9803d4e21ac..72ec2cf7b6d1f8 100644 --- a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -23,6 +23,16 @@ "art" ] }, + { + "name": "lief", + "features": [ + "debug", + "objc", + "dyld-shared-cache", + "asm" + ], + "platform": "!(windows & !static)" + }, { "name": "vcpkg-cmake", "host": true From 8496f22efb12dc6f5fbb8e10d269938cb8b9243e 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, 18 Dec 2024 23:34:45 +0300 Subject: [PATCH 092/142] dropping extended feats --- scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json index 72ec2cf7b6d1f8..abf9803d4e21ac 100644 --- a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -23,16 +23,6 @@ "art" ] }, - { - "name": "lief", - "features": [ - "debug", - "objc", - "dyld-shared-cache", - "asm" - ], - "platform": "!(windows & !static)" - }, { "name": "vcpkg-cmake", "host": true From 96a2ce0dffe70944e9691f3b0b2b712c8b61eae1 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, 18 Dec 2024 23:37:56 +0300 Subject: [PATCH 093/142] drop extended feats --- ports/lief/portfile.cmake | 5 ----- ports/lief/vcpkg.json | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index efb4dc75136f7e..1da275a7157e7e 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -155,11 +155,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 - - "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( diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 6c1ffa1efe8649..051bc9eb1a5938 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -37,24 +37,12 @@ "art": { "description": "Build LIEF with ART module" }, - "asm": { - "description": "Build LIEF with assembler/disassembler support", - "supports": "!(windows & !static)" - }, "c-api": { "description": "C API" }, - "debug": { - "description": "Build LIEF with DWARF/PDB support", - "supports": "!(windows & !static)" - }, "dex": { "description": "Build LIEF with DEX module" }, - "dyld-shared-cache": { - "description": "Build LIEF with Dyld shared cache support", - "supports": "!(windows & !static)" - }, "elf": { "description": "Build LIEF with ELF module" }, @@ -82,10 +70,6 @@ "oat": { "description": "Build LIEF with OAT module" }, - "objc": { - "description": "Build LIEF with ObjC metadata support", - "supports": "!(windows & !static)" - }, "pe": { "description": "Build LIEF with PE module" }, From 75868e8b1f912bb51a17fd32f70d263e1ddf3843 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, 18 Dec 2024 23:38:19 +0300 Subject: [PATCH 094/142] 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 6af00984c6447a..4c48533b2d86d7 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fd077bcf27961407633c26cabe7272ab4686a948", + "git-tree": "a29b0a8acbd884bbd806e5241fe7c53cdb09ee77", "version-semver": "0.16.0", "port-version": 0 } From f04fc8cc88971ccf62113fe805ed204a169ed77c 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, 19 Dec 2024 00:00:44 +0300 Subject: [PATCH 095/142] clean --- ports/lief/portfile.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 1da275a7157e7e..79337e57a52416 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -185,10 +185,6 @@ 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" From 0ac87c407660902ef35898f68eee26557ce8049a 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, 19 Dec 2024 00:00:59 +0300 Subject: [PATCH 096/142] 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 4c48533b2d86d7..11c0aee7e801bc 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a29b0a8acbd884bbd806e5241fe7c53cdb09ee77", + "git-tree": "b2194583148376fb248d5a8b8cb6659e0a16c402", "version-semver": "0.16.0", "port-version": 0 } From 5b3e0fc053103c88af96dccc58631b10a79e4b72 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, 19 Dec 2024 01:06:54 +0300 Subject: [PATCH 097/142] test --- ports/lief/portfile.cmake | 10 +++++++++- ports/lief/vcpkg.json | 15 ++++++++++++--- scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 7 +++++-- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 79337e57a52416..5cccbc85c8cad7 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -140,7 +140,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES "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 "logging" LIEF_LOGGING # Enable logging "logging-debug" LIEF_LOGGING_DEBUG # Enable debug logging @@ -155,6 +154,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" LIEF_DYLD_SHARED_CACHE # Build LIEF with dyld shared cache support + "asm" LIEF_ASM # Build LIEF with assembler/disassembler support ) vcpkg_cmake_configure( @@ -185,6 +189,10 @@ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFConfig.cmake" vcpkg_fixup_pkgconfig() +if("asm" IN_LIST FEATURES OR "debug" IN_LIST FEATURES OR "dyld-shared-cache" IN_LIST FEATURES OR "objc" 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..0696ed3f5658f4 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -37,12 +37,21 @@ "art": { "description": "Build LIEF with ART module" }, + "asm": { + "description": "Build LIEF with assembler/disassembler support" + }, "c-api": { "description": "C API" }, + "debug": { + "description": "Build LIEF with DWARF/PDB support" + }, "dex": { "description": "Build LIEF with DEX module" }, + "dyld": { + "description": "Build LIEF with Dyld shared cache support" + }, "elf": { "description": "Build LIEF with ELF module" }, @@ -52,9 +61,6 @@ "nlohmann-json" ] }, - "examples": { - "description": "Build LIEF C++ examples" - }, "extra-warnings": { "description": "Enable extra warning from the compiler" }, @@ -70,6 +76,9 @@ "oat": { "description": "Build LIEF with OAT module" }, + "objc": { + "description": "Build LIEF with ObjC metadata support" + }, "pe": { "description": "Build LIEF with PE module" }, diff --git a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json index abf9803d4e21ac..74ee48eb6d2df4 100644 --- a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -9,7 +9,6 @@ "features": [ "c-api", "enable-json", - "examples", "extra-warnings", "logging", "logging-debug", @@ -20,7 +19,11 @@ "oat", "dex", "vdex", - "art" + "art", + "asm", + "debug", + "dyld", + "objc" ] }, { From 8f98a6928ddb2e9c129debbd9cf3000c190d0480 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, 19 Dec 2024 01:07:11 +0300 Subject: [PATCH 098/142] 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 11c0aee7e801bc..98720ba3cb24ae 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b2194583148376fb248d5a8b8cb6659e0a16c402", + "git-tree": "e91e6c20fe638e922c51156d61a82de706304b55", "version-semver": "0.16.0", "port-version": 0 } From c7b33faf83d40dd47f775b1ef252a690f03cde3f 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, 19 Dec 2024 01:15:30 +0300 Subject: [PATCH 099/142] 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 5cccbc85c8cad7..1d2727e4756fb5 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( fix-liefconfig-cmake-in.patch ) -file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") +file(REMOVE_RECURSE "${SOURCE_PATH}/third-party" "${SOURCE_PATH}/examples") vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "target_link_libraries(LIB_LIEF PRIVATE lief_spdlog)" From 02dce0fcf52cd395e7d230bde78a32cf2dbaea19 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, 19 Dec 2024 01:15:51 +0300 Subject: [PATCH 100/142] 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 98720ba3cb24ae..01071b19945d75 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e91e6c20fe638e922c51156d61a82de706304b55", + "git-tree": "476404ab64907956068e92d605c07876d5c3d4e9", "version-semver": "0.16.0", "port-version": 0 } From 85f1870867a0a4ceb1936c3ae34be56e06cbfc60 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, 19 Dec 2024 01:20:20 +0300 Subject: [PATCH 101/142] test --- ports/lief/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 1d2727e4756fb5..864ec3dd31b898 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( fix-liefconfig-cmake-in.patch ) -file(REMOVE_RECURSE "${SOURCE_PATH}/third-party" "${SOURCE_PATH}/examples") +file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "target_link_libraries(LIB_LIEF PRIVATE lief_spdlog)" @@ -165,6 +165,7 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} + -DLIEF_EXAMPLES=OFF # Build with external vcpkg dependencies -DLIEF_OPT_MBEDTLS_EXTERNAL=ON From 762ed131595be90e16627443061f63acd7cb17a7 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, 19 Dec 2024 01:20:35 +0300 Subject: [PATCH 102/142] 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 01071b19945d75..c59efe2b83adb4 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "476404ab64907956068e92d605c07876d5c3d4e9", + "git-tree": "9dbdd59ce013cee1ccbcf9e7ebe777344f29bfe7", "version-semver": "0.16.0", "port-version": 0 } From 1575b189a95cf421dcab3018d94d4fe54d02aa10 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, 19 Dec 2024 01:55:40 +0300 Subject: [PATCH 103/142] test --- ports/lief/vcpkg.json | 12 ++++++++---- .../test_ports/vcpkg-ci-lief/project/main.cpp | 3 +++ scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 16 +++++++++++----- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index 0696ed3f5658f4..e836a57a430b45 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -38,19 +38,22 @@ "description": "Build LIEF with ART module" }, "asm": { - "description": "Build LIEF with assembler/disassembler support" + "description": "Build LIEF with assembler/disassembler support", + "supports": "!(windows & !static)" }, "c-api": { "description": "C API" }, "debug": { - "description": "Build LIEF with DWARF/PDB support" + "description": "Build LIEF with DWARF/PDB support", + "supports": "!(windows & !static)" }, "dex": { "description": "Build LIEF with DEX module" }, "dyld": { - "description": "Build LIEF with Dyld shared cache support" + "description": "Build LIEF with Dyld shared cache support", + "supports": "!(windows & !static)" }, "elf": { "description": "Build LIEF with ELF module" @@ -77,7 +80,8 @@ "description": "Build LIEF with OAT module" }, "objc": { - "description": "Build LIEF with ObjC metadata support" + "description": "Build LIEF with ObjC metadata support", + "supports": "!(windows & !static)" }, "pe": { "description": "Build LIEF with PE module" diff --git a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp index 6c1fc0a8744796..269027f67f107d 100644 --- a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp +++ b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp @@ -1,10 +1,13 @@ #include #include #include +#include using namespace std; using namespace LIEF; int main() { + std::unique_ptr inst = get_inst(); + std::cout << "address = " << inst.value().address() << std::endl; 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; diff --git a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json index 74ee48eb6d2df4..ac86c9ab84bcba 100644 --- a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -19,13 +19,19 @@ "oat", "dex", "vdex", - "art", - "asm", - "debug", - "dyld", - "objc" + "art" ] }, + { + "name": "lief", + "features": [ + "debug", + "objc", + "dyld-shared-cache", + "asm" + ], + "platform": "!(windows & !static)" + }, { "name": "vcpkg-cmake", "host": true From b73c4c0207e182576fb1b1b988ff4472f8c6cee2 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, 19 Dec 2024 01:56:07 +0300 Subject: [PATCH 104/142] 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 c59efe2b83adb4..840cfd3b034e0a 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9dbdd59ce013cee1ccbcf9e7ebe777344f29bfe7", + "git-tree": "9c97e1d8d14d8169a198ce47876a7741d9e1a271", "version-semver": "0.16.0", "port-version": 0 } From 532b77b37ecb342a0c00ab78d388791a37073f23 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, 19 Dec 2024 02:18:25 +0300 Subject: [PATCH 105/142] test --- scripts/test_ports/vcpkg-ci-lief/project/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp index 269027f67f107d..8d6d3c0cda6eee 100644 --- a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp +++ b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp @@ -1,13 +1,12 @@ #include #include #include -#include using namespace std; using namespace LIEF; int main() { - std::unique_ptr inst = get_inst(); - std::cout << "address = " << inst.value().address() << std::endl; + LIEF::assembly::aarch64::REG inst = LIEF::assembly::aarch64::REG::D13; + std::cout << "reg = " << LIEF::assembly::aarch64::get_register_name(inst) << std::endl; 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; From f5a0f665bbe856aabe194280a8319cb17fb2c06c 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, 19 Dec 2024 02:23:37 +0300 Subject: [PATCH 106/142] test --- ports/lief/portfile.cmake | 9 --------- ports/lief/vcpkg.json | 16 ---------------- .../test_ports/vcpkg-ci-lief/project/main.cpp | 5 +---- scripts/test_ports/vcpkg-ci-lief/vcpkg.json | 10 ---------- 4 files changed, 1 insertion(+), 39 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 864ec3dd31b898..f3e9b1f8ddea53 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -154,11 +154,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 - - "debug" LIEF_DEBUG_INFO # Build LIEF with DWARF/PDB support - "objc" LIEF_OBJC # Build LIEF with inspect Objective-C metadata support - "dyld" LIEF_DYLD_SHARED_CACHE # Build LIEF with dyld shared cache support - "asm" LIEF_ASM # Build LIEF with assembler/disassembler support ) vcpkg_cmake_configure( @@ -190,10 +185,6 @@ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/lief/LIEFConfig.cmake" vcpkg_fixup_pkgconfig() -if("asm" IN_LIST FEATURES OR "debug" IN_LIST FEATURES OR "dyld-shared-cache" IN_LIST FEATURES OR "objc" 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 e836a57a430b45..c01b6a89b99ca5 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -37,24 +37,12 @@ "art": { "description": "Build LIEF with ART module" }, - "asm": { - "description": "Build LIEF with assembler/disassembler support", - "supports": "!(windows & !static)" - }, "c-api": { "description": "C API" }, - "debug": { - "description": "Build LIEF with DWARF/PDB support", - "supports": "!(windows & !static)" - }, "dex": { "description": "Build LIEF with DEX module" }, - "dyld": { - "description": "Build LIEF with Dyld shared cache support", - "supports": "!(windows & !static)" - }, "elf": { "description": "Build LIEF with ELF module" }, @@ -79,10 +67,6 @@ "oat": { "description": "Build LIEF with OAT module" }, - "objc": { - "description": "Build LIEF with ObjC metadata support", - "supports": "!(windows & !static)" - }, "pe": { "description": "Build LIEF with PE module" }, diff --git a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp index 8d6d3c0cda6eee..881e659baea7c1 100644 --- a/scripts/test_ports/vcpkg-ci-lief/project/main.cpp +++ b/scripts/test_ports/vcpkg-ci-lief/project/main.cpp @@ -1,12 +1,9 @@ #include #include #include -using namespace std; -using namespace LIEF; + int main() { - LIEF::assembly::aarch64::REG inst = LIEF::assembly::aarch64::REG::D13; - std::cout << "reg = " << LIEF::assembly::aarch64::get_register_name(inst) << std::endl; 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; diff --git a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json index ac86c9ab84bcba..d50d4ab9296364 100644 --- a/scripts/test_ports/vcpkg-ci-lief/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-lief/vcpkg.json @@ -22,16 +22,6 @@ "art" ] }, - { - "name": "lief", - "features": [ - "debug", - "objc", - "dyld-shared-cache", - "asm" - ], - "platform": "!(windows & !static)" - }, { "name": "vcpkg-cmake", "host": true From 9013183f77373fd19c3f3101613d18506e2a3e06 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, 19 Dec 2024 02:23:55 +0300 Subject: [PATCH 107/142] 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 840cfd3b034e0a..081b063a46dc83 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9c97e1d8d14d8169a198ce47876a7741d9e1a271", + "git-tree": "d10fa812d9c4bcfd2c09c114c79461a0577af26b", "version-semver": "0.16.0", "port-version": 0 } From 438a291d44453881b51b3e5bf6d38365b8eb1b4a 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, 19 Dec 2024 03:42:34 +0300 Subject: [PATCH 108/142] test --- ports/lief/fix-vcpkg-includes.patch | 65 +++++++++++++++++++++++++++++ ports/lief/portfile.cmake | 26 +----------- 2 files changed, 66 insertions(+), 25 deletions(-) create mode 100644 ports/lief/fix-vcpkg-includes.patch diff --git a/ports/lief/fix-vcpkg-includes.patch b/ports/lief/fix-vcpkg-includes.patch new file mode 100644 index 00000000000000..01b5c89baab7c2 --- /dev/null +++ b/ports/lief/fix-vcpkg-includes.patch @@ -0,0 +1,65 @@ +diff --git a/include/LIEF/errors.hpp b/include/LIEF/errors.hpp +index f731729..3ce71ad 100644 +--- a/include/LIEF/errors.hpp ++++ b/include/LIEF/errors.hpp +@@ -16,7 +16,7 @@ + #ifndef LIEF_ERROR_H + #define LIEF_ERROR_H + #include +-#include ++#include + #include + + /// LIEF error codes definition +diff --git a/include/LIEF/span.hpp b/include/LIEF/span.hpp +index bfda2b8..d9e0e49 100644 +--- a/include/LIEF/span.hpp ++++ b/include/LIEF/span.hpp +@@ -14,7 +14,7 @@ + */ + #ifndef LIEF_SPAN_H + #define LIEF_SPAN_H +-#include ++#include + + namespace LIEF { + +diff --git a/src/BinaryStream/BinaryStream.cpp b/src/BinaryStream/BinaryStream.cpp +index 83e618c..6447b7b 100644 +--- a/src/BinaryStream/BinaryStream.cpp ++++ b/src/BinaryStream/BinaryStream.cpp +@@ -15,7 +15,7 @@ + */ + #include "LIEF/BinaryStream/BinaryStream.hpp" + #include "LIEF/DWARF/enums.hpp" +-#include "third-party/utfcpp.hpp" ++#include + + #include + #include +diff --git a/src/PE/Builder.cpp b/src/PE/Builder.cpp +index 8cbe7b2..994e9bf 100644 +--- a/src/PE/Builder.cpp ++++ b/src/PE/Builder.cpp +@@ -21,7 +21,7 @@ + + #include "logging.hpp" + +-#include "third-party/utfcpp.hpp" ++#include + + + #include "LIEF/PE/Builder.hpp" +diff --git a/src/utils.cpp b/src/utils.cpp +index 0acbba1..b624a1d 100644 +--- a/src/utils.cpp ++++ b/src/utils.cpp +@@ -22,7 +22,7 @@ + #include "LIEF/utils.hpp" + #include "LIEF/errors.hpp" + +-#include "third-party/utfcpp.hpp" ++#include + + #include "LIEF/config.h" + #include "logging.hpp" diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index f3e9b1f8ddea53..06d07011a91080 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-liefconfig-cmake-in.patch + fix-vcpkg-includes.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") @@ -49,21 +50,6 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" " " ) -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 " @@ -126,16 +112,6 @@ 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 From 5fb3aae724f06c194a060d98f1af77e007a22774 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, 19 Dec 2024 03:42:54 +0300 Subject: [PATCH 109/142] 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 081b063a46dc83..54bbdf84a1d64f 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d10fa812d9c4bcfd2c09c114c79461a0577af26b", + "git-tree": "d0f3bee896d9f57551362566ffd17a76bf720ecd", "version-semver": "0.16.0", "port-version": 0 } From f2740d8aaae6be1132141f22ff6b90d4c98f9c8c 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, 19 Dec 2024 03:58:49 +0300 Subject: [PATCH 110/142] check linux --- ports/lief/portfile.cmake | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 06d07011a91080..065c632fc81124 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -105,13 +105,6 @@ 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 "c-api" LIEF_C_API # C API From 4f52ceaa86a16e6387072b9d84001ac13613706c 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, 19 Dec 2024 03:59:09 +0300 Subject: [PATCH 111/142] 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 54bbdf84a1d64f..34c5d3c2aaeb47 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d0f3bee896d9f57551362566ffd17a76bf720ecd", + "git-tree": "f28b07f78e5fb14e9b754bd0569335eb9ad72405", "version-semver": "0.16.0", "port-version": 0 } From 11f78acc3d52c5ba719bb23422152bda31dc5ac2 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, 19 Dec 2024 04:09:42 +0300 Subject: [PATCH 112/142] rollback --- ports/lief/portfile.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 065c632fc81124..06d07011a91080 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -105,6 +105,13 @@ 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 "c-api" LIEF_C_API # C API From 9f4157aa2250d8f5b6e1bbf5a07d6dc7c6ca9ec1 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, 19 Dec 2024 04:10:02 +0300 Subject: [PATCH 113/142] 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 34c5d3c2aaeb47..54bbdf84a1d64f 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f28b07f78e5fb14e9b754bd0569335eb9ad72405", + "git-tree": "d0f3bee896d9f57551362566ffd17a76bf720ecd", "version-semver": "0.16.0", "port-version": 0 } From ef132a3269812b6c779c40f49c7fc03c8de2bf8b 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, 19 Dec 2024 04:16:48 +0300 Subject: [PATCH 114/142] upd patch --- ports/lief/fix-vcpkg-includes.patch | 13 +++++++++++++ ports/lief/portfile.cmake | 5 ----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ports/lief/fix-vcpkg-includes.patch b/ports/lief/fix-vcpkg-includes.patch index 01b5c89baab7c2..e8211b8cbb331d 100644 --- a/ports/lief/fix-vcpkg-includes.patch +++ b/ports/lief/fix-vcpkg-includes.patch @@ -50,6 +50,19 @@ index 8cbe7b2..994e9bf 100644 #include "LIEF/PE/Builder.hpp" +diff --git a/src/logging.cpp b/src/logging.cpp +index 39936fe..f5e1345 100644 +--- a/src/logging.cpp ++++ b/src/logging.cpp +@@ -20,7 +20,7 @@ + #include "logging.hpp" + + #include "spdlog/spdlog.h" +-#include "spdlog/fmt/bundled/args.h" ++#include + #include "spdlog/sinks/stdout_color_sinks.h" + #include "spdlog/sinks/basic_file_sink.h" + #include "spdlog/sinks/android_sink.h" diff --git a/src/utils.cpp b/src/utils.cpp index 0acbba1..b624a1d 100644 --- a/src/utils.cpp diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 06d07011a91080..ed56203bc3d9b8 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -50,11 +50,6 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" " " ) -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 " From 7aa87d87b74b4b853b5432817515daea7ebeab1e 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, 19 Dec 2024 04:17:08 +0300 Subject: [PATCH 115/142] 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 54bbdf84a1d64f..15e2eab46e43e0 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d0f3bee896d9f57551362566ffd17a76bf720ecd", + "git-tree": "7d4bb31423fdff1145249408225840d50380d79c", "version-semver": "0.16.0", "port-version": 0 } From 0ead9273bf73b98f6fd00b2153d2cde8d5dbe96e 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, 19 Dec 2024 04:29:16 +0300 Subject: [PATCH 116/142] test --- ports/lief/portfile.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index ed56203bc3d9b8..e12bc2f0b61778 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -55,10 +55,7 @@ vcpkg_replace_string("${SOURCE_PATH}/src/logging.hpp" "#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"]] From bec34d6c858f483e51a568fb4cf93a989efb58b1 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, 19 Dec 2024 04:29:34 +0300 Subject: [PATCH 117/142] 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 15e2eab46e43e0..d9d86577daea5b 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7d4bb31423fdff1145249408225840d50380d79c", + "git-tree": "1435845be5500c183fcc1ca1fe82f8a4dfb7ebd8", "version-semver": "0.16.0", "port-version": 0 } From 88a54b0a8997c333e6e1d62eb6d81997dcd7c1db 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, 19 Dec 2024 04:57:33 +0300 Subject: [PATCH 118/142] test --- ports/lief/fix-fmt-v11-join.patch | 108 ++++++++++++++++++++++++++++++ ports/lief/portfile.cmake | 48 +------------ 2 files changed, 109 insertions(+), 47 deletions(-) create mode 100644 ports/lief/fix-fmt-v11-join.patch diff --git a/ports/lief/fix-fmt-v11-join.patch b/ports/lief/fix-fmt-v11-join.patch new file mode 100644 index 00000000000000..b49625613c1ed3 --- /dev/null +++ b/ports/lief/fix-fmt-v11-join.patch @@ -0,0 +1,108 @@ +diff --git a/src/MachO/BuildVersion.cpp b/src/MachO/BuildVersion.cpp +index 6b02196..980d14e 100644 +--- a/src/MachO/BuildVersion.cpp ++++ b/src/MachO/BuildVersion.cpp +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + #include ++#include + #include "LIEF/Visitor.hpp" + + #include "frozen.hpp" +diff --git a/src/MachO/DylibCommand.cpp b/src/MachO/DylibCommand.cpp +index f571f84..c4768d1 100644 +--- a/src/MachO/DylibCommand.cpp ++++ b/src/MachO/DylibCommand.cpp +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + #include "spdlog/fmt/fmt.h" ++#include + #include "LIEF/utils.hpp" + #include "LIEF/Visitor.hpp" + +diff --git a/src/MachO/SourceVersion.cpp b/src/MachO/SourceVersion.cpp +index b217229..7b49768 100644 +--- a/src/MachO/SourceVersion.cpp ++++ b/src/MachO/SourceVersion.cpp +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + #include "spdlog/fmt/fmt.h" ++#include + #include "LIEF/Visitor.hpp" + + #include "LIEF/MachO/SourceVersion.hpp" +diff --git a/src/MachO/VersionMin.cpp b/src/MachO/VersionMin.cpp +index e6a6c1f..c29fe65 100644 +--- a/src/MachO/VersionMin.cpp ++++ b/src/MachO/VersionMin.cpp +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + #include "spdlog/fmt/fmt.h" ++#include + #include "LIEF/Visitor.hpp" + + #include "LIEF/MachO/VersionMin.hpp" +diff --git a/src/PE/Header.cpp b/src/PE/Header.cpp +index 0e5d254..53f38bd 100644 +--- a/src/PE/Header.cpp ++++ b/src/PE/Header.cpp +@@ -23,6 +23,7 @@ + #include "frozen.hpp" + + #include ++#include + + namespace LIEF { + namespace PE { +diff --git a/src/PE/OptionalHeader.cpp b/src/PE/OptionalHeader.cpp +index 1f03ec2..67c1d58 100644 +--- a/src/PE/OptionalHeader.cpp ++++ b/src/PE/OptionalHeader.cpp +@@ -23,6 +23,7 @@ + #include "PE/Structures.hpp" + + #include ++#include + + namespace LIEF { + namespace PE { +diff --git a/src/PE/TLS.cpp b/src/PE/TLS.cpp +index 6655244..6a643f0 100644 +--- a/src/PE/TLS.cpp ++++ b/src/PE/TLS.cpp +@@ -21,6 +21,7 @@ + #include "PE/Structures.hpp" + + #include "spdlog/fmt/fmt.h" ++#include + + namespace LIEF { + namespace PE { +diff --git a/src/internal_utils.hpp b/src/internal_utils.hpp +index b01b0c7..47ce1e2 100644 +--- a/src/internal_utils.hpp ++++ b/src/internal_utils.hpp +@@ -22,6 +22,7 @@ + #include + #include + #include "spdlog/fmt/fmt.h" ++#include + + #include "LIEF/span.hpp" + #include "LIEF/errors.hpp" +diff --git a/src/logging.hpp b/src/logging.hpp +index 61a872b..1151b63 100644 +--- a/src/logging.hpp ++++ b/src/logging.hpp +@@ -24,6 +24,7 @@ + + #include + #include ++#include + + #define LIEF_TRACE(...) LIEF::logging::Logger::instance().trace(__VA_ARGS__) + #define LIEF_DEBUG(...) LIEF::logging::Logger::instance().debug(__VA_ARGS__) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index e12bc2f0b61778..3885ee70d54f40 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES fix-liefconfig-cmake-in.patch fix-vcpkg-includes.patch + fix-fmt-v11-join.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") @@ -50,53 +51,6 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" " " ) -vcpkg_replace_string("${SOURCE_PATH}/src/logging.hpp" - "#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 " -) - if (VCPKG_TARGET_IS_LINUX) vcpkg_replace_string("${SOURCE_PATH}/src/internal_utils.hpp" [[#include "LIEF/iterators.hpp"]] From 23e02ddc344f884d0a53ee47c551a187bf9c1a52 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, 19 Dec 2024 04:57:52 +0300 Subject: [PATCH 119/142] 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 d9d86577daea5b..8872a392835266 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1435845be5500c183fcc1ca1fe82f8a4dfb7ebd8", + "git-tree": "000cac1c4f4a9d940a77de1a18ffcbef27327bfa", "version-semver": "0.16.0", "port-version": 0 } From d7ae488d8b069c0cdeeebb112b612456df9b5459 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, 19 Dec 2024 07:02:22 +0300 Subject: [PATCH 120/142] vcpkg ci cmake & pkgconfig --- scripts/test_ports/vcpkg-ci-lief/portfile.cmake | 4 ++++ scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/test_ports/vcpkg-ci-lief/portfile.cmake b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake index 62422cac0028d9..bd9a3f281de342 100644 --- a/scripts/test_ports/vcpkg-ci-lief/portfile.cmake +++ b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake @@ -1,7 +1,11 @@ SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) +vcpkg_find_acquire_program(PKGCONFIG) + vcpkg_cmake_configure( SOURCE_PATH "${CURRENT_PORT_DIR}/project" + OPTIONS + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" ) vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt index 545650d59ed497..4420ff5aa64d0b 100644 --- a/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt +++ b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt @@ -5,7 +5,10 @@ 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) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(LIEF REQUIRED IMPORTED_TARGET LIEF) +add_executable(main2 main.cpp) +target_link_libraries(main2 PRIVATE PkgConfig::LIEF) From 58116d64a7999ac98b5da99e14387cf32b1489ab 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, 19 Dec 2024 07:18:11 +0300 Subject: [PATCH 121/142] check liefconfig --- ports/lief/portfile.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 3885ee70d54f40..b3113062e81ea8 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -100,10 +100,7 @@ vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") -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() From dd34b83e85d4dee12577aa15b9c652e20075ce8f 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, 19 Dec 2024 07:18:29 +0300 Subject: [PATCH 122/142] 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 8872a392835266..736b282d3ac678 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "000cac1c4f4a9d940a77de1a18ffcbef27327bfa", + "git-tree": "aebd5562f6565dbc14bf0aec38dd49c7fd0a4c2a", "version-semver": "0.16.0", "port-version": 0 } From e512c2716732fec83c25fe6ed57cbcfe94168b70 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, 19 Dec 2024 07:39:16 +0300 Subject: [PATCH 123/142] rollback, check only pkgconfig, remove usage --- ports/lief/portfile.cmake | 6 ++++-- ports/lief/usage | 9 --------- scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt | 8 ++------ 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 ports/lief/usage diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index b3113062e81ea8..73f602d67f5559 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -100,7 +100,10 @@ vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LIEF") - +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() @@ -109,5 +112,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" ) -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 deleted file mode 100644 index 720b194ef2a7c1..00000000000000 --- a/ports/lief/usage +++ /dev/null @@ -1,9 +0,0 @@ -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 diff --git a/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt index 4420ff5aa64d0b..58dab6dd72b4f6 100644 --- a/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt +++ b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt @@ -4,11 +4,7 @@ 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) - find_package(PkgConfig REQUIRED) pkg_check_modules(LIEF REQUIRED IMPORTED_TARGET LIEF) -add_executable(main2 main.cpp) -target_link_libraries(main2 PRIVATE PkgConfig::LIEF) +add_executable(main main.cpp) +target_link_libraries(main PRIVATE PkgConfig::LIEF) From 900d3d207d79659b9ad1cd9b573e6294c4684f0c 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, 19 Dec 2024 07:39:36 +0300 Subject: [PATCH 124/142] 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 736b282d3ac678..386303e6a207e3 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "aebd5562f6565dbc14bf0aec38dd49c7fd0a4c2a", + "git-tree": "bf32499b72e0ff3fad94131df4908b0835589858", "version-semver": "0.16.0", "port-version": 0 } From 106b399440d110185c076b23543ab1d30b84b5fc 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, 19 Dec 2024 07:53:03 +0300 Subject: [PATCH 125/142] store only cmake in vcpkg ci --- scripts/test_ports/vcpkg-ci-lief/portfile.cmake | 4 ---- scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/test_ports/vcpkg-ci-lief/portfile.cmake b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake index bd9a3f281de342..62422cac0028d9 100644 --- a/scripts/test_ports/vcpkg-ci-lief/portfile.cmake +++ b/scripts/test_ports/vcpkg-ci-lief/portfile.cmake @@ -1,11 +1,7 @@ SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) -vcpkg_find_acquire_program(PKGCONFIG) - vcpkg_cmake_configure( SOURCE_PATH "${CURRENT_PORT_DIR}/project" - OPTIONS - "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" ) vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt index 58dab6dd72b4f6..9c994ed9893fae 100644 --- a/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt +++ b/scripts/test_ports/vcpkg-ci-lief/project/CMakeLists.txt @@ -4,7 +4,6 @@ project(vcpkg-ci-lief LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 14) -find_package(PkgConfig REQUIRED) -pkg_check_modules(LIEF REQUIRED IMPORTED_TARGET LIEF) +find_package(LIEF CONFIG REQUIRED) add_executable(main main.cpp) -target_link_libraries(main PRIVATE PkgConfig::LIEF) +target_link_libraries(main PRIVATE LIEF::LIEF) From 4115c906d53aab600efe66187bff219b6da759ce 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, 19 Dec 2024 08:21:01 +0300 Subject: [PATCH 126/142] test --- ports/lief/portfile.cmake | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 73f602d67f5559..9309dc770676f3 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -36,19 +36,9 @@ vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "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}]] - " " + [[RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}]] ) if (VCPKG_TARGET_IS_LINUX) From 5f820ffd7450ca8684492930eb6be8a2df42acb7 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, 19 Dec 2024 08:21:16 +0300 Subject: [PATCH 127/142] 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 386303e6a207e3..c6de6164aa89b7 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "bf32499b72e0ff3fad94131df4908b0835589858", + "git-tree": "373ecbd8212757fc2ec1a427f3e66af5c159e24b", "version-semver": "0.16.0", "port-version": 0 } From 3ff8dd3630d2dbdcfcecb8c46848d58ef831f2a8 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, 19 Dec 2024 11:58:46 +0300 Subject: [PATCH 128/142] test --- ports/lief/fix-cmakelists.patch | 49 +++++++++++++++++++++++++++++++++ ports/lief/portfile.cmake | 30 +------------------- 2 files changed, 50 insertions(+), 29 deletions(-) create mode 100644 ports/lief/fix-cmakelists.patch diff --git a/ports/lief/fix-cmakelists.patch b/ports/lief/fix-cmakelists.patch new file mode 100644 index 00000000000000..bb087a6f1538d1 --- /dev/null +++ b/ports/lief/fix-cmakelists.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fc2b679..4ec92b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,19 +113,7 @@ message(STATUS "CMAKE_CXX_IMPLICIT_LINK_LIBRARIES: ${CMAKE_CXX_IMPLICIT_LINK_LIB + message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") + message(STATUS "CMAKE_MSVC_RUNTIME_LIBRARY: ${CMAKE_MSVC_RUNTIME_LIBRARY}") + +-if(LIEF_INSTALL) +- if(UNIX) +- include(GNUInstallDirs) +- set(CMAKE_INSTALL_LIBDIR "lib") +- else() +- set(CMAKE_INSTALL_LIBDIR "lib") +- set(CMAKE_INSTALL_DATADIR "share") + set(CMAKE_INSTALL_INCLUDEDIR "include") +- set(CMAKE_INSTALL_BINDIR "bin") +- set(CMAKE_INSTALL_DATAROOTDIR "share") +- message(STATUS "Setting installation destination to: ${CMAKE_INSTALL_PREFIX}") +- endif() +-endif() + + # LIEF Source definition + # ====================== +@@ -318,7 +306,9 @@ else() + ${CMAKE_CURRENT_BINARY_DIR}/include/LIEF/third-party/internal/span.hpp) + endif() + +-target_link_libraries(LIB_LIEF PRIVATE lief_spdlog) ++find_package(fmt CONFIG REQUIRED) ++find_package(spdlog CONFIG REQUIRED) ++target_link_libraries(LIB_LIEF PRIVATE fmt::fmt spdlog::spdlog) + + if(ANDROID AND LIEF_LOGGING) + target_link_libraries(LIB_LIEF PUBLIC log) +@@ -507,11 +497,11 @@ if(LIEF_INSTALL) + endif() + + install( +- TARGETS LIB_LIEF lief_spdlog ++ TARGETS LIB_LIEF + EXPORT LIEFExport + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + install( diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 9309dc770676f3..a8a90f1afb7946 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -5,6 +5,7 @@ vcpkg_from_github( SHA512 7df75fab6c7023e37a6a4d27fac8dcb4200e0235625fc5952bb23cedb2e582a37fb67ee471c1ae953c0b205fd9cca5538a835f65ef80a771f72dc7ff68000ed9 HEAD_REF master PATCHES + fix-cmakelists.patch fix-liefconfig-cmake-in.patch fix-vcpkg-includes.patch fix-fmt-v11-join.patch @@ -12,35 +13,6 @@ vcpkg_from_github( 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}/CMakeLists.txt" - "TARGETS LIB_LIEF lief_spdlog" - "TARGETS LIB_LIEF" -) - -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_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" - [[RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}]] - [[RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}]] -) - if (VCPKG_TARGET_IS_LINUX) vcpkg_replace_string("${SOURCE_PATH}/src/internal_utils.hpp" [[#include "LIEF/iterators.hpp"]] From 1e5670bdf97a8d7bc59a4e23135c3179537fc7aa 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, 19 Dec 2024 11:59:06 +0300 Subject: [PATCH 129/142] 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 c6de6164aa89b7..39309a7e844238 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "373ecbd8212757fc2ec1a427f3e66af5c159e24b", + "git-tree": "3b0d8e8b50876d600de203fea7fa4355cc928b91", "version-semver": "0.16.0", "port-version": 0 } From e1911bbc38c553a7f093f5968bb057b3eb779a94 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, 20 Dec 2024 08:38:07 +0300 Subject: [PATCH 130/142] tcb/span.hpp --- ports/lief/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index a8a90f1afb7946..a51634e347aeb6 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -56,6 +56,8 @@ vcpkg_cmake_configure( -DLIEF_OPT_EXTERNAL_EXPECTED=ON -DLIEF_DISABLE_FROZEN=OFF -DLIEF_DISABLE_EXCEPTIONS=OFF + + -DLIEF_EXTERNAL_SPAN_DIR="${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET}/include/tcb" ) vcpkg_cmake_install() From fbeb5d319fa50a155c12e1275bd156807fc0972f 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, 20 Dec 2024 08:38:32 +0300 Subject: [PATCH 131/142] 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 39309a7e844238..0ba107a7b05f18 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3b0d8e8b50876d600de203fea7fa4355cc928b91", + "git-tree": "dd45dbfa36149d289aeb862125a2fd765bc0658f", "version-semver": "0.16.0", "port-version": 0 } From 2297141031e90c236b2011652e592d978a64efb0 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: Sun, 22 Dec 2024 05:20:21 +0300 Subject: [PATCH 132/142] fixup --- ports/lief/fix-vcpkg-includes.patch | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/ports/lief/fix-vcpkg-includes.patch b/ports/lief/fix-vcpkg-includes.patch index e8211b8cbb331d..1bcbdcac4bc6e1 100644 --- a/ports/lief/fix-vcpkg-includes.patch +++ b/ports/lief/fix-vcpkg-includes.patch @@ -1,29 +1,3 @@ -diff --git a/include/LIEF/errors.hpp b/include/LIEF/errors.hpp -index f731729..3ce71ad 100644 ---- a/include/LIEF/errors.hpp -+++ b/include/LIEF/errors.hpp -@@ -16,7 +16,7 @@ - #ifndef LIEF_ERROR_H - #define LIEF_ERROR_H - #include --#include -+#include - #include - - /// LIEF error codes definition -diff --git a/include/LIEF/span.hpp b/include/LIEF/span.hpp -index bfda2b8..d9e0e49 100644 ---- a/include/LIEF/span.hpp -+++ b/include/LIEF/span.hpp -@@ -14,7 +14,7 @@ - */ - #ifndef LIEF_SPAN_H - #define LIEF_SPAN_H --#include -+#include - - namespace LIEF { - diff --git a/src/BinaryStream/BinaryStream.cpp b/src/BinaryStream/BinaryStream.cpp index 83e618c..6447b7b 100644 --- a/src/BinaryStream/BinaryStream.cpp From c0c4182478ebf0b53d334a1cb8f3e66062c698f0 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: Sun, 22 Dec 2024 05:20:41 +0300 Subject: [PATCH 133/142] 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 0ba107a7b05f18..7e80423f58239e 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dd45dbfa36149d289aeb862125a2fd765bc0658f", + "git-tree": "c2065a868d169b34f913b306f345dc1ffc2272f1", "version-semver": "0.16.0", "port-version": 0 } From 1e9de7e78c9bcdcdbfcee9b63c526cd5cae69fdc Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 22 Dec 2024 19:02:39 +0300 Subject: [PATCH 134/142] Update ports/lief/portfile.cmake Co-authored-by: WangWeiLin-MV <156736127+WangWeiLin-MV@users.noreply.github.com> --- 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 a51634e347aeb6..64d4dbf69eee38 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -57,7 +57,7 @@ vcpkg_cmake_configure( -DLIEF_DISABLE_FROZEN=OFF -DLIEF_DISABLE_EXCEPTIONS=OFF - -DLIEF_EXTERNAL_SPAN_DIR="${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET}/include/tcb" + "-DLIEF_EXTERNAL_SPAN_DIR=${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET}/include/tcb" ) vcpkg_cmake_install() From 4fc103ed1fc1e1be3b83f77ff5770748786b712b 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: Sun, 22 Dec 2024 19:13:13 +0300 Subject: [PATCH 135/142] removed c-api as default feature. --- ports/lief/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/lief/vcpkg.json b/ports/lief/vcpkg.json index c01b6a89b99ca5..d0ff1a22288e94 100644 --- a/ports/lief/vcpkg.json +++ b/ports/lief/vcpkg.json @@ -23,7 +23,6 @@ ], "default-features": [ "art", - "c-api", "dex", "elf", "enable-json", From d4cd77b7437eea5e3f5b60724bbeca6ebc1a6f9c 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: Sun, 22 Dec 2024 19:14:30 +0300 Subject: [PATCH 136/142] 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 7e80423f58239e..f1ed50e96599bb 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c2065a868d169b34f913b306f345dc1ffc2272f1", + "git-tree": "d1495489979d78d72c63179be3e50b8b211d4b58", "version-semver": "0.16.0", "port-version": 0 } From 3e2ecd328aa696464770358fb098eac20a41699f 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: Mon, 23 Dec 2024 08:34:57 +0300 Subject: [PATCH 137/142] test for linux --- ports/lief/portfile.cmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 64d4dbf69eee38..b44ea4c4d9676b 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -13,12 +13,7 @@ vcpkg_from_github( file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") -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 From 6a67018818c3f020e704787c389d3e8c5cc6972e 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: Mon, 23 Dec 2024 08:35:11 +0300 Subject: [PATCH 138/142] 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 f1ed50e96599bb..85c362d82c0e07 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d1495489979d78d72c63179be3e50b8b211d4b58", + "git-tree": "d0c4ec2ca964e72d5a11b2f6574e21d4e5559fa9", "version-semver": "0.16.0", "port-version": 0 } From 0472a6c42da3aea61374282f32abb699c3415fc1 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: Mon, 23 Dec 2024 08:42:17 +0300 Subject: [PATCH 139/142] revert --- ports/lief/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index b44ea4c4d9676b..64d4dbf69eee38 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -13,7 +13,12 @@ vcpkg_from_github( file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") - +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 From c57d44d40ab39d742a3a7684164e076b66eaeeb4 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: Mon, 23 Dec 2024 08:42:31 +0300 Subject: [PATCH 140/142] 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 85c362d82c0e07..f1ed50e96599bb 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d0c4ec2ca964e72d5a11b2f6574e21d4e5559fa9", + "git-tree": "d1495489979d78d72c63179be3e50b8b211d4b58", "version-semver": "0.16.0", "port-version": 0 } From 62f783268cb7c95311106ba50df7fb7d06c3b0b6 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: Mon, 23 Dec 2024 09:40:41 +0300 Subject: [PATCH 141/142] fixup from upstream --- ports/lief/fix-fmt-v11-join.patch | 108 ------------------------------ ports/lief/portfile.cmake | 16 ++--- 2 files changed, 8 insertions(+), 116 deletions(-) delete mode 100644 ports/lief/fix-fmt-v11-join.patch diff --git a/ports/lief/fix-fmt-v11-join.patch b/ports/lief/fix-fmt-v11-join.patch deleted file mode 100644 index b49625613c1ed3..00000000000000 --- a/ports/lief/fix-fmt-v11-join.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/src/MachO/BuildVersion.cpp b/src/MachO/BuildVersion.cpp -index 6b02196..980d14e 100644 ---- a/src/MachO/BuildVersion.cpp -+++ b/src/MachO/BuildVersion.cpp -@@ -14,6 +14,7 @@ - * limitations under the License. - */ - #include -+#include - #include "LIEF/Visitor.hpp" - - #include "frozen.hpp" -diff --git a/src/MachO/DylibCommand.cpp b/src/MachO/DylibCommand.cpp -index f571f84..c4768d1 100644 ---- a/src/MachO/DylibCommand.cpp -+++ b/src/MachO/DylibCommand.cpp -@@ -14,6 +14,7 @@ - * limitations under the License. - */ - #include "spdlog/fmt/fmt.h" -+#include - #include "LIEF/utils.hpp" - #include "LIEF/Visitor.hpp" - -diff --git a/src/MachO/SourceVersion.cpp b/src/MachO/SourceVersion.cpp -index b217229..7b49768 100644 ---- a/src/MachO/SourceVersion.cpp -+++ b/src/MachO/SourceVersion.cpp -@@ -14,6 +14,7 @@ - * limitations under the License. - */ - #include "spdlog/fmt/fmt.h" -+#include - #include "LIEF/Visitor.hpp" - - #include "LIEF/MachO/SourceVersion.hpp" -diff --git a/src/MachO/VersionMin.cpp b/src/MachO/VersionMin.cpp -index e6a6c1f..c29fe65 100644 ---- a/src/MachO/VersionMin.cpp -+++ b/src/MachO/VersionMin.cpp -@@ -14,6 +14,7 @@ - * limitations under the License. - */ - #include "spdlog/fmt/fmt.h" -+#include - #include "LIEF/Visitor.hpp" - - #include "LIEF/MachO/VersionMin.hpp" -diff --git a/src/PE/Header.cpp b/src/PE/Header.cpp -index 0e5d254..53f38bd 100644 ---- a/src/PE/Header.cpp -+++ b/src/PE/Header.cpp -@@ -23,6 +23,7 @@ - #include "frozen.hpp" - - #include -+#include - - namespace LIEF { - namespace PE { -diff --git a/src/PE/OptionalHeader.cpp b/src/PE/OptionalHeader.cpp -index 1f03ec2..67c1d58 100644 ---- a/src/PE/OptionalHeader.cpp -+++ b/src/PE/OptionalHeader.cpp -@@ -23,6 +23,7 @@ - #include "PE/Structures.hpp" - - #include -+#include - - namespace LIEF { - namespace PE { -diff --git a/src/PE/TLS.cpp b/src/PE/TLS.cpp -index 6655244..6a643f0 100644 ---- a/src/PE/TLS.cpp -+++ b/src/PE/TLS.cpp -@@ -21,6 +21,7 @@ - #include "PE/Structures.hpp" - - #include "spdlog/fmt/fmt.h" -+#include - - namespace LIEF { - namespace PE { -diff --git a/src/internal_utils.hpp b/src/internal_utils.hpp -index b01b0c7..47ce1e2 100644 ---- a/src/internal_utils.hpp -+++ b/src/internal_utils.hpp -@@ -22,6 +22,7 @@ - #include - #include - #include "spdlog/fmt/fmt.h" -+#include - - #include "LIEF/span.hpp" - #include "LIEF/errors.hpp" -diff --git a/src/logging.hpp b/src/logging.hpp -index 61a872b..1151b63 100644 ---- a/src/logging.hpp -+++ b/src/logging.hpp -@@ -24,6 +24,7 @@ - - #include - #include -+#include - - #define LIEF_TRACE(...) LIEF::logging::Logger::instance().trace(__VA_ARGS__) - #define LIEF_DEBUG(...) LIEF::logging::Logger::instance().debug(__VA_ARGS__) diff --git a/ports/lief/portfile.cmake b/ports/lief/portfile.cmake index 64d4dbf69eee38..fb092865883107 100644 --- a/ports/lief/portfile.cmake +++ b/ports/lief/portfile.cmake @@ -1,3 +1,10 @@ +vcpkg_download_distfile( + FIX_FMT_V11_JOIN_LINUX_INCLUDE_MEMORY_PATCH + URLS https://github.com/lief-project/LIEF/commit/41166332a2435fdb7d2bdc5c73f9ff9b442c5459.patch?full_index=1 + FILENAME fix-fmt-v11-join-linux-include-memory-41166332a2435fdb7d2bdc5c73f9ff9b442c5459.patch + SHA512 14d5f7380352bd340c16447905b8185dbd2d977c8ba245e01d982fe7fbbdffb71004b9d4fdd732bc13e71a11aa3f46a4822cdeb2277e2cec6b841492d0de5606 +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lief-project/LIEF @@ -8,18 +15,11 @@ vcpkg_from_github( fix-cmakelists.patch fix-liefconfig-cmake-in.patch fix-vcpkg-includes.patch - fix-fmt-v11-join.patch + "${FIX_FMT_V11_JOIN_LINUX_INCLUDE_MEMORY_PATCH}" ) file(REMOVE_RECURSE "${SOURCE_PATH}/third-party") -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 "c-api" LIEF_C_API # C API From 6d185628caa6200dc1ac72b39a240b516efb1337 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: Mon, 23 Dec 2024 09:40:54 +0300 Subject: [PATCH 142/142] 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 f1ed50e96599bb..2a2893988ae394 100644 --- a/versions/l-/lief.json +++ b/versions/l-/lief.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d1495489979d78d72c63179be3e50b8b211d4b58", + "git-tree": "fafe51c4db1abe4b79e44013592db1c89945740d", "version-semver": "0.16.0", "port-version": 0 }