From 5d27b1b578e4978689cdbf446f7b77b3db3bc639 Mon Sep 17 00:00:00 2001 From: Andrew Kornilov Date: Tue, 13 Dec 2022 03:00:12 +0300 Subject: [PATCH] [fastcdr] Update to 1.0.25 (#28149) * [fastcdr] Update to 1.0.25 * Update version database --- ports/fastcdr/install-cmake.patch | 13 ------------- ports/fastcdr/pdb-file.patch | 13 +++++++++++++ ports/fastcdr/portfile.cmake | 27 ++++++++++----------------- ports/fastcdr/vcpkg.json | 16 +++++++++++++--- versions/baseline.json | 4 ++-- versions/f-/fastcdr.json | 5 +++++ 6 files changed, 43 insertions(+), 35 deletions(-) delete mode 100644 ports/fastcdr/install-cmake.patch create mode 100644 ports/fastcdr/pdb-file.patch diff --git a/ports/fastcdr/install-cmake.patch b/ports/fastcdr/install-cmake.patch deleted file mode 100644 index 04296897b2..0000000000 --- a/ports/fastcdr/install-cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt -index 14747c9..65c3ddb 100644 ---- a/src/cpp/CMakeLists.txt -+++ b/src/cpp/CMakeLists.txt -@@ -155,7 +155,7 @@ elseif(NOT EPROSIMA_INSTALLER) - COMPONENT cmake - ) - -- if(MSVC OR MSVC_IDE) -+ if(MSVC OR MSVC_IDE AND 0) - if(TARGET_TYPE STREQUAL "SHARED_LIBRARY") - # Install pdb files - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Debug/ diff --git a/ports/fastcdr/pdb-file.patch b/ports/fastcdr/pdb-file.patch new file mode 100644 index 0000000000..94b307e99e --- /dev/null +++ b/ports/fastcdr/pdb-file.patch @@ -0,0 +1,13 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index da35d03..343f038 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -195,7 +195,7 @@ elseif(NOT EPROSIMA_INSTALLER) + endif() + + # install symbols if any +- if(PDB_FILE) ++ if(PDB_FILE AND BUILD_SHARED_LIBS) + install(FILES ${PDB_FILE} + DESTINATION ${LIB_INSTALL_DIR}${MSVCARCH_DIR_EXTENSION} + COMPONENT symbols diff --git a/ports/fastcdr/portfile.cmake b/ports/fastcdr/portfile.cmake index 1bd5034a71..7427220fcb 100644 --- a/ports/fastcdr/portfile.cmake +++ b/ports/fastcdr/portfile.cmake @@ -1,22 +1,19 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eProsima/Fast-CDR - REF 065d49248bd4afbae670836ee1f1c718b9760dde # v1.0.15 - SHA512 1e011f1848abace94299368a5150f9f7513a676ccdc2b2247cebcb098f7b397e9bd20f5663bc35ea9921b1c91654af39e19b867b73c38bdc5612e0e2b926743a + REF v1.0.25 + SHA512 6a20e8ba61fb516fce35bb27f02db8fb45f287bfd49574dcb39e149e6edde0b4d0598f00399a4d0557ca1f6133d96a6701d6475cbd9039879cddb5089b0ef447 HEAD_REF master - PATCHES install-cmake.patch + PATCHES + pdb-file.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DCMAKE_DISABLE_FIND_PACKAGE_GTest=ON -) +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fastcdr) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fastcdr) vcpkg_copy_pdbs() @@ -24,13 +21,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h EPROSIMA_AUTO_LINK_H) - string(REPLACE "#define EPROSIMA_LIB_PREFIX \"lib\"" "#define EPROSIMA_LIB_PREFIX" EPROSIMA_AUTO_LINK_H "${EPROSIMA_AUTO_LINK_H}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h "${EPROSIMA_AUTO_LINK_H}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h" "#define EPROSIMA_LIB_PREFIX \"lib\"" "#define EPROSIMA_LIB_PREFIX") else() - file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h FASTCDR_H) - string(REPLACE "#define _FASTCDR_CONFIG_H_" "#define _FASTCDR_CONFIG_H_\r\n#define FASTCDR_DYN_LINK" FASTCDR_H "${FASTCDR_H}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h "${FASTCDR_H}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h" "#define _FASTCDR_CONFIG_H_" "#define _FASTCDR_CONFIG_H_\r\n#define FASTCDR_DYN_LINK") endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fastcdr/vcpkg.json b/ports/fastcdr/vcpkg.json index 0f2241e4eb..c799948357 100644 --- a/ports/fastcdr/vcpkg.json +++ b/ports/fastcdr/vcpkg.json @@ -1,7 +1,17 @@ { "name": "fastcdr", - "version-semver": "1.0.15", - "port-version": 1, + "version-semver": "1.0.25", "description": "eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard.", - "homepage": "https://github.com/eProsima/Fast-CDR" + "homepage": "https://github.com/eProsima/Fast-CDR", + "license": "Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] } diff --git a/versions/baseline.json b/versions/baseline.json index 585a1d20a7..23572f4755 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2249,8 +2249,8 @@ "port-version": 0 }, "fastcdr": { - "baseline": "1.0.15", - "port-version": 1 + "baseline": "1.0.25", + "port-version": 0 }, "fastcgi": { "baseline": "2020-09-11", diff --git a/versions/f-/fastcdr.json b/versions/f-/fastcdr.json index 6a8cb5af31..f3d1151972 100644 --- a/versions/f-/fastcdr.json +++ b/versions/f-/fastcdr.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "770f5d0a255b922f7f1ef8c375ef4f13b0111252", + "version-semver": "1.0.25", + "port-version": 0 + }, { "git-tree": "d44198a7b4b57e8f66b4c3ce6b4877066a4a8bf2", "version-semver": "1.0.15",