Skip to content

Commit

Permalink
feat: update boost-asio
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Jul 31, 2024
1 parent 14b4ff2 commit ffdcd90
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 13 deletions.
28 changes: 28 additions & 0 deletions vcpkg-overlay/ports/boost-asio/opt-dep.diff
Original file line number Diff line number Diff line change
@@ -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
+ $<TARGET_NAME_IF_EXISTS:Boost::context>
+ $<TARGET_NAME_IF_EXISTS:Boost::coroutine>
Boost::date_time
Boost::system
Boost::throw_exception
)

+if(NOT TARGET Boost::context)
+ target_compile_definitions(boost_asio INTERFACE $<$<NOT:$<TARGET_EXISTS:Boost::context>>:BOOST_ASIO_DISABLE_BOOST_CONTEXT_FIBER>)
+endif()
+
+if(NOT TARGET Boost::coroutine)
+ target_compile_definitions(boost_asio INTERFACE $<$<NOT:$<TARGET_EXISTS:Boost::coroutine>>: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")
12 changes: 10 additions & 2 deletions vcpkg-overlay/ports/boost-asio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
31 changes: 20 additions & 11 deletions vcpkg-overlay/ports/boost-asio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -52,4 +61,4 @@
]
}
}
}
}

0 comments on commit ffdcd90

Please sign in to comment.