diff --git a/ports/msh3/dependencies_fix.patch b/ports/msh3/dependencies_fix.patch index 4cde5fad7b..e8ae8ac89f 100644 --- a/ports/msh3/dependencies_fix.patch +++ b/ports/msh3/dependencies_fix.patch @@ -1,100 +1,22 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d8a81ab..edf5651 100644 +index c4c0814..f400566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -28,9 +28,6 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +@@ -36,9 +36,6 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) if (WIN32) - # Statically link the OS included part of the runtime. - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") - set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib") - set(QUIC_COMMON_DEFINES WIN32_LEAN_AND_MEAN SECURITY_WIN32) - # TODO - Get these to work on Linux - list(APPEND MSH3_COMMON_DEFINES VER_BUILD_ID=${MSH3_VER_BUILD_ID}) -@@ -66,7 +63,8 @@ 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) --add_subdirectory(ls-qpack) -+find_package(ls-qpack CONFIG REQUIRED) -+add_library(ls-qpack ALIAS ls-qpack::ls-qpack) - # Configure and build msquic dependency. - if (WIN32) -@@ -76,9 +74,11 @@ else() - 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) -+# polyfill -+add_library(inc ALIAS msquic) -+add_library(platform ALIAS msquic) -+add_library(warnings ALIAS msquic) - - # Build msh3 library (and cmd line tool). - add_subdirectory(lib) -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 4d7aeb7..6da8e1a 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -7,6 +7,8 @@ else() - set(SOURCES msh3.cpp) - endif() - add_library(msh3 SHARED ${SOURCES}) -+target_compile_features(msh3 PRIVATE cxx_std_20) -+target_include_directories(msh3 PUBLIC $) - target_link_libraries(msh3 PRIVATE inc warnings msquic ls-qpack msh3_headers) - if (NOT BUILD_SHARED_LIBS) - target_link_libraries(msh3 PRIVATE base_link) -@@ -24,12 +26,16 @@ elseif (CX_PLATFORM STREQUAL "darwin") - PROPERTIES LINK_FLAGS "-exported_symbols_list \"${CMAKE_CURRENT_SOURCE_DIR}/darwin/exports.txt\"") - endif() - --install(TARGETS msh3 EXPORT msh3 DESTINATION lib) -+install(TARGETS msh3 EXPORT msh3 -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib -+) - install(FILES ../msh3.h DESTINATION include) --configure_file(msh3-config.cmake.in ${CMAKE_BINARY_DIR}/msh3-config.cmake) -+configure_file(msh3-config.cmake.in ${CMAKE_BINARY_DIR}/msh3-config.cmake @ONLY) - install(FILES ${CMAKE_BINARY_DIR}/msh3-config.cmake DESTINATION share/msh3) - install(EXPORT msh3 DESTINATION share/msh3) --configure_file(libmsh3.pc.in ${CMAKE_BINARY_DIR}/libmsh3.pc) --if(NOT WIN32) -+configure_file(libmsh3.pc.in ${CMAKE_BINARY_DIR}/libmsh3.pc @ONLY) -+if(1) - install(FILES ${CMAKE_BINARY_DIR}/libmsh3.pc DESTINATION lib/pkgconfig) - endif() -diff --git a/lib/libmsh3.pc.in b/lib/libmsh3.pc.in -index f156204..aad76ab 100644 ---- a/lib/libmsh3.pc.in -+++ b/lib/libmsh3.pc.in -@@ -4,10 +4,10 @@ - prefix=/usr/local - exec_prefix=${prefix} - libdir=${exec_prefix}/lib --includedir=${exec_prefix}/include -+includedir=${prefix}/include - - Name: libmsh3 - Description: Minimal HTTP/3 client on top of MsQuic - Version: 0.1.0 - Libs: -L${libdir} -lmsh3 --Cflags: -I${includedir}/libmsh3 -+Cflags: -I${includedir} -diff --git a/lib/msh3-config.cmake.in b/lib/msh3-config.cmake.in -index b4a54bf..540d56d 100644 ---- a/lib/msh3-config.cmake.in -+++ b/lib/msh3-config.cmake.in -@@ -1,4 +1,4 @@ - include(CMakeFindDependencyMacro) - @FILENAME_DEP_REPLACE@ - --include(${SELF_DIR}/msh3.cmake) -+include("${CMAKE_CURRENT_LIST_DIR}/msh3.cmake") + add_compile_definitions(WIN32_LEAN_AND_MEAN) + if(HAS_SPECTRE) +@@ -76,6 +73,7 @@ endif() + option(MSH3_USE_EXTERNAL_MSQUIC "Use an external msquic installation") + if(MSH3_USE_EXTERNAL_MSQUIC) + find_package(msquic CONFIG REQUIRED) ++ add_library(msquic_platform ALIAS msquic) # with ports/msquic/exports-for-msh3.diff + else() + # Configure and build + if (WIN32) diff --git a/ports/msh3/portfile.cmake b/ports/msh3/portfile.cmake index 2696a98861..2bfa12cd9c 100644 --- a/ports/msh3/portfile.cmake +++ b/ports/msh3/portfile.cmake @@ -4,15 +4,18 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nibanks/msh3 REF v${VERSION} - SHA512 dedd8be43e44b4bebbf601d76b1f3b0135501330ed128ca710de942ef7d9142a21f1c1eb9efecf57881e72d93d68c7c2c085bc35d402eac5eabc57e77773be6b + SHA512 0573647b2bea669b34343379319702513da884949b45b2e678aa6c9677ed8e5947ef85e6dcf47f5e5b798c9bfff62b41df53f65848a465b4b37596f5fefebbe6 HEAD_REF main PATCHES dependencies_fix.patch - width-exceeds-type.diff ) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DMSH3_INSTALL_PKGCONFIG=ON + -DMSH3_USE_EXTERNAL_LSQPACK=ON + -DMSH3_USE_EXTERNAL_MSQUIC=ON ) vcpkg_cmake_install() diff --git a/ports/msh3/vcpkg.json b/ports/msh3/vcpkg.json index 8e5dccd015..22770e0485 100644 --- a/ports/msh3/vcpkg.json +++ b/ports/msh3/vcpkg.json @@ -1,6 +1,6 @@ { "name": "msh3", - "version": "0.7.0", + "version": "0.8.0", "description": "Minimal HTTP/3 library", "homepage": "https://github.com/nibanks/msh3", "license": "MIT", diff --git a/ports/msh3/width-exceeds-type.diff b/ports/msh3/width-exceeds-type.diff deleted file mode 100644 index fabd7900c4..0000000000 --- a/ports/msh3/width-exceeds-type.diff +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/msh3.h b/msh3.h -index ebbdc20..c31b1b9 100644 ---- a/msh3.h -+++ b/msh3.h -@@ -374,7 +374,11 @@ typedef struct MSH3_REQUEST_EVENT { - bool AppCloseInProgress : 1; - bool ConnectionShutdownByApp : 1; - bool ConnectionClosedRemotely : 1; -- bool RESERVED : 5; -+ bool RESERVED : 1; -+ bool RESERVED_2 : 1; -+ bool RESERVED_3 : 1; -+ bool RESERVED_4 : 1; -+ bool RESERVED_5 : 1; - uint64_t ConnectionErrorCode; - MSH3_STATUS ConnectionCloseStatus; - } SHUTDOWN_COMPLETE; -@@ -487,7 +491,13 @@ typedef struct MSH3_LISTENER_EVENT { - union { - struct { - bool AppCloseInProgress : 1; -- bool RESERVED : 7; -+ bool RESERVED : 1; -+ bool RESERVED_2 : 1; -+ bool RESERVED_3 : 1; -+ bool RESERVED_4 : 1; -+ bool RESERVED_5 : 1; -+ bool RESERVED_6 : 1; -+ bool RESERVED_7 : 1; - } SHUTDOWN_COMPLETE; - struct { - MSH3_CONNECTION* Connection; diff --git a/versions/baseline.json b/versions/baseline.json index 34db39e684..3703433c19 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6169,7 +6169,7 @@ "port-version": 4 }, "msh3": { - "baseline": "0.7.0", + "baseline": "0.8.0", "port-version": 0 }, "msinttypes": { diff --git a/versions/m-/msh3.json b/versions/m-/msh3.json index 77377bd194..204cd0dd00 100644 --- a/versions/m-/msh3.json +++ b/versions/m-/msh3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "495e9b96672a4bc3fa71512ce8a82a454815c732", + "version": "0.8.0", + "port-version": 0 + }, { "git-tree": "32112fdb5245ab8574dd65f981fa79ee6e6ed5d7", "version": "0.7.0",