diff --git a/ports/fastdds/portfile.cmake b/ports/fastdds/portfile.cmake index 1e802fa9a8..7cf842d76e 100644 --- a/ports/fastdds/portfile.cmake +++ b/ports/fastdds/portfile.cmake @@ -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} ) diff --git a/ports/fastdds/vcpkg.json b/ports/fastdds/vcpkg.json index 014c85b3cf..6955eb1043 100644 --- a/ports/fastdds/vcpkg.json +++ b/ports/fastdds/vcpkg.json @@ -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", diff --git a/ports/foonathan-memory/config-debug.diff b/ports/foonathan-memory/config-debug.diff new file mode 100644 index 0000000000..53fc176f63 --- /dev/null +++ b/ports/foonathan-memory/config-debug.diff @@ -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 ++ $<$:Z_VCPKG_FOONATHAN_MEMORY_DEBUG=1> ++ $<$>:Z_VCPKG_FOONATHAN_MEMORY_DEBUG=0> ++) + + if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + if("${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") diff --git a/ports/foonathan-memory/config_impl.hpp b/ports/foonathan-memory/config_impl.hpp new file mode 100644 index 0000000000..da18680ef6 --- /dev/null +++ b/ports/foonathan-memory/config_impl.hpp @@ -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 diff --git a/ports/foonathan-memory/fix-foonathan-memory-include-install-dir.patch b/ports/foonathan-memory/fix-foonathan-memory-include-install-dir.patch deleted file mode 100644 index 29e76ed2e4..0000000000 --- a/ports/foonathan-memory/fix-foonathan-memory-include-install-dir.patch +++ /dev/null @@ -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") diff --git a/ports/foonathan-memory/portfile.cmake b/ports/foonathan-memory/portfile.cmake index d883ffd645..e558940db3 100644 --- a/ports/foonathan-memory/portfile.cmake +++ b/ports/foonathan-memory/portfile.cmake @@ -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") diff --git a/ports/foonathan-memory/vcpkg.json b/ports/foonathan-memory/vcpkg.json index a029fc81e3..fe9547fdc9 100644 --- a/ports/foonathan-memory/vcpkg.json +++ b/ports/foonathan-memory/vcpkg.json @@ -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", diff --git a/versions/baseline.json b/versions/baseline.json index f125cbe2a7..18848a27c6 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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", diff --git a/versions/f-/fastdds.json b/versions/f-/fastdds.json index e68ce9ec89..bb3245cacd 100644 --- a/versions/f-/fastdds.json +++ b/versions/f-/fastdds.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b1431d5adb47acec8c108f251c320a96b977ec0e", + "version": "3.2.2", + "port-version": 1 + }, { "git-tree": "58259a8b61b520ae03e8f42581cc2a8f1ca7666e", "version": "3.2.2", diff --git a/versions/f-/foonathan-memory.json b/versions/f-/foonathan-memory.json index 2e14b761c7..51535065bf 100644 --- a/versions/f-/foonathan-memory.json +++ b/versions/f-/foonathan-memory.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b7f3ed99ac6090ee83925ba9a5da9582e84ffc25", + "version": "0.7.4", + "port-version": 0 + }, { "git-tree": "62a9fbf293e4ef285b97f9bc5f39294ed2893a4c", "version": "0.7.3",