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 --- scripts/boost/generate-ports.ps1 | 144 ++++++++++++++++++++++++++------------- 1 file changed, 96 insertions(+), 48 deletions(-) (limited to 'scripts') diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 index e7d258d50..902d86449 100644 --- a/scripts/boost/generate-ports.ps1 +++ b/scripts/boost/generate-ports.ps1 @@ -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" } -- cgit v1.2.3