[boost] pulling has_synchro bits from https://github.com/microsoft/vcpkg/pull… (#30836)

* pulling has_synchro bits from https://github.com/microsoft/vcpkg/pull/27694

* bump port version

* version

* fix clang

* bump version

* version

* oops

* bump dependency version for boost-atomic's boost-module-build-helper dependency

* version

* revert renaming stuff -.-

* version

* remove detection stuff for lib prefix/suffix

* version

* fix indentation

* version

* forgot one

* version

* one more!

* version

* revert changes to cmake-get-vars

* version

* generate ports

* version db

* generate ports

* version db

---------

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
This commit is contained in:
Javier Matos Denizac 2023-06-16 10:50:24 -07:00 committed by GitHub
parent 1e90576cf5
commit c6c59e33f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 101 additions and 28 deletions

View File

@ -13,6 +13,8 @@ vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2"
"project.load [ path.join [ path.make $(here:D) ] ../config/checks/architecture ]" "project.load [ path.join [ path.make $(here:D) ] ../config/checks/architecture ]"
) )
file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/config") file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/config")
#Make sure to keep this line when updating boost.
file(INSTALL "${SOURCE_PATH}/config/has_synchronization_lib.cpp" DESTINATION "${CURRENT_PACKAGES_DIR}/share/boost-atomic")
include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)
boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) boost_modular_build(SOURCE_PATH ${SOURCE_PATH})
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)

View File

@ -2,7 +2,7 @@
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1", "$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
"name": "boost-atomic", "name": "boost-atomic",
"version": "1.82.0", "version": "1.82.0",
"port-version": 2, "port-version": 3,
"description": "Boost atomic module", "description": "Boost atomic module",
"homepage": "https://github.com/boostorg/atomic", "homepage": "https://github.com/boostorg/atomic",
"license": "BSL-1.0", "license": "BSL-1.0",

View File

