[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:
Kai Pastor 2024-05-23 03:15:41 +02:00 committed by GitHub
parent ed472cd1be
commit b361950b5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 45 additions and 2 deletions

View 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

View File

@ -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 "")

View 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)

View File

@ -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": [
{

View File

@ -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 {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b304461cda37cd06d1097cc5135c3eb178eb5036",
"version": "1.85.0",
"port-version": 1
},
{
"git-tree": "1261ff9673aab60f032284e51aa4400a1fa88a6a",
"version": "1.85.0",

View File

@ -810,7 +810,7 @@
},
"boost-container": {
"baseline": "1.85.0",
"port-version": 0
"port-version": 1
},
"boost-container-hash": {
"baseline": "1.85.0",