From f904f7354dce4cb396a4d0792e36319d78ccccfb Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Tue, 12 Oct 2021 04:21:08 +0300 Subject: [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 * [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 * [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 * Update versions Co-authored-by: Robert Schumacher * [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 Co-authored-by: Tobias Markus Co-authored-by: Kai Pastor Co-authored-by: Stefano Sinigardi Co-authored-by: nicole mazzuca Co-authored-by: Lars Glud Co-authored-by: eao197 Co-authored-by: Dmitry Baryshev Co-authored-by: Akash Co-authored-by: Robert Schumacher --- ports/boost-python/b2-options.cmake | 42 +++++++++++++++++++++++-------------- ports/boost-python/vcpkg.json | 11 +++++++++- 2 files changed, 36 insertions(+), 17 deletions(-) (limited to 'ports/boost-python') diff --git a/ports/boost-python/b2-options.cmake b/ports/boost-python/b2-options.cmake index 3713424ed..f9f2e0f6a 100644 --- a/ports/boost-python/b2-options.cmake +++ b/ports/boost-python/b2-options.cmake @@ -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\" : 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\" : 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() diff --git a/ports/boost-python/vcpkg.json b/ports/boost-python/vcpkg.json index 0ba6de705..51d50389b 100644 --- a/ports/boost-python/vcpkg.json +++ b/ports/boost-python/vcpkg.json @@ -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" + ] } } } -- cgit v1.2.3