2017-12-05 13:00:50 -08:00
|
|
|
[CmdletBinding()]
|
|
|
|
param (
|
|
|
|
$libraries = @(),
|
2023-04-15 09:15:07 +02:00
|
|
|
$version = "1.82.0",
|
2020-03-10 10:15:27 -07:00
|
|
|
$portsDir = $null
|
2017-12-05 13:00:50 -08:00
|
|
|
)
|
|
|
|
|
2020-11-26 02:26:33 +07:00
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
|
2017-12-05 13:00:50 -08:00
|
|
|
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($null -eq $portsDir) {
|
2020-03-10 10:15:27 -07:00
|
|
|
$portsDir = "$scriptsDir/../../ports"
|
|
|
|
}
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($IsWindows) {
|
2020-11-26 02:26:33 +07:00
|
|
|
$vcpkg = "$scriptsDir/../../vcpkg.exe"
|
2021-01-13 14:41:23 -08:00
|
|
|
$curl = "curl.exe"
|
2020-11-26 02:26:33 +07:00
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
else {
|
2020-11-26 02:26:33 +07:00
|
|
|
$vcpkg = "$scriptsDir/../../vcpkg"
|
2021-01-13 14:41:23 -08:00
|
|
|
$curl = "curl"
|
2020-11-26 02:26:33 +07:00
|
|
|
}
|
|
|
|
|
2021-01-13 14:41:23 -08:00
|
|
|
# Clear this array when moving to a new boost version
|
2023-06-06 12:33:33 -07:00
|
|
|
$defaultPortVersion = 2
|
2021-09-28 03:12:39 +03:00
|
|
|
$portVersions = @{
|
2023-06-16 10:50:24 -07:00
|
|
|
"boost-atomic" = 3;
|
2023-07-14 02:29:57 +08:00
|
|
|
"boost-modular-build-helper" = 4;
|
2023-07-26 10:22:42 +09:00
|
|
|
"boost-ublas" = 3;
|
2023-02-01 13:34:29 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
function Get-PortVersion {
|
|
|
|
param (
|
|
|
|
[string]$PortName
|
|
|
|
)
|
|
|
|
|
|
|
|
$nonDefault = $portVersions[$PortName]
|
|
|
|
if ($nonDefault -ne $null) {
|
|
|
|
return $nonDefault
|
|
|
|
}
|
|
|
|
|
|
|
|
return $defaultPortVersion
|
2020-08-07 11:41:21 -07:00
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$portData = @{
|
2021-10-12 04:21:08 +03:00
|
|
|
"boost" = @{
|
|
|
|
"features" = @{
|
|
|
|
"mpi" = @{
|
|
|
|
"description" = "Build with MPI support";
|
2021-10-14 00:50:03 +03:00
|
|
|
"dependencies" = @("boost-mpi", "boost-graph-parallel", "boost-property-map-parallel");
|
2021-10-12 04:21:08 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-asio" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"features" = @{
|
|
|
|
"ssl" = @{
|
|
|
|
"description" = "Build with SSL support";
|
|
|
|
"dependencies" = @(@{ "name" = "openssl"; "platform" = "!emscripten" });
|
|
|
|
}
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
};
|
|
|
|
"boost-beast" = @{ "supports" = "!emscripten" };
|
2022-01-10 22:47:12 +03:00
|
|
|
"boost-fiber" = @{
|
2022-09-28 00:51:05 +02:00
|
|
|
"supports" = "!uwp & !arm & !emscripten";
|
2022-01-10 22:47:12 +03:00
|
|
|
"features" = @{
|
|
|
|
"numa" = @{
|
|
|
|
"description" = "Enable NUMA support";
|
|
|
|
}
|
2023-02-01 13:34:29 -08:00
|
|
|
}
|
2022-01-10 22:47:12 +03:00
|
|
|
};
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-filesystem" = @{ "supports" = "!uwp" };
|
|
|
|
"boost-iostreams" = @{
|
2021-10-12 04:21:08 +03:00
|
|
|
"default-features" = @("bzip2", "lzma", "zlib", "zstd");
|
|
|
|
"supports" = "!uwp";
|
|
|
|
"features" = @{
|
|
|
|
"bzip2" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "Support bzip2 filters";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("bzip2");
|
|
|
|
};
|
|
|
|
"lzma" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "Support LZMA/xz filters";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("liblzma");
|
|
|
|
};
|
|
|
|
"zlib" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "Support zlib filters";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("zlib");
|
|
|
|
};
|
|
|
|
"zstd" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "Support zstd filters";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("zstd");
|
|
|
|
};
|
|
|
|
};
|
2021-09-28 03:12:39 +03:00
|
|
|
};
|
2022-01-10 22:47:12 +03:00
|
|
|
"boost-context" = @{ "supports" = "!uwp & !emscripten" };
|
2022-10-06 00:06:16 +02:00
|
|
|
"boost-coroutine" = @{ "supports" = "!(arm & windows) & !uwp & !emscripten" };
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-coroutine2" = @{ "supports" = "!emscripten" };
|
2022-01-10 22:47:12 +03:00
|
|
|
"boost-log" = @{ "supports" = "!uwp & !emscripten" };
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-locale" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"dependencies" = @(@{ "name" = "libiconv"; "platform" = "!uwp & !windows & !mingw" });
|
2021-09-28 03:12:39 +03:00
|
|
|
"supports" = "!uwp";
|
|
|
|
"features" = @{
|
2021-10-12 04:21:08 +03:00
|
|
|
"icu" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "ICU backend for Boost.Locale";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("icu");
|
2021-01-13 14:41:23 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-mpi" = @{
|
|
|
|
"dependencies" = @("mpi");
|
|
|
|
"supports" = "!uwp";
|
2022-01-10 22:47:12 +03:00
|
|
|
"features" = @{
|
|
|
|
"python3" = @{
|
|
|
|
"description" = "Build Python3 bindings";
|
|
|
|
"supports" = "!static";
|
|
|
|
"dependencies" = @(@{ "name" = "boost-python"; "features" = @( "python3" ); "platform" = "!uwp & !emscripten & !ios & !android" }, "python3");
|
|
|
|
}
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
};
|
|
|
|
"boost-graph-parallel" = @{
|
|
|
|
"dependencies" = @("mpi");
|
|
|
|
"supports" = "!uwp";
|
|
|
|
};
|
2021-10-12 04:21:08 +03:00
|
|
|
"boost-odeint" = @{
|
|
|
|
"features" = @{
|
|
|
|
"mpi" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "Support parallelization with MPI";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("boost-mpi");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-parameter-python" = @{ "supports" = "!emscripten" };
|
|
|
|
"boost-process" = @{ "supports" = "!emscripten" };
|
|
|
|
"boost-python" = @{
|
2021-10-12 04:21:08 +03:00
|
|
|
"default-features" = @("python3");
|
2022-01-10 22:47:12 +03:00
|
|
|
"supports" = "!uwp & !emscripten & !ios & !android";
|
2021-10-12 04:21:08 +03:00
|
|
|
"features" = @{
|
|
|
|
"python2" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "Build with Python2 support";
|
|
|
|
"supports" = "!(arm & windows)";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("python2");
|
|
|
|
};
|
|
|
|
"python3" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "Build with Python3 support";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("python3");
|
2021-01-13 14:41:23 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2023-02-24 11:57:40 -08:00
|
|
|
"boost-random" = @{ "supports" = "!uwp" };
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-regex" = @{
|
2021-01-13 14:41:23 -08:00
|
|
|
"features" = @{
|
2021-10-12 04:21:08 +03:00
|
|
|
"icu" = @{
|
2022-01-10 22:47:12 +03:00
|
|
|
"description" = "ICU backend for Boost.Regex";
|
2021-10-12 04:21:08 +03:00
|
|
|
"dependencies" = @("icu");
|
2021-01-13 14:41:23 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-02-24 11:57:40 -08:00
|
|
|
"boost-stacktrace" = @{ "supports" = "!uwp" };
|
|
|
|
"boost-test" = @{ "supports" = "!uwp" };
|
|
|
|
"boost-wave" = @{ "supports" = "!uwp" };
|
2020-08-07 11:41:21 -07:00
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
function GeneratePortName() {
|
2018-08-09 22:56:09 -07:00
|
|
|
param (
|
2021-09-28 03:12:39 +03:00
|
|
|
[string]$Library
|
2018-08-09 22:56:09 -07:00
|
|
|
)
|
2021-09-28 03:12:39 +03:00
|
|
|
"boost-" + ($Library -replace "_", "-")
|
|
|
|
}
|
2018-08-09 22:56:09 -07:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
function GeneratePortDependency() {
|
|
|
|
param (
|
|
|
|
[string]$Library
|
|
|
|
)
|
|
|
|
$portName = GeneratePortName $Library
|
|
|
|
if ($portData.Contains($portName) -and $portData[$portName].Contains('supports')) {
|
|
|
|
@{name = $portName; platform = $portData[$portName]['supports'] }
|
2018-08-09 22:56:09 -07:00
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
else {
|
|
|
|
$portName
|
2018-08-09 22:56:09 -07:00
|
|
|
}
|
|
|
|
}
|
2021-10-12 04:21:08 +03:00
|
|
|
|
2022-10-19 04:17:10 +03:00
|
|
|
|
|
|
|
function AddBoostVersionConstraints() {
|
|
|
|
param (
|
|
|
|
$Dependencies = @()
|
|
|
|
)
|
|
|
|
|
|
|
|
$updated_dependencies = @()
|
|
|
|
foreach ($dependency in $Dependencies) {
|
|
|
|
if ($dependency.Contains("name")) {
|
|
|
|
if ($dependency.name.StartsWith("boost")) {
|
2023-06-06 12:33:33 -07:00
|
|
|
$dependency["version>="] = $version
|
2022-10-19 04:17:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ($dependency.StartsWith("boost")) {
|
|
|
|
$dependency = @{
|
|
|
|
"name" = $dependency
|
2023-06-06 12:33:33 -07:00
|
|
|
"version>=" = $version
|
2022-10-19 04:17:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$updated_dependencies += $dependency
|
|
|
|
}
|
|
|
|
$updated_dependencies
|
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
function GeneratePortManifest() {
|
2017-12-05 13:00:50 -08:00
|
|
|
param (
|
2020-01-17 02:10:15 +03:00
|
|
|
[string]$PortName,
|
2021-09-28 03:12:39 +03:00
|
|
|
[string]$Homepage,
|
|
|
|
[string]$Description,
|
2022-04-21 20:01:54 +03:00
|
|
|
[string]$License,
|
2021-10-12 04:21:08 +03:00
|
|
|
$Dependencies = @()
|
2021-09-28 03:12:39 +03:00
|
|
|
)
|
|
|
|
$manifest = @{
|
2023-02-01 13:34:29 -08:00
|
|
|
"`$comment" = "Automatically generated by scripts/boost/generate-ports.ps1"
|
2022-08-25 20:46:01 +03:00
|
|
|
"name" = $PortName
|
|
|
|
"version" = $version
|
|
|
|
"homepage" = $Homepage
|
|
|
|
"description" = $Description
|
2021-09-28 03:12:39 +03:00
|
|
|
}
|
2022-04-21 20:01:54 +03:00
|
|
|
if ($License) {
|
|
|
|
$manifest["license"] += $License
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($portData.Contains($PortName)) {
|
|
|
|
$manifest += $portData[$PortName]
|
|
|
|
}
|
2023-02-01 13:34:29 -08:00
|
|
|
$thisPortVersion = Get-PortVersion $PortName
|
|
|
|
if ($thisPortVersion -ne 0) {
|
|
|
|
$manifest["port-version"] = $thisPortVersion
|
2021-10-12 04:21:08 +03:00
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($Dependencies.Count -gt 0) {
|
|
|
|
$manifest["dependencies"] += $Dependencies
|
|
|
|
}
|
2021-10-12 04:21:08 +03:00
|
|
|
# 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"] `
|
2023-02-01 13:34:29 -08:00
|
|
|
| Where-Object {
|
2022-01-10 22:47:12 +03:00
|
|
|
if ($_.Contains("name")) {
|
|
|
|
$_.name -notmatch "$dep_name"
|
|
|
|
} else {
|
|
|
|
$_ -notmatch "$dep_name"
|
|
|
|
}
|
|
|
|
}
|
2021-10-12 04:21:08 +03:00
|
|
|
}
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
}
|
2021-10-12 04:21:08 +03:00
|
|
|
|
2022-10-19 04:17:10 +03:00
|
|
|
# Add version constraints to boost dependencies
|
|
|
|
$manifest["dependencies"] = @(AddBoostVersionConstraints $manifest["dependencies"])
|
|
|
|
foreach ($feature in $manifest.features.Keys) {
|
|
|
|
$manifest.features.$feature["dependencies"] = @(AddBoostVersionConstraints $manifest.features.$feature["dependencies"])
|
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$manifest | ConvertTo-Json -Depth 10 -Compress `
|
|
|
|
| Out-File -Encoding UTF8 "$portsDir/$PortName/vcpkg.json"
|
|
|
|
& $vcpkg format-manifest "$portsDir/$PortName/vcpkg.json"
|
|
|
|
}
|
|
|
|
|
|
|
|
function GeneratePort() {
|
|
|
|
param (
|
|
|
|
[string]$Library,
|
2017-12-05 13:00:50 -08:00
|
|
|
[string]$Hash,
|
|
|
|
[bool]$NeedsBuild,
|
2021-09-28 03:12:39 +03:00
|
|
|
$Dependencies = @()
|
2017-12-05 13:00:50 -08:00
|
|
|
)
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$portName = GeneratePortName $Library
|
2021-01-13 14:41:23 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
New-Item -ItemType "Directory" "$portsDir/$portName" -erroraction SilentlyContinue | out-null
|
|
|
|
|
|
|
|
# Generate vcpkg.json
|
|
|
|
GeneratePortManifest `
|
2021-10-12 04:21:08 +03:00
|
|
|
-PortName $portName `
|
2021-09-28 03:12:39 +03:00
|
|
|
-Homepage "https://github.com/boostorg/$Library" `
|
|
|
|
-Description "Boost $Library module" `
|
2022-04-21 20:01:54 +03:00
|
|
|
-License "BSL-1.0" `
|
2021-09-28 03:12:39 +03:00
|
|
|
-Dependencies $Dependencies
|
2017-12-05 13:00:50 -08:00
|
|
|
|
|
|
|
$portfileLines = @(
|
2020-11-26 02:26:33 +07:00
|
|
|
"# Automatically generated by scripts/boost/generate-ports.ps1"
|
2017-12-05 13:00:50 -08:00
|
|
|
""
|
2020-01-17 02:10:15 +03:00
|
|
|
)
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($Library -eq "system") {
|
2020-01-17 02:10:15 +03:00
|
|
|
$portfileLines += @(
|
|
|
|
"vcpkg_buildpath_length_warning(37)"
|
|
|
|
""
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
$portfileLines += @(
|
2017-12-05 13:00:50 -08:00
|
|
|
"vcpkg_from_github("
|
|
|
|
" OUT_SOURCE_PATH SOURCE_PATH"
|
2021-09-28 03:12:39 +03:00
|
|
|
" REPO boostorg/$Library"
|
2017-12-05 13:00:50 -08:00
|
|
|
" REF boost-$version"
|
|
|
|
" SHA512 $Hash"
|
|
|
|
" HEAD_REF master"
|
2019-01-31 10:04:17 +10:00
|
|
|
)
|
2021-09-28 03:12:39 +03:00
|
|
|
[Array]$patches = Get-Item -Path "$portsDir/$portName/*.patch"
|
|
|
|
if ($null -eq $patches -or $patches.Count -eq 0) {
|
2019-09-27 10:41:02 -07:00
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
elseif ($patches.Count -eq 1) {
|
2020-08-07 11:41:21 -07:00
|
|
|
$portfileLines += @(" PATCHES $($patches.name)")
|
2019-01-31 10:04:17 +10:00
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
else {
|
2020-08-07 11:41:21 -07:00
|
|
|
$portfileLines += @(" PATCHES")
|
2021-09-28 03:12:39 +03:00
|
|
|
foreach ($patch in $patches) {
|
2020-11-06 22:30:37 +01:00
|
|
|
$portfileLines += @(" $($patch.name)")
|
2020-08-07 11:41:21 -07:00
|
|
|
}
|
2020-03-24 13:01:25 -07:00
|
|
|
}
|
2019-01-31 10:04:17 +10:00
|
|
|
$portfileLines += @(
|
2017-12-05 13:00:50 -08:00
|
|
|
")"
|
|
|
|
""
|
|
|
|
)
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
if (Test-Path "$scriptsDir/post-source-stubs/$Library.cmake") {
|
2021-10-12 04:21:08 +03:00
|
|
|
$portfileLines += @(Get-Content "$scriptsDir/post-source-stubs/$Library.cmake")
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($NeedsBuild) {
|
2020-05-13 20:26:05 +03:00
|
|
|
$portfileLines += @(
|
2021-03-26 12:55:34 -07:00
|
|
|
"include(`${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)"
|
2020-05-13 20:26:05 +03:00
|
|
|
)
|
|
|
|
# b2-options.cmake contains port-specific build options
|
2021-09-28 03:12:39 +03:00
|
|
|
if (Test-Path "$portsDir/$portName/b2-options.cmake") {
|
2017-12-05 13:00:50 -08:00
|
|
|
$portfileLines += @(
|
2019-01-31 10:04:17 +10:00
|
|
|
"boost_modular_build("
|
|
|
|
" SOURCE_PATH `${SOURCE_PATH}"
|
2020-05-13 20:26:05 +03:00
|
|
|
" BOOST_CMAKE_FRAGMENT `"`${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake`""
|
2019-01-31 10:04:17 +10:00
|
|
|
")"
|
2017-12-05 13:00:50 -08:00
|
|
|
)
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
elseif (Test-Path "$portsDir/$portName/b2-options.cmake.in") {
|
2020-11-26 02:26:33 +07:00
|
|
|
$portfileLines += @(
|
|
|
|
'configure_file('
|
|
|
|
' "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake.in"'
|
|
|
|
' "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"'
|
|
|
|
' @ONLY'
|
|
|
|
')'
|
|
|
|
'boost_modular_build('
|
|
|
|
' SOURCE_PATH ${SOURCE_PATH}'
|
|
|
|
' BOOST_CMAKE_FRAGMENT "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"'
|
|
|
|
')'
|
|
|
|
)
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
else {
|
2017-12-05 13:00:50 -08:00
|
|
|
$portfileLines += @(
|
|
|
|
"boost_modular_build(SOURCE_PATH `${SOURCE_PATH})"
|
2020-05-13 20:26:05 +03:00
|
|
|
)
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
|
|
|
}
|
2020-01-17 12:56:22 +03:00
|
|
|
|
|
|
|
$portfileLines += @(
|
|
|
|
"include(`${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)"
|
|
|
|
"boost_modular_headers(SOURCE_PATH `${SOURCE_PATH})"
|
|
|
|
)
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
if (Test-Path "$scriptsDir/post-build-stubs/$Library.cmake") {
|
2021-10-12 04:21:08 +03:00
|
|
|
$portfileLines += @(Get-Content "$scriptsDir/post-build-stubs/$Library.cmake")
|
2018-01-03 17:44:55 -08:00
|
|
|
}
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-01-13 14:41:23 -08:00
|
|
|
$portfileLines += @("")
|
2021-09-28 03:12:39 +03:00
|
|
|
Set-Content -LiteralPath "$portsDir/$portName/portfile.cmake" `
|
2023-02-01 13:34:29 -08:00
|
|
|
-Value "$($portfileLines -join "`n")" `
|
[boost] update to 1.76.0 (#17335)
* [boost] update generator script for boost 1.76
* [boost] update ports to 1.76.0 (run generator)
* [boost] fix windows build?
* [quantlib] update and fix mac build
* [symengine] update and fix build
* [avro-cpp] update to latest master and fix windows build
* [folly] update to 2021.05.31.00
* [fbthrift, fizz, wangle] update to v2021.05.31.00 and fix build
* [proxygen] update to version 2021.05.31.00
* [fizz, proxygen, fbthrift] fix sodium target
* [proxygen] also works on macOS
* [quantlib] use fix from upstream to fix mac build
* [symengine] minimize patch file and fix deprecation warning
* [folly,proxygen,wangle,fizz,fbthrift] update to 2021.06.14.00
* [fbthrift] remove unnecessary dependency rsocket
I couldn't find any information that this dependency exists. The term is used in the code, but not in the context of a dependency
* [fizz,fbthrift] fix zlib dependency
* [fbthrift] pass required flex executable to cmake configure
* add version files
* [boost] generate-ports.ps1: Apply code review
* [boost] changes from new version of generate-ports script
* update version files
* [boost] generate-ports.ps1: Apply code review
2021-07-07 21:31:06 +02:00
|
|
|
-Encoding UTF8 `
|
|
|
|
-NoNewline
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
if (!(Test-Path "$scriptsDir/boost")) {
|
2017-12-05 13:00:50 -08:00
|
|
|
"Cloning boost..."
|
2021-09-28 03:12:39 +03:00
|
|
|
Push-Location $scriptsDir
|
|
|
|
try {
|
2017-12-05 13:00:50 -08:00
|
|
|
git clone https://github.com/boostorg/boost --branch boost-$version
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
finally {
|
|
|
|
Pop-Location
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
else {
|
|
|
|
Push-Location $scriptsDir/boost
|
|
|
|
try {
|
2018-04-17 15:18:09 -07:00
|
|
|
git fetch
|
|
|
|
git checkout -f boost-$version
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
finally {
|
|
|
|
Pop-Location
|
2018-04-17 15:18:09 -07:00
|
|
|
}
|
|
|
|
}
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$foundLibraries = Get-ChildItem $scriptsDir/boost/libs -directory | ForEach-Object name | ForEach-Object {
|
|
|
|
if ($_ -eq "numeric") {
|
2017-12-05 13:00:50 -08:00
|
|
|
"numeric_conversion"
|
|
|
|
"interval"
|
|
|
|
"odeint"
|
|
|
|
"ublas"
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
elseif ($_ -eq "headers") {
|
2019-05-16 18:33:32 -07:00
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
else {
|
2017-12-05 13:00:50 -08:00
|
|
|
$_
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-13 14:41:23 -08:00
|
|
|
New-Item -ItemType "Directory" $scriptsDir/downloads -erroraction SilentlyContinue | out-null
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$updateServicePorts = $false
|
|
|
|
|
|
|
|
if ($libraries.Length -eq 0) {
|
|
|
|
$libraries = $foundLibraries
|
|
|
|
$updateServicePorts = $true
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$boostPortDependencies = @()
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
foreach ($library in $libraries) {
|
2017-12-05 13:00:50 -08:00
|
|
|
"Handling boost/$library..."
|
|
|
|
$archive = "$scriptsDir/downloads/$library-boost-$version.tar.gz"
|
2021-09-28 03:12:39 +03:00
|
|
|
if (!(Test-Path $archive)) {
|
2017-12-05 13:00:50 -08:00
|
|
|
"Downloading boost/$library..."
|
2021-01-13 14:41:23 -08:00
|
|
|
& $curl -L "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" --output "$scriptsDir/downloads/$library-boost-$version.tar.gz"
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
2021-05-28 20:20:52 +02:00
|
|
|
$hash = & $vcpkg --x-wait-for-lock hash $archive
|
|
|
|
# remove prefix "Waiting to take filesystem lock on <path>/.vcpkg-root... "
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($hash -is [Object[]]) {
|
2021-05-28 20:20:52 +02:00
|
|
|
$hash = $hash[1]
|
|
|
|
}
|
2021-10-12 04:21:08 +03:00
|
|
|
|
2017-12-05 13:00:50 -08:00
|
|
|
$unpacked = "$scriptsDir/libs/$library-boost-$version"
|
2021-09-28 03:12:39 +03:00
|
|
|
if (!(Test-Path $unpacked)) {
|
2017-12-05 13:00:50 -08:00
|
|
|
"Unpacking boost/$library..."
|
2021-01-13 14:41:23 -08:00
|
|
|
New-Item -ItemType "Directory" $scriptsDir/libs -erroraction SilentlyContinue | out-null
|
2021-09-28 03:12:39 +03:00
|
|
|
Push-Location $scriptsDir/libs
|
|
|
|
try {
|
2017-12-05 13:00:50 -08:00
|
|
|
cmake -E tar xf $archive
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
finally {
|
|
|
|
Pop-Location
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
Push-Location $unpacked
|
|
|
|
try {
|
|
|
|
$usedLibraries = Get-ChildItem -Recurse -Path include, src -File `
|
|
|
|
| Where-Object { $_ -is [System.IO.FileInfo] } `
|
|
|
|
| ForEach-Object {
|
|
|
|
Write-Verbose "${library}: processing file: $_"
|
|
|
|
Get-Content -LiteralPath $_
|
|
|
|
} `
|
|
|
|
| Where-Object {
|
|
|
|
$_ -match ' *# *include *[<"]boost\/'
|
|
|
|
} `
|
|
|
|
| ForEach-Object {
|
|
|
|
# extract path from the line
|
|
|
|
Write-Verbose "${library}: processing line: $_"
|
|
|
|
$_ -replace " *# *include *[<`"]boost\/([a-zA-Z0-9\.\-_\/]*)[>`"].*", "`$1"
|
|
|
|
}`
|
|
|
|
| ForEach-Object {
|
|
|
|
# map the path to the library name
|
|
|
|
Write-Verbose "${library}: processing path: $_"
|
|
|
|
if ($_ -match "^detail\/winapi\/") { "winapi" }
|
|
|
|
elseif ($_ -eq "detail/algorithm.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "detail/atomic_count.hpp") { "smart_ptr" }
|
|
|
|
elseif ($_ -eq "detail/basic_pointerbuf.hpp") { "lexical_cast" }
|
|
|
|
elseif ($_ -eq "detail/call_traits.hpp") { "utility" }
|
|
|
|
elseif ($_ -eq "detail/compressed_pair.hpp") { "utility" }
|
|
|
|
elseif ($_ -eq "detail/interlocked.hpp") { "winapi" }
|
|
|
|
elseif ($_ -eq "detail/iterator.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "detail/lcast_precision.hpp") { "lexical_cast" }
|
|
|
|
elseif ($_ -eq "detail/lightweight_mutex.hpp") { "smart_ptr" }
|
|
|
|
elseif ($_ -eq "detail/lightweight_test.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "detail/lightweight_thread.hpp") { "smart_ptr" }
|
|
|
|
elseif ($_ -eq "detail/no_exceptions_support.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "detail/scoped_enum_emulation.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "detail/sp_typeinfo.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "detail/ob_compressed_pair.hpp") { "utility" }
|
|
|
|
elseif ($_ -eq "detail/quick_allocator.hpp") { "smart_ptr" }
|
|
|
|
elseif ($_ -eq "detail/workaround.hpp") { "config" }
|
|
|
|
elseif ($_ -match "^functional\/hash\/") { "container_hash" }
|
|
|
|
elseif ($_ -eq "functional/hash.hpp") { "container_hash" }
|
|
|
|
elseif ($_ -eq "functional/hash_fwd.hpp") { "container_hash" }
|
|
|
|
elseif ($_ -match "^graph\/distributed\/") { "graph_parallel" }
|
|
|
|
elseif ($_ -match "^graph\/parallel\/") { "graph_parallel" }
|
|
|
|
elseif ($_ -eq "graph/accounting.hpp") { "graph_parallel" }
|
|
|
|
elseif ($_ -eq "exception/exception.hpp") { "throw_exception" }
|
|
|
|
elseif ($_ -match "^numeric\/conversion\/") { "numeric_conversion" }
|
|
|
|
elseif ($_ -match "^numeric\/interval\/") { "interval" }
|
|
|
|
elseif ($_ -match "^numeric\/odeint\/") { "odeint" }
|
|
|
|
elseif ($_ -match "^numeric\/ublas\/") { "ublas" }
|
|
|
|
elseif ($_ -eq "numeric/interval.hpp") { "interval" }
|
|
|
|
elseif ($_ -eq "numeric/odeint.hpp") { "odeint" }
|
|
|
|
elseif ($_ -match "^parameter\/aux_\/python\/") { "parameter_python" }
|
|
|
|
elseif ($_ -eq "parameter/python.hpp") { "parameter_python" }
|
|
|
|
elseif ($_ -eq "pending/detail/disjoint_sets.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/detail/int_iterator.hpp") { "iterator" }
|
|
|
|
elseif ($_ -eq "pending/detail/property.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/bucket_sorter.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/container_traits.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/disjoint_sets.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/fenced_priority_queue.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/fibonacci_heap.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/indirect_cmp.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/integer_log2.hpp") { "integer" }
|
|
|
|
elseif ($_ -eq "pending/is_heap.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/iterator_adaptors.hpp") { "iterator" }
|
|
|
|
elseif ($_ -eq "pending/iterator_tests.hpp") { "iterator" }
|
|
|
|
elseif ($_ -eq "pending/mutable_heap.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/mutable_queue.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/property.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/property_serialize.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/queue.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/relaxed_heap.hpp") { "graph" }
|
|
|
|
elseif ($_ -eq "pending/stringtok.hpp") { "graph" }
|
|
|
|
elseif ($_ -match "^property_map\/parallel\/") { "property_map_parallel" }
|
|
|
|
elseif ($_ -eq "utility/addressof.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "utility/declval.hpp") { "type_traits" }
|
|
|
|
elseif ($_ -eq "utility/enable_if.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "utility/explicit_operator_bool.hpp") { "core" }
|
|
|
|
elseif ($_ -eq "utility/swap.hpp") { "core" }
|
|
|
|
# extract first directory name or file name from the path
|
|
|
|
else { $_ -replace "([a-zA-Z0-9\.\-_]*).*", "`$1" }
|
|
|
|
} `
|
|
|
|
| ForEach-Object {
|
|
|
|
# map directory/file name to the library name
|
|
|
|
Write-Verbose "${library}: processing name: $_"
|
|
|
|
if ($_ -eq "current_function.hpp") { "assert" }
|
|
|
|
elseif ($_ -eq "memory_order.hpp") { "atomic" }
|
|
|
|
elseif ($_ -match "is_placeholder.hpp|mem_fn.hpp") { "bind" }
|
|
|
|
elseif ($_ -eq "circular_buffer_fwd.hpp") { "circular_buffer" }
|
|
|
|
elseif ($_ -match "^concept$|concept_archetype.hpp") { "concept_check" }
|
|
|
|
elseif ($_ -match "cstdint.hpp|cxx11_char_types.hpp|limits.hpp|version.hpp") { "config" }
|
|
|
|
elseif ($_ -eq "contract_macro.hpp") { "contract" }
|
|
|
|
elseif ($_ -match "implicit_cast.hpp|polymorphic_cast.hpp|polymorphic_pointer_cast.hpp") { "conversion" }
|
|
|
|
elseif ($_ -eq "make_default.hpp") { "convert" }
|
|
|
|
elseif ($_ -match "checked_delete.hpp|get_pointer.hpp|iterator.hpp|non_type.hpp|noncopyable.hpp|ref.hpp|swap.hpp|type.hpp|visit_each.hpp") { "core" }
|
|
|
|
elseif ($_ -match "blank.hpp|blank_fwd.hpp|cstdlib.hpp") { "detail" }
|
|
|
|
elseif ($_ -eq "dynamic_bitset_fwd.hpp") { "dynamic_bitset" }
|
|
|
|
elseif ($_ -eq "exception_ptr.hpp") { "exception" }
|
|
|
|
elseif ($_ -eq "foreach_fwd.hpp") { "foreach" }
|
|
|
|
elseif ($_ -eq "function_equal.hpp") { "function" }
|
|
|
|
elseif ($_ -match "integer_fwd.hpp|integer_traits.hpp") { "integer" }
|
|
|
|
elseif ($_ -eq "io_fwd.hpp") { "io" }
|
|
|
|
elseif ($_ -match "function_output_iterator.hpp|generator_iterator.hpp|indirect_reference.hpp|iterator_adaptors.hpp|next_prior.hpp|pointee.hpp|shared_container_iterator.hpp") { "iterator" }
|
|
|
|
elseif ($_ -match "cstdfloat.hpp|math_fwd.hpp") { "math" }
|
|
|
|
elseif ($_ -match "multi_index_container.hpp|multi_index_container_fwd.hpp") { "multi_index" }
|
|
|
|
elseif ($_ -eq "cast.hpp") { "numeric_conversion" }
|
|
|
|
elseif ($_ -match "none.hpp|none_t.hpp") { "optional" }
|
|
|
|
elseif ($_ -eq "qvm_lite.hpp") { "qvm" }
|
|
|
|
elseif ($_ -eq "nondet_random.hpp") { "random" }
|
|
|
|
elseif ($_ -match "cregex.hpp|regex_fwd.hpp") { "regex" }
|
2017-12-05 13:00:50 -08:00
|
|
|
elseif ($_ -eq "archive") { "serialization" }
|
2022-01-10 22:47:12 +03:00
|
|
|
elseif ($_ -match "last_value.hpp|signal.hpp") { "signals" }
|
2021-09-28 03:12:39 +03:00
|
|
|
elseif ($_ -match "enable_shared_from_this.hpp|intrusive_ptr.hpp|make_shared.hpp|make_unique.hpp|pointer_cast.hpp|pointer_to_other.hpp|scoped_array.hpp|scoped_ptr.hpp|shared_array.hpp|shared_ptr.hpp|weak_ptr.hpp") { "smart_ptr" }
|
|
|
|
elseif ($_ -eq "cerrno.hpp") { "system" }
|
|
|
|
elseif ($_ -eq "progress.hpp") { "timer" }
|
|
|
|
elseif ($_ -match "token_functions.hpp|token_iterator.hpp") { "tokenizer" }
|
|
|
|
elseif ($_ -match "aligned_storage.hpp") { "type_traits" }
|
|
|
|
elseif ($_ -match "unordered_map.hpp|unordered_set.hpp") { "unordered" }
|
|
|
|
elseif ($_ -match "call_traits.hpp|compressed_pair.hpp|operators.hpp|operators_v1.hpp") { "utility" }
|
|
|
|
# by dafault use the name as is, just remove the file extension if available
|
|
|
|
else { $_ -replace "\.hp?p?", "" }
|
|
|
|
} `
|
|
|
|
| Where-Object {
|
[boost] update to 1.76.0 (#17335)
* [boost] update generator script for boost 1.76
* [boost] update ports to 1.76.0 (run generator)
* [boost] fix windows build?
* [quantlib] update and fix mac build
* [symengine] update and fix build
* [avro-cpp] update to latest master and fix windows build
* [folly] update to 2021.05.31.00
* [fbthrift, fizz, wangle] update to v2021.05.31.00 and fix build
* [proxygen] update to version 2021.05.31.00
* [fizz, proxygen, fbthrift] fix sodium target
* [proxygen] also works on macOS
* [quantlib] use fix from upstream to fix mac build
* [symengine] minimize patch file and fix deprecation warning
* [folly,proxygen,wangle,fizz,fbthrift] update to 2021.06.14.00
* [fbthrift] remove unnecessary dependency rsocket
I couldn't find any information that this dependency exists. The term is used in the code, but not in the context of a dependency
* [fizz,fbthrift] fix zlib dependency
* [fbthrift] pass required flex executable to cmake configure
* add version files
* [boost] generate-ports.ps1: Apply code review
* [boost] changes from new version of generate-ports script
* update version files
* [boost] generate-ports.ps1: Apply code review
2021-07-07 21:31:06 +02:00
|
|
|
$_ -ne $library
|
2021-09-28 03:12:39 +03:00
|
|
|
} `
|
|
|
|
| Group-Object -NoElement | ForEach-Object Name
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
" [known] " + $($usedLibraries | Where-Object { $foundLibraries -contains $_ })
|
|
|
|
" [unknown] " + $($usedLibraries | Where-Object { $foundLibraries -notcontains $_ })
|
2017-12-05 13:00:50 -08:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$deps = @($usedLibraries | Where-Object { $foundLibraries -contains $_ })
|
2021-10-12 06:28:23 +03:00
|
|
|
# break unnecessary dependencies
|
|
|
|
$deps = @($deps | ? {
|
|
|
|
-not (
|
2023-07-26 10:22:42 +09:00
|
|
|
($library -eq 'ublas' -and $_ -eq 'compute') -or # PR #29325
|
2021-10-12 06:28:23 +03:00
|
|
|
($library -eq 'gil' -and $_ -eq 'filesystem') # PR #20575
|
|
|
|
)
|
|
|
|
})
|
2021-09-28 03:12:39 +03:00
|
|
|
$deps = @($deps | ForEach-Object { GeneratePortDependency $_ })
|
2017-12-05 13:00:50 -08:00
|
|
|
$deps += @("boost-vcpkg-helpers")
|
|
|
|
|
|
|
|
$needsBuild = $false
|
2021-09-28 03:12:39 +03:00
|
|
|
if (((Test-Path $unpacked/build/Jamfile.v2) -or (Test-Path $unpacked/build/Jamfile)) -and $library -notmatch "function_types") {
|
2021-03-26 12:55:34 -07:00
|
|
|
$deps += @(
|
2021-09-28 03:12:39 +03:00
|
|
|
@{ name = "boost-build"; host = $True },
|
|
|
|
@{ name = "boost-modular-build-helper"; host = $True },
|
|
|
|
@{ name = "vcpkg-cmake"; host = $True }
|
2021-03-26 12:55:34 -07:00
|
|
|
)
|
2017-12-05 13:00:50 -08:00
|
|
|
$needsBuild = $true
|
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
GeneratePort `
|
|
|
|
-Library $library `
|
2017-12-05 13:00:50 -08:00
|
|
|
-Hash $hash `
|
2021-09-28 03:12:39 +03:00
|
|
|
-Dependencies $deps `
|
2017-12-05 13:00:50 -08:00
|
|
|
-NeedsBuild $needsBuild
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
$boostPortDependencies += @(GeneratePortDependency $library)
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
2021-09-28 03:12:39 +03:00
|
|
|
finally {
|
|
|
|
Pop-Location
|
2017-12-05 13:00:50 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
if ($updateServicePorts) {
|
|
|
|
# Generate manifest file for master boost port which depends on each individual library
|
|
|
|
GeneratePortManifest `
|
|
|
|
-PortName "boost" `
|
|
|
|
-Homepage "https://boost.org" `
|
|
|
|
-Description "Peer-reviewed portable C++ source libraries" `
|
2022-04-21 20:01:54 +03:00
|
|
|
-License "BSL-1.0" `
|
2021-10-12 04:21:08 +03:00
|
|
|
-Dependencies $boostPortDependencies
|
2019-01-31 10:04:17 +10:00
|
|
|
|
[boost] update to 1.76.0 (#17335)
* [boost] update generator script for boost 1.76
* [boost] update ports to 1.76.0 (run generator)
* [boost] fix windows build?
* [quantlib] update and fix mac build
* [symengine] update and fix build
* [avro-cpp] update to latest master and fix windows build
* [folly] update to 2021.05.31.00
* [fbthrift, fizz, wangle] update to v2021.05.31.00 and fix build
* [proxygen] update to version 2021.05.31.00
* [fizz, proxygen, fbthrift] fix sodium target
* [proxygen] also works on macOS
* [quantlib] use fix from upstream to fix mac build
* [symengine] minimize patch file and fix deprecation warning
* [folly,proxygen,wangle,fizz,fbthrift] update to 2021.06.14.00
* [fbthrift] remove unnecessary dependency rsocket
I couldn't find any information that this dependency exists. The term is used in the code, but not in the context of a dependency
* [fizz,fbthrift] fix zlib dependency
* [fbthrift] pass required flex executable to cmake configure
* add version files
* [boost] generate-ports.ps1: Apply code review
* [boost] changes from new version of generate-ports script
* update version files
* [boost] generate-ports.ps1: Apply code review
2021-07-07 21:31:06 +02:00
|
|
|
Set-Content -LiteralPath "$portsDir/boost/portfile.cmake" `
|
|
|
|
-Value "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" `
|
|
|
|
-Encoding UTF8 `
|
|
|
|
-NoNewline
|
2021-10-12 04:21:08 +03:00
|
|
|
|
2021-09-28 03:12:39 +03:00
|
|
|
# Generate manifest files for boost-uninstall
|
|
|
|
GeneratePortManifest `
|
|
|
|
-PortName "boost-uninstall" `
|
2022-04-21 20:01:54 +03:00
|
|
|
-Description "Internal vcpkg port used to uninstall Boost" `
|
|
|
|
-License "MIT"
|
2021-09-28 03:12:39 +03:00
|
|
|
|
|
|
|
# Generate manifest files for boost-vcpkg-helpers
|
|
|
|
GeneratePortManifest `
|
|
|
|
-PortName "boost-vcpkg-helpers" `
|
|
|
|
-Description "Internal vcpkg port used to modularize Boost" `
|
2022-04-21 20:01:54 +03:00
|
|
|
-License "MIT" `
|
2021-09-28 03:12:39 +03:00
|
|
|
-Dependencies @("boost-uninstall")
|
|
|
|
|
|
|
|
# Generate manifest files for boost-modular-build-helper
|
|
|
|
GeneratePortManifest `
|
|
|
|
-PortName "boost-modular-build-helper" `
|
|
|
|
-Description "Internal vcpkg port used to build Boost libraries" `
|
2022-04-21 20:01:54 +03:00
|
|
|
-License "MIT" `
|
2022-08-25 20:46:01 +03:00
|
|
|
-Dependencies @("boost-uninstall", @{ name = "vcpkg-cmake"; host = $True }, @{ name = "vcpkg-cmake-get-vars"; host = $True })
|
2021-09-28 03:12:39 +03:00
|
|
|
|
2022-01-10 22:47:12 +03:00
|
|
|
# Generate manifest files for boost-build
|
|
|
|
GeneratePortManifest `
|
|
|
|
-PortName "boost-build" `
|
|
|
|
-Homepage "https://github.com/boostorg/build" `
|
|
|
|
-Description "Boost.Build" `
|
2022-04-21 20:01:54 +03:00
|
|
|
-License "BSL-1.0" `
|
2022-01-10 22:47:12 +03:00
|
|
|
-Dependencies @("boost-uninstall")
|
|
|
|
|
|
|
|
# Update Boost version in CMake files
|
|
|
|
$files_with_boost_version = @(
|
|
|
|
"$portsDir/boost-build/portfile.cmake",
|
|
|
|
"$portsDir/boost-modular-build-helper/boost-modular-build.cmake",
|
2022-01-12 22:39:19 +03:00
|
|
|
"$portsDir/boost-vcpkg-helpers/portfile.cmake"
|
2022-01-10 22:47:12 +03:00
|
|
|
)
|
|
|
|
$files_with_boost_version | % {
|
|
|
|
$content = Get-Content -LiteralPath $_ `
|
|
|
|
-Encoding UTF8 `
|
|
|
|
-Raw
|
|
|
|
$content = $content -replace `
|
2022-08-25 20:46:01 +03:00
|
|
|
"set\(BOOST_VERSION [0-9\.a-zA-Z]+\)", `
|
2022-01-10 22:47:12 +03:00
|
|
|
"set(BOOST_VERSION $version)"
|
|
|
|
|
|
|
|
Set-Content -LiteralPath $_ `
|
|
|
|
-Value $content `
|
|
|
|
-Encoding UTF8 `
|
|
|
|
-NoNewline
|
|
|
|
}
|
2019-01-31 10:04:17 +10:00
|
|
|
}
|