[boost] bugfix and new features after update to 1.77.0 (#20432)

* [scripts/boost] fix issue #20417
[boost-iostreams] replace explicit dependencies with default-features, allow to disable compression filters

* add versions

* [scripts/boost] update port version after #20421

* [boost-odeint] move boost-mpi dependency to the feature

* add version

* [boost-modular-build-helper] rework user-config generation

* [boost-python] move python3 from explicit dependency to default feature

* [boost-modular-build-helper] update version

* add verions

* [boost-modular-build-helper] fix empty flags

* update version

* Fix compilation on Emscripten / WebAssembly (#20551)

* [opencv4,opencv3] Control exported protobuf dependency (#20550)

* Control exported protobuf dependency

* Update versions

* Control exported protobuf dependency

* Update versions

* [OpenMVS] restore deprecated cmake scripts for configure, build & fixup targets (#20422)

* [OpenMVS] restore deprecated cmake scripts

* [OpenMVS] fix references

* switch back to vcpkg_cmake_*

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* [libffi] Don't replace string in file that doesn't exist. (#20554)

* Don't replace string in file that doesn't exist.

* Update per bot.

* Update per bot again.

* Address comments.

* [json-dto] Update to 0.2.14 (#20570)

* json-dto updated to v.0.2.14.

* json-dto-0.2.14 added to baseline.

* Change deprecated commands.

* Update baseline for fresh json-dto-0.2.14.

* [sail] Update to 0.9.0-pre17 (#20562)

* [sail] Update to 0.9.0-pre17

* [sail] vcpkg x-add-version --all --overwrite-version

* [sail] Update pre17 hash

* [sail] vcpkg x-add-version --all --overwrite-version

* [freexl] Update to 1.0.6 (#20520)

* Reformat portfile

* Minimize makefiles patch

* Update to 1.0.6

* Fix uwp builds, remove skip from baseline

* Install pc file for windows

* Update versions

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>

* [dartsim] Update to 6.11.0 (#20566)

* Update dartsim

* Use newer vcpkg functions

* Update version number

* Update ports/dartsim/portfile.cmake

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

* Update versions

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

* [scripts/boost] update Boost version in boost-modular-build.cmake to avoid manual changes

* update version

* [boost-modular-build-helper] fix USER_CONFIG_EXTRA_LINES variable name and rename generated files

* update version

* Resolve differences from rerunning generate-ports.ps1.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Tobias Markus <tobbi.bugs@googlemail.com>
Co-authored-by: Kai Pastor <dg0yt@darc.de>
Co-authored-by: Stefano Sinigardi <stesinigardi@hotmail.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Lars Glud <larshg@gmail.com>
Co-authored-by: eao197 <eao197@users.noreply.github.com>
Co-authored-by: Dmitry Baryshev <dmitrymq@gmail.com>
Co-authored-by: Akash <Ace314159@users.noreply.github.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
Yury Bura 2021-10-12 04:21:08 +03:00 committed by GitHub
parent e29e78d835
commit f904f7354d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 398 additions and 201 deletions

View File

@ -6,8 +6,7 @@ vcpkg_from_github(
REF boost-1.77.0
SHA512 c6df16825b7bb27412667e00b6b6cdecbf56ee0707aa1df3505637c7de5c39c87335fabd7cd4361b29625d71c7664e6af865fc271ad0b3e70cc8872825f6155e
HEAD_REF master
PATCHES
fix-emscripten-compilation.patch
PATCHES fix-emscripten-compilation.patch
)
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)

View File

@ -1,7 +1,7 @@
{
"name": "boost-config",
"version": "1.77.0",
"port-version": 1,
"port-version": 2,
"description": "Boost config module",
"homepage": "https://github.com/boostorg/config",
"dependencies": [

View File

@ -1,30 +1,86 @@
list(APPEND B2_OPTIONS
-sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
-sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
-sLZMA_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
-sZSTD_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(lib_suffix lib)
set(lib_path_suffix lib)
else()
set(lib_suffix debug/lib)
if(WIN32)
set(ZLIB_NAME zlibd)
else()
set(ZLIB_NAME z)
set(lib_path_suffix debug/lib)
endif()
if("bzip2" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
-sBZIP2_NAME=bz2d
)
endif()
list(APPEND B2_OPTIONS
-sZLIB_NAME=${ZLIB_NAME}
-sBZIP2_NAME=bz2d
-sLZMA_NAME=lzmad
-sZSTD_BINARY=zstdd
-sBZIP2_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
list(APPEND B2_OPTIONS
-sNO_BZIP2=1
)
endif()
list(APPEND B2_OPTIONS
-sZLIB_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
-sBZIP2_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
-sLZMA_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
-sZSTD_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
)
if("lzma" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sLZMA_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
-sLZMA_NAME=lzmad
)
endif()
list(APPEND B2_OPTIONS
-sLZMA_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
list(APPEND B2_OPTIONS
-sNO_LZMA=1
)
endif()
if("zlib" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(WIN32)
set(ZLIB_NAME zlibd)
else()
set(ZLIB_NAME z)
endif()
list(APPEND B2_OPTIONS
-sZLIB_NAME=${ZLIB_NAME}
)
endif()
list(APPEND B2_OPTIONS
-sZLIB_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
list(APPEND B2_OPTIONS
-sNO_ZLIB=1
)
endif()
if("zstd" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sZSTD_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
-sZSTD_NAME=zstdd
)
endif()
list(APPEND B2_OPTIONS
-sZSTD_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
list(APPEND B2_OPTIONS
-sNO_ZSTD=1
)
endif()

View File

@ -1,6 +1,7 @@
{
"name": "boost-iostreams",
"version": "1.77.0",
"port-version": 1,
"description": "Boost iostreams module",
"homepage": "https://github.com/boostorg/iostreams",
"supports": "!uwp",
@ -32,13 +33,41 @@
"boost-type-traits",
"boost-utility",
"boost-vcpkg-helpers",
"bzip2",
"liblzma",
{
"name": "vcpkg-cmake",
"host": true
},
}
],
"default-features": [
"bzip2",
"lzma",
"zlib",
"zstd"
]
],
"features": {
"bzip2": {
"description": "Support bzip2 filters",
"dependencies": [
"bzip2"
]
},
"lzma": {
"description": "Support LZMA/xz filters",
"dependencies": [
"liblzma"
]
},
"zlib": {
"description": "Support zlib filters",
"dependencies": [
"zlib"
]
},
"zstd": {
"description": "Support zstd filters",
"dependencies": [
"zstd"
]
}
}
}

View File

@ -1,17 +1,14 @@
cmake_minimum_required(VERSION 3.9)
project(boost CXX)
set(B2_OPTIONS)
# The following variables are used in user-config.jam file
set(USER_CONFIG_TOOLSET)
set(USER_CONFIG_TOOLSET_VERSION)
set(USER_CONFIG_TOOLSET_INVOCATION_COMMAND)
set(USER_CONFIG_TOOLSET_OPTIONS)
set(USER_CONFIG_EXTRA_LINES)
if(MSVC)
if(MSVC_VERSION LESS 1900)
math(EXPR BOOST_MSVC_VERSION "${MSVC_VERSION} / 10 - 60")
else()
math(EXPR BOOST_MSVC_VERSION "${MSVC_VERSION} / 10 - 50")
endif()
else()
set(VCPKG_PLATFORM_TOOLSET external)
endif()
set(B2_OPTIONS)
#### Handle ICU
if(WIN32)
@ -24,10 +21,8 @@ endif()
# Add build type specific options
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
list(APPEND B2_OPTIONS runtime-link=shared)
set(LIB_RUNTIME_LINK "shared")
else()
list(APPEND B2_OPTIONS runtime-link=static)
set(LIB_RUNTIME_LINK "static")
endif()
if(BUILD_SHARED_LIBS)
@ -56,31 +51,28 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND WIN32)
list(APPEND B2_OPTIONS "asmflags=/safeseh")
endif()
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/nothing.bat" NOTHING_BAT)
if(MSVC)
set(B2_TOOLSET msvc)
set(USER_CONFIG_TOOLSET msvc)
if(MSVC_VERSION LESS 1900)
math(EXPR USER_CONFIG_TOOLSET_VERSION "${MSVC_VERSION} / 10 - 60")
else()
math(EXPR USER_CONFIG_TOOLSET_VERSION "${MSVC_VERSION} / 10 - 50")
endif()
list(APPEND B2_OPTIONS target-os=windows)
elseif(APPLE)
set(B2_TOOLSET clang)
set(USER_CONFIG_TOOLSET clang)
list(APPEND B2_OPTIONS target-os=darwin)
elseif(WIN32)
set(B2_TOOLSET gcc)
set(USER_CONFIG_TOOLSET gcc)
list(APPEND B2_OPTIONS target-os=windows)
elseif(ANDROID)
set(B2_TOOLSET gcc)
set(USER_CONFIG_TOOLSET gcc)
list(APPEND B2_OPTIONS target-os=android)
else()
set(B2_TOOLSET gcc)
set(USER_CONFIG_TOOLSET gcc)
list(APPEND B2_OPTIONS target-os=linux)
endif()
if(WIN32)
list(APPEND B2_OPTIONS threadapi=win32)
else()
list(APPEND B2_OPTIONS threadapi=pthread)
endif()
# Properly handle compiler and linker flags passed by VCPKG
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
@ -122,9 +114,12 @@ if(APPLE)
endforeach()
endif()
string(REGEX REPLACE "[ \t\r\n]+" " " CXXFLAGS "${CXXFLAGS}")
string(STRIP "${CXXFLAGS}" CXXFLAGS)
string(STRIP "${CFLAGS}" CFLAGS)
string(STRIP "${LDFLAGS}" LDFLAGS)
string(REGEX REPLACE "[ \t\r\n]+" " " CFLAGS "${CFLAGS}")
string(STRIP "${CFLAGS}" CFLAGS)
string(REGEX REPLACE "[ \t\r\n]+" " " LDFLAGS "${LDFLAGS}")
string(STRIP "${LDFLAGS}" LDFLAGS)
if(NOT CXXFLAGS STREQUAL "")
string(REPLACE " " " <cxxflags>" CXXFLAGS "<cxxflags>${CXXFLAGS}")
@ -187,6 +182,39 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND B2_OPTIONS linkflags=WindowsApp.lib)
endif()
set(USER_CONFIG_TOOLSET_INVOCATION_COMMAND "\"${CMAKE_CXX_COMPILER}\"")
if(USER_CONFIG_TOOLSET STREQUAL "msvc")
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/nothing.bat" NOTHING_BAT)
string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <setup>\"${NOTHING_BAT}\"\n"
" ${CXXFLAGS}\n"
" ${CFLAGS}\n"
" ${LDFLAGS}\n"
)
else()
string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <ranlib>\"${CMAKE_RANLIB}\"\n"
" <archiver>\"${CMAKE_AR}\"\n"
" ${CXXFLAGS}\n"
" ${CFLAGS}\n"
" ${LDFLAGS}\n"
)
endif()
if(WIN32 AND NOT USER_CONFIG_TOOLSET STREQUAL "msvc")
# MINGW here causes b2 to not run cygpath
string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <flavor>mingw\n"
)
endif()
if(WIN32)
list(APPEND B2_OPTIONS threadapi=win32)
else()
list(APPEND B2_OPTIONS threadapi=pthread)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
list(APPEND B2_OPTIONS variant=release)
else()
@ -197,23 +225,23 @@ if(NOT WIN32)
list(APPEND B2_OPTIONS "--layout=system")
endif()
# Include port specific CMake fragment
if(DEFINED BOOST_CMAKE_FRAGMENT)
message(STATUS "Including ${BOOST_CMAKE_FRAGMENT}")
include(${BOOST_CMAKE_FRAGMENT})
endif()
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)
include(ProcessorCount)
ProcessorCount(NUMBER_OF_PROCESSORS)
if(NOT NUMBER_OF_PROCESSORS)
set(NUMBER_OF_PROCESSORS 1)
endif()
# Include port specific CMake fragment
if(DEFINED BOOST_CMAKE_FRAGMENT)
message(STATUS "Including ${BOOST_CMAKE_FRAGMENT}")
include(${BOOST_CMAKE_FRAGMENT})
endif()
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam.in ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)
add_custom_target(boost ALL
COMMAND "${B2_EXE}"
toolset=${B2_TOOLSET}
toolset=${USER_CONFIG_TOOLSET}
--user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.jam
--stagedir=${CMAKE_CURRENT_BINARY_DIR}/stage
--build-dir=${CMAKE_CURRENT_BINARY_DIR}
@ -235,6 +263,7 @@ add_custom_target(boost ALL
--hash
-q
debug-symbols=on
# Enable debugging level 2.
-d +2
threading=multi

View File

@ -1,5 +1,5 @@
constant BOOST_VERSION : 1.77.0 ;
constant BOOST_VERSION_ABI_TAG : 1_77 ;
constant BOOST_VERSION : @BOOST_VERSION@ ;
constant BOOST_VERSION_ABI_TAG : @BOOST_VERSION_ABI_TAG@ ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
import boostcpp ;

View File

@ -1,6 +1,14 @@
get_filename_component(BOOST_BUILD_INSTALLED_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
get_filename_component(BOOST_BUILD_INSTALLED_DIR "${BOOST_BUILD_INSTALLED_DIR}" DIRECTORY)
set(BOOST_VERSION 1.77.0)
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" BOOST_VERSION_MATCH "${BOOST_VERSION}")
if("${CMAKE_MATCH_3}" GREATER 0)
set(BOOST_VERSION_ABI_TAG "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}")
else()
set(BOOST_VERSION_ABI_TAG "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
endif()
function(boost_modular_build)
cmake_parse_arguments(_bm "" "SOURCE_PATH;BOOST_CMAKE_FRAGMENT" "" ${ARGN})
@ -8,9 +16,10 @@ function(boost_modular_build)
message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.")
endif()
# Next CMake variables may be overridden in the file specified in ${_bm_BOOST_CMAKE_FRAGMENT}
set(B2_REQUIREMENTS) # this variable is used in the Jamroot.jam
# The following variables are used in the Jamroot.jam
set(B2_REQUIREMENTS)
# Some CMake variables may be overridden in the file specified in ${_bm_BOOST_CMAKE_FRAGMENT}
if(DEFINED _bm_BOOST_CMAKE_FRAGMENT)
message(STATUS "Including ${_bm_BOOST_CMAKE_FRAGMENT}")
include(${_bm_BOOST_CMAKE_FRAGMENT})
@ -28,13 +37,13 @@ function(boost_modular_build)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(BOOST_LIB_PREFIX)
if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.")
set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib)
set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120")
set(BOOST_LIB_RELEASE_SUFFIX -vc120-mt.lib)
set(BOOST_LIB_DEBUG_SUFFIX -vc120-mt-gd.lib)
endif()
if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.")
set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib)
set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120")
set(BOOST_LIB_RELEASE_SUFFIX -vc120-mt.lib)
set(BOOST_LIB_DEBUG_SUFFIX -vc120-mt-gd.lib)
endif()
else()
set(BOOST_LIB_PREFIX lib)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
@ -70,7 +79,7 @@ function(boost_modular_build)
file(WRITE "${_jamfile}" "${_contents}")
endif()
configure_file(${BOOST_BUILD_INSTALLED_DIR}/share/boost-build/Jamroot.jam ${_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)
if(_bm_BOOST_CMAKE_FRAGMENT)
@ -112,7 +121,7 @@ function(boost_modular_build)
string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries
string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries
string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries
string(REPLACE "-1_77" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries
string(REPLACE "-${BOOST_VERSION_ABI_TAG}" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries
if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}")
# nothing to do
elseif(EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME})

View File

@ -3,11 +3,11 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
file(
COPY
${CMAKE_CURRENT_LIST_DIR}/boost-modular-build.cmake
${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam
${CMAKE_CURRENT_LIST_DIR}/nothing.bat
${CMAKE_CURRENT_LIST_DIR}/user-config.jam
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam.in
${CMAKE_CURRENT_LIST_DIR}/nothing.bat
${CMAKE_CURRENT_LIST_DIR}/usage
${CMAKE_CURRENT_LIST_DIR}/user-config.jam.in
DESTINATION
${CURRENT_PACKAGES_DIR}/share/boost-build
)

View File

@ -1,36 +1,11 @@
import toolset ;
if "@VCPKG_PLATFORM_TOOLSET@" != "external"
{
using msvc : @BOOST_MSVC_VERSION@ : cl.exe
:
<setup>"@NOTHING_BAT@"
@CXXFLAGS@
@CFLAGS@
@LDFLAGS@
;
}
else
{
using @B2_TOOLSET@ : : @CMAKE_CXX_COMPILER@
:
<ranlib>@CMAKE_RANLIB@
<archiver>@CMAKE_AR@
@CXXFLAGS@
@CFLAGS@
@LDFLAGS@
# MINGW here causes b2 to not run cygpath
<flavor>mingw
;
}
using @USER_CONFIG_TOOLSET@ : @USER_CONFIG_TOOLSET_VERSION@ : @USER_CONFIG_TOOLSET_INVOCATION_COMMAND@
:
@USER_CONFIG_TOOLSET_OPTIONS@
;
if "@PORT@" = "boost-python"
{
using python : @VCPKG_PYTHON3_VERSION@ : : "@VCPKG_PYTHON3_INCLUDE@" : "@VCPKG_PYTHON3_LIBS_RELEASE@" ;
using python : @VCPKG_PYTHON3_VERSION@ : : "@VCPKG_PYTHON3_INCLUDE@" : "@VCPKG_PYTHON3_LIBS_DEBUG@" : <python-debugging>on ;
using python : @VCPKG_PYTHON2_VERSION@ : : "@VCPKG_PYTHON2_INCLUDE@" : "@VCPKG_PYTHON2_LIBS_RELEASE@" ;
using python : @VCPKG_PYTHON2_VERSION@ : : "@VCPKG_PYTHON2_INCLUDE@" : "@VCPKG_PYTHON2_LIBS_DEBUG@" : <python-debugging>on ;
}
@USER_CONFIG_EXTRA_LINES@
if "@PORT@" = "boost-mpi" || "@PORT@" = "boost-graph-parallel"
{
@ -42,7 +17,7 @@ if "@PORT@" = "boost-mpi" || "@PORT@" = "boost-graph-parallel"
project user-config : ;
if "@VCPKG_PLATFORM_TOOLSET@" != "external"
if "@USER_CONFIG_TOOLSET@" = "msvc"
{
lib advapi32 ;

View File

@ -1,6 +1,7 @@
{
"name": "boost-modular-build-helper",
"version": "1.77.0",
"port-version": 1,
"description": "Internal vcpkg port used to build Boost libraries",
"dependencies": [
"boost-uninstall"

View File

@ -1,6 +1,7 @@
{
"name": "boost-odeint",
"version": "1.77.0",
"port-version": 1,
"description": "Boost odeint module",
"homepage": "https://github.com/boostorg/odeint",
"dependencies": [
@ -14,10 +15,6 @@
"boost-fusion",
"boost-iterator",
"boost-math",
{
"name": "boost-mpi",
"platform": "!uwp"
},
"boost-mpl",
"boost-multi-array",
"boost-preprocessor",
@ -29,5 +26,13 @@
"boost-units",
"boost-utility",
"boost-vcpkg-helpers"
]
],
"features": {
"mpi": {
"description": "Support parallelization with MPI",
"dependencies": [
"boost-mpi"
]
}
}
}

View File

@ -6,8 +6,7 @@ vcpkg_from_github(
REF boost-1.77.0
SHA512 00eb27f702f092a20fdf1669b8c9c993b751971592d0bc5aa50b02d99d985a75361621b624aa51eb550c9e7905e15877168ae9d0feb1957fc85f99c264b152fd
HEAD_REF master
PATCHES
fix_include.patch
PATCHES fix_include.patch
)
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)

View File

@ -1,7 +1,7 @@
{
"name": "boost-process",
"version": "1.77.0",
"port-version": 1,
"port-version": 2,
"description": "Boost process module",
"homepage": "https://github.com/boostorg/process",
"supports": "!emscripten",

View File

@ -1,28 +1,38 @@
set(BUILD_PYTHON_VERSIONS)
set(build_python_versions)
if("python2" IN_LIST FEATURES)
# Find Python2 libraries. Can't use find_package here, but we already know where everything is
file(GLOB VCPKG_PYTHON2_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python2.*")
set(VCPKG_PYTHON2_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
set(VCPKG_PYTHON2_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON2_VERSION "${VCPKG_PYTHON2_INCLUDE}")
list(APPEND BUILD_PYTHON_VERSIONS "${VCPKG_PYTHON2_VERSION}")
file(GLOB python2_include_dir "${CURRENT_INSTALLED_DIR}/include/python2.*")
string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" python2_version "${python2_include_dir}")
string(APPEND USER_CONFIG_EXTRA_LINES
"using python : ${python2_version} : : \"${python2_include_dir}\" : \"${CURRENT_INSTALLED_DIR}/lib\" ;\n"
"using python : ${python2_version} : : \"${python2_include_dir}\" : \"${CURRENT_INSTALLED_DIR}/debug/lib\" : <python-debugging>on ;\n")
list(APPEND build_python_versions "${python2_version}")
endif()
# Find Python3 libraries. Can't use find_package here, but we already know where everything is
file(GLOB VCPKG_PYTHON3_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python3.*")
set(VCPKG_PYTHON3_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
set(VCPKG_PYTHON3_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON3_VERSION "${VCPKG_PYTHON3_INCLUDE}")
list(APPEND BUILD_PYTHON_VERSIONS "${VCPKG_PYTHON3_VERSION}")
if("python3" IN_LIST FEATURES)
# Find Python3 libraries. Can't use find_package here, but we already know where everything is
file(GLOB python3_include_dir "${CURRENT_INSTALLED_DIR}/include/python3.*")
string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" python3_version "${python3_include_dir}")
string(REPLACE ";" "," BUILD_PYTHON_VERSIONS "${BUILD_PYTHON_VERSIONS}")
string(APPEND USER_CONFIG_EXTRA_LINES
"using python : ${python3_version} : : \"${python3_include_dir}\" : \"${CURRENT_INSTALLED_DIR}/lib\" ;\n"
"using python : ${python3_version} : : \"${python3_include_dir}\" : \"${CURRENT_INSTALLED_DIR}/debug/lib\" : <python-debugging>on ;\n")
list(APPEND build_python_versions "${python3_version}")
endif()
if(NOT build_python_versions)
message(FATAL_ERROR "Boost.Python requires at least one Python specified as a feature.")
endif()
string(REPLACE ";" "," build_python_versions "${build_python_versions}")
list(APPEND B2_OPTIONS
python=${BUILD_PYTHON_VERSIONS}
python=${build_python_versions}
)
if(VCPKG_CXX_FLAGS_DEBUG MATCHES "BOOST_DEBUG_PYTHON")
list(APPEND B2_OPTIONS_DBG
if(CMAKE_CXX_FLAGS_DEBUG MATCHES "BOOST_DEBUG_PYTHON" AND CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
python-debugging=on
)
endif()

View File

@ -1,6 +1,7 @@
{
"name": "boost-python",
"version": "1.77.0",
"port-version": 1,
"description": "Boost python module",
"homepage": "https://github.com/boostorg/python",
"supports": "!uwp & !(arm & windows) & !emscripten",
@ -35,18 +36,26 @@
"boost-type-traits",
"boost-utility",
"boost-vcpkg-helpers",
"python3",
{
"name": "vcpkg-cmake",
"host": true
}
],
"default-features": [
"python3"
],
"features": {
"python2": {
"description": "Build with Python2 support",
"dependencies": [
"python2"
]
},
"python3": {
"description": "Build with Python3 support",
"dependencies": [
"python3"
]
}
}
}

View File

@ -1,6 +1,7 @@
{
"name": "boost",
"version": "1.77.0",
"port-version": 1,
"description": "Peer-reviewed portable C++ source libraries",
"homepage": "https://boost.org",
"dependencies": [
@ -73,10 +74,6 @@
"boost-geometry",
"boost-gil",
"boost-graph",
{
"name": "boost-graph-parallel",
"platform": "!uwp"
},
"boost-hana",
"boost-heap",
"boost-histogram",
@ -112,10 +109,6 @@
"boost-metaparse",
"boost-move",
"boost-mp11",
{
"name": "boost-mpi",
"platform": "!uwp"
},
"boost-mpl",
"boost-msm",
"boost-multi-array",

View File

@ -23,10 +23,25 @@ else {
# Clear this array when moving to a new boost version
$portVersions = @{
#e.g. "boost-asio" = 1;
#e.g. "boost-asio" = 1;
"boost" = 1;
"boost-config" = 2;
"boost-iostreams" = 1;
"boost-modular-build-helper" = 1;
"boost-odeint" = 1;
"boost-python" = 1;
"boost-process" = 2;
}
$portData = @{
"boost" = @{
"features" = @{
"mpi" = @{
"description" = "Build with MPI support";
"dependencies" = @("boost-mpi", "boost-graph-parallel");
}
}
};
"boost-asio" = @{
"dependencies" = @("openssl");
"supports" = "!emscripten"
@ -35,8 +50,26 @@ $portData = @{
"boost-fiber" = @{ "supports" = "!osx&!uwp&!arm&!emscripten" };
"boost-filesystem" = @{ "supports" = "!uwp" };
"boost-iostreams" = @{
"dependencies" = @("zlib", "bzip2", "liblzma", "zstd");
"supports" = "!uwp";
"default-features" = @("bzip2", "lzma", "zlib", "zstd");
"supports" = "!uwp";
"features" = @{
"bzip2" = @{
"dependencies" = @("bzip2");
"description" = "Support bzip2 filters"
};
"lzma" = @{
"dependencies" = @("liblzma");
"description" = "Support LZMA/xz filters"
};
"zlib" = @{
"dependencies" = @("zlib");
"description" = "Support zlib filters"
};
"zstd" = @{
"dependencies" = @("zstd");
"description" = "Support zstd filters"
};
};
};
"boost-context" = @{ "supports" = "!uwp&!emscripten" };
"boost-stacktrace" = @{ "supports" = "!uwp" };
@ -46,12 +79,12 @@ $portData = @{
"boost-wave" = @{ "supports" = "!uwp" };
"boost-log" = @{ "supports" = "!uwp&!emscripten" };
"boost-locale" = @{
"dependencies" = @(@{ name = "libiconv"; platform = "!uwp&!windows&!mingw" });
"dependencies" = @(@{ "name" = "libiconv"; "platform" = "!uwp&!windows&!mingw" });
"supports" = "!uwp";
"features" = @{
icu = @{
dependencies = @("icu")
description = "ICU backend for Boost.Locale"
"icu" = @{
"dependencies" = @("icu");
"description" = "ICU backend for Boost.Locale"
}
}
};
@ -63,23 +96,35 @@ $portData = @{
"dependencies" = @("mpi");
"supports" = "!uwp";
};
"boost-odeint" = @{
"features" = @{
"mpi" = @{
"dependencies" = @("boost-mpi");
"description" = "Support parallelization with MPI"
}
}
};
"boost-parameter-python" = @{ "supports" = "!emscripten" };
"boost-process" = @{ "supports" = "!emscripten" };
"boost-python" = @{
"dependencies" = @("python3");
"supports" = "!uwp&!(arm&windows)&!emscripten";
"features" = @{
python2 = @{
dependencies = @("python2")
description = "Build with Python2 support"
"default-features" = @("python3");
"supports" = "!uwp&!(arm&windows)&!emscripten";
"features" = @{
"python2" = @{
"dependencies" = @("python2");
"description" = "Build with Python2 support"
};
"python3" = @{
"dependencies" = @("python3");
"description" = "Build with Python3 support"
}
}
};
"boost-regex" = @{
"features" = @{
icu = @{
dependencies = @("icu")
description = "ICU backend for Boost.Regex"
"icu" = @{
"dependencies" = @("icu");
"description" = "ICU backend for Boost.Regex"
}
}
}
@ -104,36 +149,47 @@ function GeneratePortDependency() {
$portName
}
}
function GeneratePortManifest() {
param (
[string]$Library,
[string]$PortName,
[string]$Homepage,
[string]$Description,
$Dependencies = @(),
$Features = @()
$Dependencies = @()
)
if ([string]::IsNullOrEmpty($PortName)) {
$PortName = GeneratePortName $Library
}
$manifest = @{
name = $PortName
"version" = $version
homepage = $Homepage
description = $Description
}
if ($portVersions.Contains($PortName)) {
$manifest["port-version"] = $portVersions[$PortName]
"name" = $PortName
"version" = $version
"homepage" = $Homepage
"description" = $Description
}
if ($portData.Contains($PortName)) {
$manifest += $portData[$PortName]
}
if ($portVersions.Contains($PortName)) {
$manifest["port-version"] = $portVersions[$PortName]
}
if ($Dependencies.Count -gt 0) {
$manifest["dependencies"] += $Dependencies
}
if ($Features.Count -gt 0) {
$manifest["features"] += $Features
# Remove from the dependencies the ports that are included in the feature dependencies
if ($manifest.Contains('features') -and $manifest.Contains('dependencies')) {
foreach ($feature in $manifest.features.Keys) {
$feature_dependencies = $manifest.features.$feature["dependencies"]
foreach ($dependency in $feature_dependencies) {
if ($dependency.Contains("name")) {
$dep_name = $dependency.name
}
else {
$dep_name = $dependency
}
$manifest["dependencies"] = $manifest["dependencies"] `
| Where-Object { $_ -notmatch "$dep_name" } `
| Where-Object { $_.name -notmatch "$dep_name" }
}
}
}
$manifest | ConvertTo-Json -Depth 10 -Compress `
| Out-File -Encoding UTF8 "$portsDir/$PortName/vcpkg.json"
& $vcpkg format-manifest "$portsDir/$PortName/vcpkg.json"
@ -153,8 +209,7 @@ function GeneratePort() {
# Generate vcpkg.json
GeneratePortManifest `
-Library $Library `
-PortName $PortName `
-PortName $portName `
-Homepage "https://github.com/boostorg/$Library" `
-Description "Boost $Library module" `
-Dependencies $Dependencies
@ -197,7 +252,7 @@ function GeneratePort() {
)
if (Test-Path "$scriptsDir/post-source-stubs/$Library.cmake") {
$portfileLines += @(get-content "$scriptsDir/post-source-stubs/$Library.cmake")
$portfileLines += @(Get-Content "$scriptsDir/post-source-stubs/$Library.cmake")
}
if ($NeedsBuild) {
@ -242,7 +297,7 @@ function GeneratePort() {
)
if (Test-Path "$scriptsDir/post-build-stubs/$Library.cmake") {
$portfileLines += @(get-content "$scriptsDir/post-build-stubs/$Library.cmake")
$portfileLines += @(Get-Content "$scriptsDir/post-build-stubs/$Library.cmake")
}
$portfileLines += @("")
@ -310,7 +365,7 @@ foreach ($library in $libraries) {
if ($hash -is [Object[]]) {
$hash = $hash[1]
}
$unpacked = "$scriptsDir/libs/$library-boost-$version"
if (!(Test-Path $unpacked)) {
"Unpacking boost/$library..."
@ -481,27 +536,17 @@ foreach ($library in $libraries) {
if ($updateServicePorts) {
# Generate manifest file for master boost port which depends on each individual library
# mpi and graph-parallel are excluded due to they having a dependency on msmpi/openmpi
$boostPortDependencies = $boostPortDependencies | Where-Object { $_ -notmatch "boost-mpi|boost-graph-parallel" }
$boostPortFeatures = @(
@{
name = "mpi"
description = "Build with MPI support"
dependencies = @("boost-mpi", "boost-graph-parallel")
}
)
GeneratePortManifest `
-PortName "boost" `
-Homepage "https://boost.org" `
-Description "Peer-reviewed portable C++ source libraries" `
-Dependencies $boostPortDependencies `
-Features $boostPortFeatures
-Dependencies $boostPortDependencies
Set-Content -LiteralPath "$portsDir/boost/portfile.cmake" `
-Value "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" `
-Encoding UTF8 `
-NoNewline
# Generate manifest files for boost-uninstall
GeneratePortManifest `
-PortName "boost-uninstall" `
@ -519,4 +564,7 @@ if ($updateServicePorts) {
-Description "Internal vcpkg port used to build Boost libraries" `
-Dependencies @("boost-uninstall")
# Update Boost version in boost-modular-build.cmake
$boost_modular_build = "$portsDir/boost-modular-build-helper/boost-modular-build.cmake"
(Get-Content -LiteralPath "$boost_modular_build") -replace "set\(BOOST_VERSION ([0-9\.]+)\)", "set(BOOST_VERSION $version)" | Set-Content -LiteralPath "$boost_modular_build"
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0f7b70c02bfb43bbdc8f62bd49c8a5339a65f48c",
"version": "1.77.0",
"port-version": 2
},
{
"git-tree": "6aa6932068c1fbc812d545502f60c3a7cef80dde",
"version": "1.77.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "286c74896c6f2a6057bfbce333304f279bb38aac",
"version": "1.77.0",
"port-version": 1
},
{
"git-tree": "9ff4027cebb3423a41814a8c2da942ea959b17ad",
"version": "1.77.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c076291c3d44f7cea167e469748ead6270e1c424",
"version": "1.77.0",
"port-version": 1
},
{
"git-tree": "b14ac826c44c030a65af10732269f379b856f76f",
"version": "1.77.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "effd1406c513ca8f20a1e2b6de0cd299be92d74e",
"version": "1.77.0",
"port-version": 1
},
{
"git-tree": "9ef1ae6d236984a5cdb1cb5dbc76067648461231",
"version": "1.77.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0e476269a7091861c1db7379d4e925df6d184044",
"version": "1.77.0",
"port-version": 2
},
{
"git-tree": "e70acbb855538f95200b341b1cf26d9c1dc6e6cd",
"version": "1.77.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "879991d36cfdcdb57b176b9dac08b55c3c69a9a1",
"version": "1.77.0",
"port-version": 1
},
{
"git-tree": "9f6fba6abc29e2084469c11ba2f2f1f745b08137",
"version": "1.77.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5fe225d8d76e70968014f7ddab050d7e520709e6",
"version": "1.77.0",
"port-version": 1
},
{
"git-tree": "c2e18442532ea17f03c775323f53a3b03ade0b6d",
"version": "1.77.0",

View File

@ -502,7 +502,7 @@
},
"boost": {
"baseline": "1.77.0",
"port-version": 0
"port-version": 1
},
"boost-accumulators": {
"baseline": "1.77.0",
@ -582,7 +582,7 @@
},
"boost-config": {
"baseline": "1.77.0",
"port-version": 1
"port-version": 2
},
"boost-container": {
"baseline": "1.77.0",
@ -750,7 +750,7 @@
},
"boost-iostreams": {
"baseline": "1.77.0",
"port-version": 0
"port-version": 1
},
"boost-iterator": {
"baseline": "1.77.0",
@ -806,7 +806,7 @@
},
"boost-modular-build-helper": {
"baseline": "1.77.0",
"port-version": 0
"port-version": 1
},
"boost-move": {
"baseline": "1.77.0",
@ -850,7 +850,7 @@
},
"boost-odeint": {
"baseline": "1.77.0",
"port-version": 0
"port-version": 1
},
"boost-optional": {
"baseline": "1.77.0",
@ -898,7 +898,7 @@
},
"boost-process": {
"baseline": "1.77.0",
"port-version": 1
"port-version": 2
},
"boost-program-options": {
"baseline": "1.77.0",
@ -926,7 +926,7 @@
},
"boost-python": {
"baseline": "1.77.0",
"port-version": 0
"port-version": 1
},
"boost-qvm": {
"baseline": "1.77.0",