mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 09:31:08 +08:00
[boost-container] Fix deps and emscripten (#38806)
Fixes #38679. ([No longer uses Boost::static_assert.](https://www.boost.org/doc/libs/1_85_0/doc/html/container/release_notes.html#container.release_notes.release_notes_boost_1_85_00)) Fixes #38469. (Needs threads, so [emscripten needs to use `-pthread`](https://emscripten.org/docs/porting/pthreads.html#compiling-with-pthreads-enabled).) Change homepage link to something more useful. The update to the generator script and the other ports will be in a separate PR.
This commit is contained in:
parent
ed472cd1be
commit
b361950b5a
12
ports/boost-container/no-static-assert.diff
Normal file
12
ports/boost-container/no-static-assert.diff
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 78acbe2..01e97c5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -26,7 +26,6 @@ target_link_libraries(boost_container
|
||||
Boost::config
|
||||
Boost::intrusive
|
||||
Boost::move
|
||||
- Boost::static_assert
|
||||
)
|
||||
|
||||
target_compile_definitions(boost_container
|
@ -6,6 +6,9 @@ vcpkg_from_github(
|
||||
REF boost-${VERSION}
|
||||
SHA512 7b287d5739abdbe08a8a0cb150e513c4feff43731ad923b115aa50d07200586c9b526eb144e7e3f1f191e6ba290032512b216d01cba5178173a3501f6cb37c39
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
no-static-assert.diff
|
||||
posix-threads.diff
|
||||
)
|
||||
|
||||
set(FEATURE_OPTIONS "")
|
||||
|
21
ports/boost-container/posix-threads.diff
Normal file
21
ports/boost-container/posix-threads.diff
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 01e97c5..faf17d4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -15,6 +15,16 @@ add_library(boost_container
|
||||
src/synchronized_pool_resource.cpp
|
||||
src/unsynchronized_pool_resource.cpp
|
||||
)
|
||||
+if(NOT WIN32)
|
||||
+ set(THREADS_PREFER_PTHREAD_FLAG 1)
|
||||
+ find_package(Threads REQUIRED)
|
||||
+ target_link_libraries(boost_container PUBLIC Threads::Threads)
|
||||
+ if(EMSCRIPTEN)
|
||||
+ # Boost config needs `-pthread` to see `_POSIX_THREADS`,
|
||||
+ # but FindTheads.cmake finishes with `CMAKE_HAVE_LIBC_PTHREAD`.
|
||||
+ target_compile_options(boost_container PUBLIC -pthread)
|
||||
+ endif()
|
||||
+endif()
|
||||
|
||||
add_library(Boost::container ALIAS boost_container)
|
||||
|
@ -2,8 +2,9 @@
|
||||
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
|
||||
"name": "boost-container",
|
||||
"version": "1.85.0",
|
||||
"port-version": 1,
|
||||
"description": "Boost container module",
|
||||
"homepage": "https://github.com/boostorg/container",
|
||||
"homepage": "https://www.boost.org/libs/container",
|
||||
"license": "BSL-1.0",
|
||||
"dependencies": [
|
||||
{
|
||||
|
@ -28,6 +28,7 @@ $semverVersion = ($version -replace "(\d+(\.\d+){1,3}).*", "`$1")
|
||||
# Clear this array when moving to a new boost version
|
||||
$defaultPortVersion = 0
|
||||
$portVersions = @{
|
||||
'boost-container' = 1;
|
||||
}
|
||||
|
||||
function Get-PortVersion {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b304461cda37cd06d1097cc5135c3eb178eb5036",
|
||||
"version": "1.85.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "1261ff9673aab60f032284e51aa4400a1fa88a6a",
|
||||
"version": "1.85.0",
|
||||
|
@ -810,7 +810,7 @@
|
||||
},
|
||||
"boost-container": {
|
||||
"baseline": "1.85.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"boost-container-hash": {
|
||||
"baseline": "1.85.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user