From ffdcd90566b15b5fb5adabe7c63410d9a0ba03c0 Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 1 Aug 2024 00:51:35 +0800 Subject: [PATCH] feat: update boost-asio --- vcpkg-overlay/ports/boost-asio/opt-dep.diff | 28 +++++++++++++++++ vcpkg-overlay/ports/boost-asio/portfile.cmake | 12 +++++-- vcpkg-overlay/ports/boost-asio/vcpkg.json | 31 ++++++++++++------- 3 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 vcpkg-overlay/ports/boost-asio/opt-dep.diff diff --git a/vcpkg-overlay/ports/boost-asio/opt-dep.diff b/vcpkg-overlay/ports/boost-asio/opt-dep.diff new file mode 100644 index 0000000..49992e7 --- /dev/null +++ b/vcpkg-overlay/ports/boost-asio/opt-dep.diff @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2ad3c1de2f..c918c7707d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,13 +17,21 @@ target_link_libraries(boost_asio + Boost::align + Boost::assert + Boost::config +- Boost::context +- Boost::coroutine ++ $ ++ $ + Boost::date_time + Boost::system + Boost::throw_exception + ) + ++if(NOT TARGET Boost::context) ++ target_compile_definitions(boost_asio INTERFACE $<$>:BOOST_ASIO_DISABLE_BOOST_CONTEXT_FIBER>) ++endif() ++ ++if(NOT TARGET Boost::coroutine) ++ target_compile_definitions(boost_asio INTERFACE $<$>:BOOST_ASIO_DISABLE_BOOST_COROUTINE>) ++endif() ++ + target_compile_features(boost_asio INTERFACE cxx_std_11) + + if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") diff --git a/vcpkg-overlay/ports/boost-asio/portfile.cmake b/vcpkg-overlay/ports/boost-asio/portfile.cmake index 44a23da..a74fc2a 100644 --- a/vcpkg-overlay/ports/boost-asio/portfile.cmake +++ b/vcpkg-overlay/ports/boost-asio/portfile.cmake @@ -4,8 +4,16 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/asio REF boost-${VERSION} - SHA512 88d1d8d1bbea29149d9747ab9ccb99a7bfbd928f8ed1aff90adb6382fcefd32dc9687e6832f8ac21ddf918f0608623aa123d7943aa5f697a6b946fe2311e05f6 + SHA512 bbde7c60f208733d48713d2dcfe5be0e18b8372ecaae51055225e5da6bf3e4671e53da8917d27c17f84e34be858d3002c3ac62cdecfd8e3e3861edf365256bee HEAD_REF master - PATCHES windows_alloca_header.patch + PATCHES + windows_alloca_header.patch + opt-dep.diff windows_handle_inheritance.patch ) + +set(FEATURE_OPTIONS "") +boost_configure_and_install( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} +) \ No newline at end of file diff --git a/vcpkg-overlay/ports/boost-asio/vcpkg.json b/vcpkg-overlay/ports/boost-asio/vcpkg.json index 9691d35..91be550 100644 --- a/vcpkg-overlay/ports/boost-asio/vcpkg.json +++ b/vcpkg-overlay/ports/boost-asio/vcpkg.json @@ -1,44 +1,53 @@ { "$comment": "Automatically generated by scripts/boost/generate-ports.ps1", "name": "boost-asio", - "version": "1.84.0", + "version": "1.85.0", + "port-version": 2, "description": "Boost asio module", - "homepage": "https://github.com/boostorg/asio", + "homepage": "https://www.boost.org/libs/asio", "license": "BSL-1.0", "dependencies": [ { "name": "boost-align", - "version>=": "1.84.0" + "version>=": "1.85.0" }, { "name": "boost-assert", - "version>=": "1.84.0" + "version>=": "1.85.0" + }, + { + "name": "boost-cmake", + "version>=": "1.85.0" }, { "name": "boost-config", - "version>=": "1.84.0" + "version>=": "1.85.0" }, { "name": "boost-context", "platform": "!uwp & !emscripten", - "version>=": "1.84.0" + "version>=": "1.85.0" }, { "name": "boost-coroutine", "platform": "!(arm & windows) & !uwp & !emscripten", - "version>=": "1.84.0" + "version>=": "1.85.0" }, { "name": "boost-date-time", - "version>=": "1.84.0" + "version>=": "1.85.0" + }, + { + "name": "boost-headers", + "version>=": "1.85.0" }, { "name": "boost-system", - "version>=": "1.84.0" + "version>=": "1.85.0" }, { "name": "boost-throw-exception", - "version>=": "1.84.0" + "version>=": "1.85.0" } ], "features": { @@ -52,4 +61,4 @@ ] } } -} +} \ No newline at end of file