aboutsummaryrefslogtreecommitdiff
path: root/scripts/boost
diff options
context:
space:
mode:
authorYury Bura <yurybura@gmail.com>2021-10-12 04:21:08 +0300
committerGitHub <noreply@github.com>2021-10-11 18:21:08 -0700
commitf904f7354dce4cb396a4d0792e36319d78ccccfb (patch)
treeaf006c1454ba942a97793048fdd9edfb6429ad3c /scripts/boost
parente29e78d835618a136d117d8836835520bde33eb1 (diff)
downloadvcpkg-f904f7354dce4cb396a4d0792e36319d78ccccfb.tar.gz
vcpkg-f904f7354dce4cb396a4d0792e36319d78ccccfb.zip
[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>
Diffstat (limited to 'scripts/boost')
-rw-r--r--scripts/boost/generate-ports.ps1144
1 files changed, 96 insertions, 48 deletions
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"
}