From 75f7b1a0a7da2a4f027413592918cbf7b098f6de Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Thu, 5 Dec 2024 20:44:28 +0200 Subject: [PATCH] Ports: - Update msquic to 3.4.7 - Update msh3 to 0.7.0 --- ports/msh3/dependencies_fix.patch | 24 +++++++++--------- ports/msh3/portfile.cmake | 2 +- ports/msh3/vcpkg.json | 5 ++-- ports/msquic/all_headers.patch | 13 ---------- ports/msquic/fix-install.patch | 41 ++++++++++++++----------------- ports/msquic/portfile.cmake | 7 ++++-- ports/msquic/vcpkg.json | 3 +-- versions/baseline.json | 8 +++--- versions/m-/msh3.json | 5 ++++ versions/m-/msquic.json | 5 ++++ 10 files changed, 54 insertions(+), 59 deletions(-) delete mode 100644 ports/msquic/all_headers.patch diff --git a/ports/msh3/dependencies_fix.patch b/ports/msh3/dependencies_fix.patch index db8eb244b8b051..7999fbf80bf7a0 100644 --- a/ports/msh3/dependencies_fix.patch +++ b/ports/msh3/dependencies_fix.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4bd7155..b7adecc 100644 +index d8a81ab..ea7626e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -72,7 +72,7 @@ target_include_directories(msh3_headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +@@ -66,7 +66,7 @@ target_include_directories(msh3_headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) option(LSQPACK_TESTS "Build tests" OFF) option(LSQPACK_BIN "Build binaries" OFF) @@ -11,35 +11,37 @@ index 4bd7155..b7adecc 100644 # Configure and build msquic dependency. if (WIN32) -@@ -83,8 +83,9 @@ endif() +@@ -77,8 +77,8 @@ endif() set(QUIC_BUILD_SHARED ON CACHE BOOL "Builds MsQuic as a dynamic library") set(QUIC_ENABLE_LOGGING ON CACHE BOOL "Enable MsQuic logging") set(CMAKE_BUILD_TYPE "Release") -add_subdirectory(msquic) -target_compile_features(inc INTERFACE cxx_std_20) +find_package(msquic CONFIG REQUIRED) -+ +target_compile_features(msh3_headers INTERFACE cxx_std_20) # Build msh3 library (and cmd line tool). add_subdirectory(lib) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index ab7fc24..c488486 100644 +index 4d7aeb7..4796fed 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt -@@ -7,10 +7,7 @@ else() +@@ -7,11 +7,10 @@ else() set(SOURCES msh3.cpp) endif() add_library(msh3 SHARED ${SOURCES}) -target_link_libraries(msh3 PRIVATE inc warnings msquic ls-qpack msh3_headers) -if (NOT BUILD_SHARED_LIBS) - target_link_libraries(msh3 PRIVATE base_link) --endif() -+target_link_libraries(msh3 PRIVATE msquic ls-qpack::ls-qpack msh3_headers) - if (MSH3_SERVER_SUPPORT) - target_link_libraries(msh3 PRIVATE platform) # For selfsign APIs ++target_link_libraries(msh3 PRIVATE msquic::msquic msquic::msquic_platform ls-qpack::ls-qpack msh3_headers) ++if(WIN32) ++ target_link_libraries(msh3 PRIVATE ncrypt crypt32) endif() -@@ -26,7 +23,11 @@ elseif (CX_PLATFORM STREQUAL "darwin") +-target_link_libraries(msh3 PRIVATE platform) # For selfsign APIs + + if(WIN32) + SET_TARGET_PROPERTIES(msh3 +@@ -24,7 +23,11 @@ elseif (CX_PLATFORM STREQUAL "darwin") PROPERTIES LINK_FLAGS "-exported_symbols_list \"${CMAKE_CURRENT_SOURCE_DIR}/darwin/exports.txt\"") endif() diff --git a/ports/msh3/portfile.cmake b/ports/msh3/portfile.cmake index 80a4323e28596a..b7ed288648df6a 100644 --- a/ports/msh3/portfile.cmake +++ b/ports/msh3/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nibanks/msh3 REF v${VERSION} - SHA512 e6ba4e8f4ce5cd3f586d61739148bf75dfddbe70f399b2e498e7d416c8d730a5f8c2c38f0eabe687049bb7525df44f5f511515ec578bc3832989f73961cdda72 + SHA512 dedd8be43e44b4bebbf601d76b1f3b0135501330ed128ca710de942ef7d9142a21f1c1eb9efecf57881e72d93d68c7c2c085bc35d402eac5eabc57e77773be6b HEAD_REF main PATCHES dependencies_fix.patch diff --git a/ports/msh3/vcpkg.json b/ports/msh3/vcpkg.json index ee931458263acc..2fe06cc3b861d3 100644 --- a/ports/msh3/vcpkg.json +++ b/ports/msh3/vcpkg.json @@ -1,11 +1,10 @@ { "name": "msh3", - "version": "0.6.0", - "port-version": 1, + "version": "0.7.0", "description": "Minimal HTTP/3 library", "homepage": "https://github.com/nibanks/msh3", "license": "MIT", - "supports": "!uwp", + "supports": "!uwp & !osx & !(windows & x86)", "dependencies": [ "ls-qpack", "msquic", diff --git a/ports/msquic/all_headers.patch b/ports/msquic/all_headers.patch deleted file mode 100644 index fb231040899ae6..00000000000000 --- a/ports/msquic/all_headers.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt -index d0592a320..07df9daf7 100644 ---- a/src/bin/CMakeLists.txt -+++ b/src/bin/CMakeLists.txt -@@ -269,6 +269,8 @@ set(PUBLIC_HEADERS - ../inc/msquic_posix.h - ../inc/quic_sal_stub.h) - -+file(GLOB PUBLIC_HEADERS "../inc/*.h" "../inc/*.hpp") -+ - install(TARGETS msquic EXPORT msquic - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib diff --git a/ports/msquic/fix-install.patch b/ports/msquic/fix-install.patch index 5b462577402073..b4edce491f22d3 100644 --- a/ports/msquic/fix-install.patch +++ b/ports/msquic/fix-install.patch @@ -1,38 +1,33 @@ diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt -index 2376823..d0592a3 100644 +index 18048e3b7..241c75511 100644 --- a/src/bin/CMakeLists.txt +++ b/src/bin/CMakeLists.txt -@@ -253,14 +253,14 @@ endif() - if(BUILD_SHARED_LIBS) - target_include_directories(msquic PUBLIC - $ -- $) -+ $) - else() - target_include_directories(msquic_static INTERFACE - $ -- $) -+ $) - target_include_directories(msquic INTERFACE - $ -- $) -+ $) +@@ -260,20 +260,20 @@ if(WIN32) + list(APPEND OTHER_TARGETS MsQuicEtw_Header) endif() - set(PUBLIC_HEADERS -@@ -269,11 +269,10 @@ set(PUBLIC_HEADERS - ../inc/msquic_posix.h - ../inc/quic_sal_stub.h) - -if(BUILD_SHARED_LIBS) -- install(TARGETS msquic EXPORT msquic DESTINATION lib) +- install(TARGETS msquic msquic_platform inc logging_inc warnings main_binary_link_args ${OTHER_TARGETS} EXPORT msquic DESTINATION lib) -else() - install(FILES ${QUIC_STATIC_LIBRARY} DESTINATION lib) -endif() -+install(TARGETS msquic EXPORT msquic ++install(TARGETS msquic msquic_platform inc logging_inc warnings main_binary_link_args ${OTHER_TARGETS} EXPORT msquic + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) install(FILES ${PUBLIC_HEADERS} DESTINATION include) configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake) + + install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION share/msquic) + +-if(BUILD_SHARED_LIBS) +- install(EXPORT msquic DESTINATION share/msquic) +-endif() ++install( ++ EXPORT msquic ++ NAMESPACE msquic:: ++ DESTINATION share/msquic) + + if (MSVC AND NOT QUIC_ENABLE_SANITIZERS AND BUILD_SHARED_LIBS) + target_compile_options(msquic PRIVATE /analyze) diff --git a/ports/msquic/portfile.cmake b/ports/msquic/portfile.cmake index c356c2f537ffa3..41268167fd79e6 100644 --- a/ports/msquic/portfile.cmake +++ b/ports/msquic/portfile.cmake @@ -4,13 +4,12 @@ vcpkg_from_github( OUT_SOURCE_PATH QUIC_SOURCE_PATH REPO microsoft/msquic REF "v${VERSION}" - SHA512 51afee7e28a7d6ae1b5491edd635e0c88a92a00bacedeaac632a0f19762e9940c9b819a9d33072d3553c004acd4ec0cdf645301f712b408498053de065b2b1cf + SHA512 c6e4b5f5d9b7e92469a6733a99eaf677909a5b2287869f0bbcc61fbcda6db4a6e920b327ede43fc9b1b0a3d09518c568dc1f38ad5fbb3ace14c1c031012b9968 HEAD_REF master PATCHES fix-install.patch # Adjust install path of build outputs fix-uwp-crt.patch # https://github.com/microsoft/msquic/pull/4373 fix-comparing-system-processor-with-win32.patch # https://github.com/microsoft/msquic/pull/4374 - all_headers.patch ) # This avoids a link error on x86-windows: @@ -77,3 +76,7 @@ vcpkg_install_copyright(FILE_LIST "${QUIC_SOURCE_PATH}/LICENSE") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include" ) + +file(READ ${CURRENT_PACKAGES_DIR}/share/msquic/msquic.cmake msquic_cmake) +string(REGEX REPLACE "set_target_properties[(]msquic::OpenSSLQuic PROPERTIES.+\"\n[)]" "" msquic_cmake "${msquic_cmake}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/msquic/msquic.cmake "${msquic_cmake}") diff --git a/ports/msquic/vcpkg.json b/ports/msquic/vcpkg.json index 999620c8a1806f..f87871c07de7e3 100644 --- a/ports/msquic/vcpkg.json +++ b/ports/msquic/vcpkg.json @@ -1,7 +1,6 @@ { "name": "msquic", - "version": "2.4.5", - "port-version": 1, + "version": "2.4.7", "description": "Cross-platform, C implementation of the IETF QUIC protocol", "homepage": "https://github.com/microsoft/msquic", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index 3bf25305a41fd7..1fda5d754c3bad 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6153,8 +6153,8 @@ "port-version": 4 }, "msh3": { - "baseline": "0.6.0", - "port-version": 1 + "baseline": "0.7.0", + "port-version": 0 }, "msinttypes": { "baseline": "2018-02-25", @@ -6169,8 +6169,8 @@ "port-version": 4 }, "msquic": { - "baseline": "2.4.5", - "port-version": 1 + "baseline": "2.4.7", + "port-version": 0 }, "mstch": { "baseline": "1.0.2", diff --git a/versions/m-/msh3.json b/versions/m-/msh3.json index 0516d453196926..e8bd463a8492da 100644 --- a/versions/m-/msh3.json +++ b/versions/m-/msh3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8b13603bf4beb51cca0f72d7b2151292beccd2d4", + "version": "0.7.0", + "port-version": 0 + }, { "git-tree": "6c26630aa357e123fe98a2dd4359b52681333a81", "version": "0.6.0", diff --git a/versions/m-/msquic.json b/versions/m-/msquic.json index ef95549f4c9594..e2fe76a316d312 100644 --- a/versions/m-/msquic.json +++ b/versions/m-/msquic.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d18fdc2749e1477d916ad1b74a37112b47fca993", + "version": "2.4.7", + "port-version": 0 + }, { "git-tree": "7e20d48f6fdc1052f7339eeff9ea9ab1074a726c", "version": "2.4.5",