From 81ff999523897c52d18ad674ed355951b01bc03a Mon Sep 17 00:00:00 2001 From: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:43:22 +0000 Subject: [PATCH] [wampcc] Update to 2024-07-10 and fix dependencies (#42629) Co-authored-by: Monica --- ports/wampcc/fix-dependencies.patch | 45 +++++++++++++++++++++++++++++ ports/wampcc/gcc-11.patch | 19 ------------ ports/wampcc/portfile.cmake | 12 ++++---- ports/wampcc/vcpkg.json | 7 +++-- versions/baseline.json | 4 +-- versions/w-/wampcc.json | 5 ++++ 6 files changed, 64 insertions(+), 28 deletions(-) create mode 100644 ports/wampcc/fix-dependencies.patch delete mode 100644 ports/wampcc/gcc-11.patch diff --git a/ports/wampcc/fix-dependencies.patch b/ports/wampcc/fix-dependencies.patch new file mode 100644 index 0000000000..16e0bf3cee --- /dev/null +++ b/ports/wampcc/fix-dependencies.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ca5a738..5e65bcf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,9 +95,7 @@ set(HAVE_JANSSON ON) + ## Find Threads on Linux systems, for compiling EXAMPLES or UTILS + ## + +-if(CMAKE_HOST_UNIX) +- find_package(Threads REQUIRED) +-endif() ++find_package(Threads REQUIRED) + + message(STATUS "OpenSSL_INCLUDE_DIR: " ${OPENSSL_INCLUDE_DIR}) + message(STATUS "OpenSSL_LIBRARIES: " ${OPENSSL_LIBRARIES}) +diff --git a/cmake/wampccConfig.cmake.in b/cmake/wampccConfig.cmake.in +index 8c4bed5..7ef2483 100644 +--- a/cmake/wampccConfig.cmake.in ++++ b/cmake/wampccConfig.cmake.in +@@ -13,9 +13,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/find_modules") + find_dependency(OpenSSL REQUIRED) + find_dependency(LibUV REQUIRED) + find_dependency(Jansson REQUIRED) +-if(CMAKE_HOST_UNIX) +- find_dependency(Threads REQUIRED) +-endif() ++find_dependency(Threads REQUIRED) + + # Restore old path + set(CMAKE_MODULE_PATH "${wampcc_original_module_path}") +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index ee2bb06..0284808 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -14,10 +14,6 @@ endif() + macro(Compile_Example example source_path) + add_executable(${example} "${PROJECT_SOURCE_DIR}/examples/${source_path}/${example}.cc") + target_link_libraries (${example} PRIVATE ${EXTRA_LIBS}) +- +- if (WIN32) +- set_target_properties(${example} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib") +- endif() + endmacro() + + diff --git a/ports/wampcc/gcc-11.patch b/ports/wampcc/gcc-11.patch deleted file mode 100644 index 2a49f5aeff..0000000000 --- a/ports/wampcc/gcc-11.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/examples/message_server/message_subscriber.cc b/examples/message_server/message_subscriber.cc -index ba40a332..4ac75ef7 100644 ---- a/examples/message_server/message_subscriber.cc -+++ b/examples/message_server/message_subscriber.cc -@@ -7,13 +7,9 @@ - - #include "wampcc/kernel.h" - #include "wampcc/data_model.h" --#include "wampcc/tcp_socket.h" --#include "wampcc/wamp_session.h" - #include "wampcc/rawsocket_protocol.h" - --#include --#include -- -+#include - - void on_string_change(const wampcc::string_subscription& sub) - { diff --git a/ports/wampcc/portfile.cmake b/ports/wampcc/portfile.cmake index 83157bb9e4..5ef3721aa6 100644 --- a/ports/wampcc/portfile.cmake +++ b/ports/wampcc/portfile.cmake @@ -7,12 +7,12 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO darrenjs/wampcc - REF 43d10a7ccf37ec1b895742712dd4a05577b73ff1 - SHA512 e830d26de00e8f5f378145f06691cb16121c40d3bd2cd663fad9a97db37251a11b56053178b619e3a2627f0cd518b6290a8381b26e517a9f16f0246d2f91958e + REF 2963fd47b6775122aa45f83ed50a58ce2444ec64 + SHA512 19883f1dffb1967e6da9f613bb1aff93693e66c2617e8ff53eabe7965a2a9ac83d6da67e1629666cbc8f349eba0466f54edd22fc3c0fe0b4bf7e6a6f33c9e25b HEAD_REF master PATCHES - gcc-11.patch # https://github.com/darrenjs/wampcc/commit/d1a8c6dcabcc32e9d9774f306555e9080d871c2f add-include-chrono.patch #https://github.com/darrenjs/wampcc/pull/85 + fix-dependencies.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -34,7 +34,9 @@ if("utils" IN_LIST FEATURES) vcpkg_copy_tools(TOOL_NAMES admin AUTO_CLEAN) endif() +vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/wampcc") + vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - -vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/wampcc/vcpkg.json b/ports/wampcc/vcpkg.json index e5c55f76af..dd6eac5b62 100644 --- a/ports/wampcc/vcpkg.json +++ b/ports/wampcc/vcpkg.json @@ -1,7 +1,6 @@ { "name": "wampcc", - "version-date": "2019-09-04", - "port-version": 6, + "version-date": "2024-07-10", "description": "Wampcc is C++ library that implements the Web Application Messaging Protocol (WAMP) protocol.", "license": "MIT", "supports": "!(windows & arm64)", @@ -12,6 +11,10 @@ { "name": "vcpkg-cmake", "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ], "features": { diff --git a/versions/baseline.json b/versions/baseline.json index d2e3978027..0dbe512b14 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9589,8 +9589,8 @@ "port-version": 0 }, "wampcc": { - "baseline": "2019-09-04", - "port-version": 6 + "baseline": "2024-07-10", + "port-version": 0 }, "wangle": { "baseline": "2024.12.02.00", diff --git a/versions/w-/wampcc.json b/versions/w-/wampcc.json index a2c234d29d..6dc68336e6 100644 --- a/versions/w-/wampcc.json +++ b/versions/w-/wampcc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "15d57a2776d6a7a6708a6802990837cd5bbd83ec", + "version-date": "2024-07-10", + "port-version": 0 + }, { "git-tree": "87cce5b744b64992e4a83bf9dddfc5d28abfd0ec", "version-date": "2019-09-04",