[foonathan-memory] Update to 0.7-4 (#45542)

This commit is contained in:
Kai Pastor 2025-05-16 17:02:37 +02:00 committed by GitHub
parent 9dd12f8d79
commit 87b407e27f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 61 additions and 102 deletions

View File

@ -24,6 +24,7 @@ endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DFORCE_CXX=14 # foonathan memory debug needs C++14 constexpr
${extra_opts}
)

View File

@ -1,6 +1,7 @@
{
"name": "fastdds",
"version": "3.2.2",
"port-version": 1,
"description": "eprosima Fast DDS (formerly Fast RTPS) is a C++ implementation of the DDS (Data Distribution Service) standard of the OMG (Object Management Group). eProsima Fast DDS implements the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium.",
"homepage": "https://www.eprosima.com/",
"license": "Apache-2.0",

View File

@ -0,0 +1,15 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e736ae5..9aa61eb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -93,6 +93,10 @@ target_compile_definitions(foonathan_memory PUBLIC
if(NOT MSVC)
target_compile_features(foonathan_memory PUBLIC cxx_constexpr)
endif()
+target_compile_definitions(foonathan_memory INTERFACE
+ $<$<CONFIG:DEBUG>:Z_VCPKG_FOONATHAN_MEMORY_DEBUG=1>
+ $<$<NOT:$<CONFIG:DEBUG>>:Z_VCPKG_FOONATHAN_MEMORY_DEBUG=0>
+)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
if("${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")

View File

@ -0,0 +1,13 @@
#ifndef Z_VCPKG_FOONATHAN_MEMORY_DEBUG
# if defined(NDEBUG) && !defined(_DEBUG)
# define Z_VCPKG_FOONATHAN_MEMORY_DEBUG 0
# else
# define Z_VCPKG_FOONATHAN_MEMORY_DEBUG 1
# endif
#endif
#if Z_VCPKG_FOONATHAN_MEMORY_DEBUG
# include "config_impl-debug.hpp"
#else
# include "config_impl-release.hpp"
#endif

View File

@ -1,22 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ddbc459..06c4165 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ set(CMAKE_DEBUG_POSTFIX "-dbg")
if(UNIX OR VXWORKS)
include(GNUInstallDirs)
- set(FOONATHAN_MEMORY_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/foonathan_memory")
+ set(FOONATHAN_MEMORY_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
set(FOONATHAN_MEMORY_RUNTIME_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
set(FOONATHAN_MEMORY_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
set(FOONATHAN_MEMORY_ARCHIVE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
@@ -29,7 +29,7 @@ if(UNIX OR VXWORKS)
set(FOONATHAN_MEMORY_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/foonathan_memory/cmake")
set(FOONATHAN_MEMORY_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/foonathan_memory")
elseif(WIN32)
- set(FOONATHAN_MEMORY_INC_INSTALL_DIR "include/foonathan_memory")
+ set(FOONATHAN_MEMORY_INC_INSTALL_DIR "include/")
set(FOONATHAN_MEMORY_RUNTIME_INSTALL_DIR "bin")
set(FOONATHAN_MEMORY_LIBRARY_INSTALL_DIR "bin")
set(FOONATHAN_MEMORY_ARCHIVE_INSTALL_DIR "lib")

View File

@ -1,31 +1,13 @@
vcpkg_download_distfile(
REMOVE_TOOL_STATIC_LINKING_CROSS_COMPILATION_PATCH
URLS https://github.com/foonathan/memory/commit/abb0bff7a232572b1fce304dd2e2a2d5c0a6806c.patch?full_index=1
FILENAME foonathan-memory-abb0bff7a232572b1fce304dd2e2a2d5c0a6806c.patch
SHA512 9f16c9465a6475771241470925f34ead2281c5e2f7d9c4ddaceab77fa3775b8a63ccb6dde00061d74924f838a6d204ab70427f9ae5369245b5e9e971472e862f
)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO foonathan/memory
REF "v0.7-3"
SHA512 302a046e204d1cd396a4a36b559d3360d17801d99f0f22b58314ff66706ae86ce4f364731004c1c293e01567a9510229cda7fc4978e0e47740176026d47e8403
REF "v0.7-4"
SHA512 fe6d429644c3e5edfb5666e4047ece45766fa5907094903cbd1e5b91e164fa31b7596ea5627e0272cbb8ea0a2b26a1f57564c797874718396ea87d8fad7ab559
HEAD_REF master
PATCHES
fix-foonathan-memory-include-install-dir.patch
"${REMOVE_TOOL_STATIC_LINKING_CROSS_COMPILATION_PATCH}"
config-debug.diff
)
vcpkg_from_github(
OUT_SOURCE_PATH COMP_SOURCE_PATH
REPO foonathan/compatibility
REF cd142129e30f5b3e6c6d96310daf94242c0b03bf
SHA512 1d144f82ec46dcc546ee292846330d39536a3145e5a5d8065bda545f55699aeb9a4ef7dea5e5f684ce2327fad210488fe6bb4ba7f84ceac867ac1c72b90c6d69
HEAD_REF master
)
file(COPY "${COMP_SOURCE_PATH}/comp_base.cmake" DESTINATION "${SOURCE_PATH}/cmake/comp")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES
tool FOONATHAN_MEMORY_BUILD_TOOLS
)
@ -36,79 +18,39 @@ vcpkg_cmake_configure(
${FEATURE_OPTIONS}
-DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF
-DFOONATHAN_MEMORY_BUILD_TESTS=OFF
OPTIONS_DEBUG
-DFOONATHAN_MEMORY_BUILD_TOOLS=OFF
)
vcpkg_cmake_install()
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/foonathan_memory/cmake")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/foonathan_memory/cmake PACKAGE_NAME foonathan_memory)
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/share/foonathan_memory/cmake")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_cmake_config_fixup(CONFIG_PATH share/foonathan_memory/cmake PACKAGE_NAME foonathan_memory)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/foonathan_memory/cmake PACKAGE_NAME foonathan_memory)
endif()
vcpkg_copy_pdbs()
# Place header files into the right folders
# The original layout is not a problem for CMake-based project.
file(COPY
${COMP_INCLUDE_FILES}
DESTINATION "${CURRENT_PACKAGES_DIR}/include/foonathan"
)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/lib/foonathan_memory"
"${CURRENT_PACKAGES_DIR}/debug/lib/foonathan_memory"
)
# Place header files into the right folders - Done!
# The Debug version of this lib is built with:
# #define FOONATHAN_MEMORY_DEBUG_FILL 1
# and Release version is built with:
# #define FOONATHAN_MEMORY_DEBUG_FILL 0
# We only have the Release version header files installed, however.
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/include/foonathan/memory/detail/debug_helpers.hpp"
"#if FOONATHAN_MEMORY_DEBUG_FILL"
"#ifndef NDEBUG //#if FOONATHAN_MEMORY_DEBUG_FILL"
)
if(NOT VCPKG_BUILD_TYPE)
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/include/foonathan/memory/config_impl.hpp" "${CURRENT_PACKAGES_DIR}/include/foonathan/memory/config_impl-debug.hpp")
file(RENAME "${CURRENT_PACKAGES_DIR}/include/foonathan/memory/config_impl.hpp" "${CURRENT_PACKAGES_DIR}/include/foonathan/memory/config_impl-release.hpp")
file(COPY_FILE "${CURRENT_PORT_DIR}/config_impl.hpp" "${CURRENT_PACKAGES_DIR}/include/foonathan/memory/config_impl.hpp")
endif()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/lib/foonathan_memory"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(REMOVE
"${CURRENT_PACKAGES_DIR}/debug/LICENSE"
"${CURRENT_PACKAGES_DIR}/debug/README.md"
"${CURRENT_PACKAGES_DIR}/lib/foonathan_memory"
"${CURRENT_PACKAGES_DIR}/LICENSE"
"${CURRENT_PACKAGES_DIR}/README.md"
)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR
VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(EXECUTABLE_SUFFIX ".exe")
else()
set(EXECUTABLE_SUFFIX "")
if("tool" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES nodesize_dbg AUTO_CLEAN)
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX}")
file(COPY
"${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX}"
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}"
)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
else()
file(REMOVE
"${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX}"
"${CURRENT_PACKAGES_DIR}/debug/bin/nodesize_dbg${EXECUTABLE_SUFFIX}"
)
endif()
endif()
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,7 +1,6 @@
{
"name": "foonathan-memory",
"version": "0.7.3",
"port-version": 2,
"version": "0.7.4",
"description": "STL compatible C++ memory allocator library",
"homepage": "https://foonathan.net/doc/memory/",
"license": "Zlib",

View File

@ -2750,7 +2750,7 @@
},
"fastdds": {
"baseline": "3.2.2",
"port-version": 0
"port-version": 1
},
"fastfeat": {
"baseline": "391d5e9",
@ -2945,8 +2945,8 @@
"port-version": 0
},
"foonathan-memory": {
"baseline": "0.7.3",
"port-version": 2
"baseline": "0.7.4",
"port-version": 0
},
"forge": {
"baseline": "1.0.8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b1431d5adb47acec8c108f251c320a96b977ec0e",
"version": "3.2.2",
"port-version": 1
},
{
"git-tree": "58259a8b61b520ae03e8f42581cc2a8f1ca7666e",
"version": "3.2.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b7f3ed99ac6090ee83925ba9a5da9582e84ffc25",
"version": "0.7.4",
"port-version": 0
},
{
"git-tree": "62a9fbf293e4ef285b97f9bc5f39294ed2893a4c",
"version": "0.7.3",