@ -61,11 +61,11 @@ if(VCPKG_DETECTED_MSVC)
set(USER_CONFIG_TOOLSET clang-win) set(USER_CONFIG_TOOLSET clang-win)
else() else()
set(USER_CONFIG_TOOLSET msvc) set(USER_CONFIG_TOOLSET msvc)
endif() if(VCPKG_DETECTED_MSVC_VERSION LESS "1900")
if(VCPKG_DETECTED_MSVC_VERSION LESS "1900") math(EXPR USER_CONFIG_TOOLSET_VERSION "${VCPKG_DETECTED_MSVC_VERSION} / 10 - 60")
math(EXPR USER_CONFIG_TOOLSET_VERSION "${VCPKG_DETECTED_MSVC_VERSION} / 10 - 60") else()
else() math(EXPR USER_CONFIG_TOOLSET_VERSION "${VCPKG_DETECTED_MSVC_VERSION} / 10 - 50")
math(EXPR USER_CONFIG_TOOLSET_VERSION "${VCPKG_DETECTED_MSVC_VERSION} / 10 - 50") endif()
endif() endif()
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32") elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
set(USER_CONFIG_TOOLSET emscripten) set(USER_CONFIG_TOOLSET emscripten)
@ -144,7 +144,7 @@ if(CFLAGS MATCHES "-Zi" OR CXXFLAGS MATCHES "-Zi")
) )
endif() endif()
if(USER_CONFIG_TOOLSET STREQUAL "msvc") if(USER_CONFIG_TOOLSET MATCHES "^(msvc|clang-win)$")
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/nothing.bat" NOTHING_BAT) file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/nothing.bat" NOTHING_BAT)
string(APPEND USER_CONFIG_TOOLSET_OPTIONS string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <setup>\"${NOTHING_BAT}\"\n" " <setup>\"${NOTHING_BAT}\"\n"
@ -171,7 +171,7 @@ if(NOT LDFLAGS STREQUAL "")
string(APPEND USER_CONFIG_TOOLSET_OPTIONS " <linkflags>\"${LDFLAGS}\"\n") string(APPEND USER_CONFIG_TOOLSET_OPTIONS " <linkflags>\"${LDFLAGS}\"\n")
endif() endif()
if(WIN32 AND NOT USER_CONFIG_TOOLSET STREQUAL "msvc") if(WIN32 AND NOT USER_CONFIG_TOOLSET MATCHES "^(msvc|clang-win)$")
# MINGW here causes b2 to not run cygpath # MINGW here causes b2 to not run cygpath
string(APPEND USER_CONFIG_TOOLSET_OPTIONS string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <flavor>mingw\n" " <flavor>mingw\n"
@ -291,10 +291,10 @@ add_custom_target(boost ALL
threading=multi threading=multi
stage stage
WORKING_DIRECTORY ${SOURCE_PATH}/build WORKING_DIRECTORY "${SOURCE_PATH}/build"
) )
set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/stage/lib) set(SUBDIR "${CMAKE_CURRENT_BINARY_DIR}/stage/lib")
install( install(
CODE " CODE "
file(GLOB LIBS \"${SUBDIR}/*.so.*\" \"${SUBDIR}/*.so\" \"${SUBDIR}/*.a\" \"${SUBDIR}/*.dylib\" \"${SUBDIR}/*.dylib.*\" \"${SUBDIR}/*.lib\") file(GLOB LIBS \"${SUBDIR}/*.so.*\" \"${SUBDIR}/*.so\" \"${SUBDIR}/*.a\" \"${SUBDIR}/*.dylib\" \"${SUBDIR}/*.dylib.*\" \"${SUBDIR}/*.lib\")

View File

@ -4,6 +4,7 @@ constant BOOST_JAMROOT_MODULE : $(__name__) ;
import boostcpp ; import boostcpp ;
import feature ; import feature ;
import configure ;
boostcpp.set-version $(BOOST_VERSION) ; boostcpp.set-version $(BOOST_VERSION) ;
@ -100,10 +101,36 @@ if "@PORT@" != "boost-filesystem"
if "@PORT@" != "boost-atomic" if "@PORT@" != "boost-atomic"
{ {
lib synchronization ;
explicit synchronization ;
exe has_synchronization_lib : @CURRENT_INSTALLED_DIR@/share/boost-atomic/has_synchronization_lib.cpp : <library>synchronization ;
explicit has_synchronization_lib ;
rule check-synchronization-lib ( properties * )
{
local result ;
if <target-os>windows in $(properties)
{
if [ configure.builds has_synchronization_lib : $(properties) : "has synchronization.lib" ]
{
result += <library>synchronization ;
}
else
{
result += <define>BOOST_ATOMIC_NO_SYNCHRONIZATION_LIB ;
}
}
return $(result) ;
}
use-project /boost/atomic : . ; use-project /boost/atomic : . ;
lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ; lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_RELEASE_SUFFIX@" <variant>release : : usage-requirements
lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ; <conditional>@check-synchronization-lib ;
lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug : : usage-requirements
<conditional>@check-synchronization-lib ;
explicit boost_atomic ; explicit boost_atomic ;
} }

View File

@ -5,7 +5,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-cmake-get-vars/vcpkg-port-config.cma
get_filename_component(BOOST_BUILD_INSTALLED_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY) get_filename_component(BOOST_BUILD_INSTALLED_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
get_filename_component(BOOST_BUILD_INSTALLED_DIR "${BOOST_BUILD_INSTALLED_DIR}" DIRECTORY) get_filename_component(BOOST_BUILD_INSTALLED_DIR "${BOOST_BUILD_INSTALLED_DIR}" DIRECTORY)
set(BOOST_VERSION 1.82.0) set(BOOST_VERSION "${VERSION}")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" BOOST_VERSION_MATCH "${BOOST_VERSION}") string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" BOOST_VERSION_MATCH "${BOOST_VERSION}")
if("${CMAKE_MATCH_3}" GREATER 0) if("${CMAKE_MATCH_3}" GREATER 0)
set(BOOST_VERSION_ABI_TAG "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}") set(BOOST_VERSION_ABI_TAG "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}")
@ -38,7 +38,6 @@ function(boost_modular_build)
else() else()
message(FATAL_ERROR "Could not find b2 in ${BOOST_BUILD_PATH}") message(FATAL_ERROR "Could not find b2 in ${BOOST_BUILD_PATH}")
endif() endif()
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(BOOST_LIB_PREFIX) set(BOOST_LIB_PREFIX)
if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.") if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.")
@ -102,7 +101,7 @@ function(boost_modular_build)
string(REPLACE "." "" PYTHON_VERSION_TAG "${python3_version}") string(REPLACE "." "" PYTHON_VERSION_TAG "${python3_version}")
endif() endif()
configure_file(${BOOST_BUILD_INSTALLED_DIR}/share/boost-build/Jamroot.jam.in ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) configure_file("${BOOST_BUILD_INSTALLED_DIR}/share/boost-build/Jamroot.jam.in" "${_bm_SOURCE_PATH}/Jamroot.jam" @ONLY)
set(configure_options) set(configure_options)
if(_bm_BOOST_CMAKE_FRAGMENT) if(_bm_BOOST_CMAKE_FRAGMENT)
@ -199,5 +198,5 @@ function(boost_modular_build)
message(FATAL_ERROR "No libraries were produced. This indicates a failure while building the boost library.") message(FATAL_ERROR "No libraries were produced. This indicates a failure while building the boost library.")
endif() endif()
configure_file(${BOOST_BUILD_INSTALLED_DIR}/share/boost-build/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage COPYONLY) configure_file("${BOOST_BUILD_INSTALLED_DIR}/share/boost-build/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
endfunction() endfunction()

View File

@ -2,7 +2,7 @@
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1", "$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
"name": "boost-modular-build-helper", "name": "boost-modular-build-helper",
"version": "1.82.0", "version": "1.82.0",
"port-version": 2, "port-version": 3,
"description": "Internal vcpkg port used to build Boost libraries", "description": "Internal vcpkg port used to build Boost libraries",
"license": "MIT", "license": "MIT",
"dependencies": [ "dependencies": [

View File

@ -24,7 +24,8 @@ else {
# Clear this array when moving to a new boost version # Clear this array when moving to a new boost version
$defaultPortVersion = 2 $defaultPortVersion = 2
$portVersions = @{ $portVersions = @{
#e.g. "boost-asio" = 1; "boost-atomic" = 3;
"boost-modular-build-helper" = 3;
} }
function Get-PortVersion { function Get-PortVersion {

View File

@ -3,3 +3,5 @@ vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2"
"project.load [ path.join [ path.make $(here:D) ] ../config/checks/architecture ]" "project.load [ path.join [ path.make $(here:D) ] ../config/checks/architecture ]"
) )
file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/config") file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/config")
#Make sure to keep this line when updating boost.
file(INSTALL "${SOURCE_PATH}/config/has_synchronization_lib.cpp" DESTINATION "${CURRENT_PACKAGES_DIR}/share/boost-atomic")

View File

@ -1751,6 +1751,7 @@ vcpkg-ci-arrow:x64-windows-static-md=pass
vcpkg-ci-arrow:x64-osx=pass vcpkg-ci-arrow:x64-osx=pass
vcpkg-ci-arrow:x64-linux=pass vcpkg-ci-arrow:x64-linux=pass
vcpkg-ci-boost:x64-linux=pass vcpkg-ci-boost:x64-linux=pass
vcpkg-ci-boost:arm64-windows=pass
vcpkg-ci-boost:x64-osx=pass vcpkg-ci-boost:x64-osx=pass
vcpkg-ci-boost:x64-windows-static-md=pass vcpkg-ci-boost:x64-windows-static-md=pass
vcpkg-ci-boost:x64-windows-static=pass vcpkg-ci-boost:x64-windows-static=pass

View File

@ -38,6 +38,11 @@
"find-package": { "find-package": {
"description": "Ports to be tested via find_package($package)", "description": "Ports to be tested via find_package($package)",
"dependencies": [ "dependencies": [
{
"$package": "Boost",
"name":"boost",
"platform": "!uwp"
},
{ {
"$package": "BZip2", "$package": "BZip2",
"name": "bzip2" "name": "bzip2"

View File

@ -8,7 +8,8 @@
"default-features": false, "default-features": false,
"features": [ "features": [
"mpi" "mpi"
] ],
"platform":"!(arm & windows)"
}, },
{ {
"name": "boost-asio", "name": "boost-asio",
@ -22,14 +23,16 @@
"default-features": false, "default-features": false,
"features": [ "features": [
"numa" "numa"
] ],
"platform":"!uwp & !arm & !emscripten"
}, },
{ {
"name": "boost-locale", "name": "boost-locale",
"default-features": false, "default-features": false,
"features": [ "features": [
"icu" "icu"
] ],
"platform":"!uwp"
}, },
{ {
"name": "boost-mpi", "name": "boost-mpi",
@ -37,29 +40,47 @@
"features": [ "features": [
"python3" "python3"
], ],
"platform": "!static" "platform": "!static & !(arm & windows)"
},
{
"name":"boost-odeint",
"default-features":false
}, },
{ {
"name": "boost-odeint", "name": "boost-odeint",
"default-features": false, "default-features": false,
"features": [ "features": [
"mpi" "mpi"
] ],
"platform": "!(arm & windows)"
},
{
"name": "boost-python",
"default-features":false,
"features":[
"python2"
],
"platform":"!(arm & windows)"
}, },
{ {
"name": "boost-python", "name": "boost-python",
"default-features": false, "default-features": false,
"features": [ "features": [
"python2",
"python3" "python3"
] ],
"platform":"!uwp"
},
{
"name":"boost-regex",
"default-features":false
}, },
{ {
"name": "boost-regex", "name": "boost-regex",
"default-features": false, "default-features": false,
"features": [ "features": [
"icu" "icu"
] ],
"platform":"!uwp"
} }
] ]
} }

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "05f82c6b7fe3a31ffb4f16f25eb98473131f201a",
"version": "1.82.0",
"port-version": 3
},
{ {
"git-tree": "4cd58a1ad5ec2c381440b733e3799368df678b49", "git-tree": "4cd58a1ad5ec2c381440b733e3799368df678b49",
"version": "1.82.0", "version": "1.82.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "98f75b07bdab1080c9470eb115836035d7142397",
"version": "1.82.0",
"port-version": 3
},
{ {
"git-tree": "3ae088c69a58eb9a5854ff99807397a0c09daf6a", "git-tree": "3ae088c69a58eb9a5854ff99807397a0c09daf6a",
"version": "1.82.0", "version": "1.82.0",

View File

@ -666,7 +666,7 @@
}, },
"boost-atomic": { "boost-atomic": {
"baseline": "1.82.0", "baseline": "1.82.0",
"port-version": 2 "port-version": 3
}, },
"boost-beast": { "boost-beast": {
"baseline": "1.82.0", "baseline": "1.82.0",
@ -934,7 +934,7 @@
}, },
"boost-modular-build-helper": { "boost-modular-build-helper": {
"baseline": "1.82.0", "baseline": "1.82.0",
"port-version": 2 "port-version": 3
}, },
"boost-move": { "boost-move": {
"baseline": "1.82.0", "baseline": "1.82.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "c6eb09f11e34173a4bfc31252d02d6aea6c25d8f",
"version-date": "2023-04-13",
"port-version": 0
},
{ {
"git-tree": "2e624c2cf12a97a7a802e31ff1d28b9fa6ba9bde", "git-tree": "2e624c2cf12a97a7a802e31ff1d28b9fa6ba9bde",
"version-date": "2023-03-02", "version-date": "2023-03-02",