vcpkg/scripts/boost/generate-ports.ps1

523 lines
21 KiB
PowerShell
Raw Normal View History

2017-12-05 13:00:50 -08:00
[CmdletBinding()]
param (
$libraries = @(),
2021-09-28 03:12:39 +03:00
$version = "1.77.0",
$portsDir = $null
2017-12-05 13:00:50 -08: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) {
$portsDir = "$scriptsDir/../../ports"
}
2017-12-05 13:00:50 -08:00
2021-09-28 03:12:39 +03:00
if ($IsWindows) {
$vcpkg = "$scriptsDir/../../vcpkg.exe"
$curl = "curl.exe"
}
2021-09-28 03:12:39 +03:00
else {
$vcpkg = "$scriptsDir/../../vcpkg"
$curl = "curl"
}
# Clear this array when moving to a new boost version
2021-09-28 03:12:39 +03:00
$portVersions = @{
#e.g. "boost-asio" = 1;
}
2021-09-28 03:12:39 +03:00
$portData = @{
"boost-asio" = @{
"dependencies" = @("openssl");
"supports" = "!emscripten"
};
"boost-beast" = @{ "supports" = "!emscripten" };
"boost-fiber" = @{ "supports" = "!osx&!uwp&!arm&!emscripten" };
"boost-filesystem" = @{ "supports" = "!uwp" };
"boost-iostreams" = @{
"dependencies" = @("zlib", "bzip2", "liblzma", "zstd");
"supports" = "!uwp";
};
"boost-context" = @{ "supports" = "!uwp&!emscripten" };
"boost-stacktrace" = @{ "supports" = "!uwp" };
"boost-coroutine" = @{ "supports" = "!arm&!uwp&!emscripten" };
"boost-coroutine2" = @{ "supports" = "!emscripten" };
"boost-test" = @{ "supports" = "!uwp" };
"boost-wave" = @{ "supports" = "!uwp" };
"boost-log" = @{ "supports" = "!uwp&!emscripten" };
"boost-locale" = @{
"dependencies" = @(@{ name = "libiconv"; platform = "!uwp&!windows&!mingw" });
"supports" = "!uwp";
"features" = @{
icu = @{
dependencies = @("icu")
description = "ICU backend for Boost.Locale"
}
}
};
2021-09-28 03:12:39 +03:00
"boost-mpi" = @{
"dependencies" = @("mpi");
"supports" = "!uwp";
};
"boost-graph-parallel" = @{
"dependencies" = @("mpi");
"supports" = "!uwp";
};
"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"
}
}
};
2021-09-28 03:12:39 +03:00
"boost-regex" = @{
"features" = @{
2021-09-28 03:12:39 +03:00
icu = @{
dependencies = @("icu")
description = "ICU backend for Boost.Regex"
}
}
}
}
2021-09-28 03:12:39 +03:00
function GeneratePortName() {
param (
2021-09-28 03:12:39 +03:00
[string]$Library
)
2021-09-28 03:12:39 +03:00
"boost-" + ($Library -replace "_", "-")
}
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'] }
}
2021-09-28 03:12:39 +03:00
else {
$portName
}
}
2021-09-28 03:12:39 +03:00
function GeneratePortManifest() {
2017-12-05 13:00:50 -08:00
param (
2021-09-28 03:12:39 +03:00
[string]$Library,
[string]$PortName,
2021-09-28 03:12:39 +03:00
[string]$Homepage,
[string]$Description,
$Dependencies = @(),
$Features = @()
)
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]
}
if ($portData.Contains($PortName)) {
$manifest += $portData[$PortName]
}
if ($Dependencies.Count -gt 0) {
$manifest["dependencies"] += $Dependencies
}
if ($Features.Count -gt 0) {
$manifest["features"] += $Features
}
$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-09-28 03:12:39 +03:00
New-Item -ItemType "Directory" "$portsDir/$portName" -erroraction SilentlyContinue | out-null
# Generate vcpkg.json
GeneratePortManifest `
-Library $Library `
-PortName $PortName `
-Homepage "https://github.com/boostorg/$Library" `
-Description "Boost $Library module" `
-Dependencies $Dependencies
2017-12-05 13:00:50 -08:00
$portfileLines = @(
"# Automatically generated by scripts/boost/generate-ports.ps1"
2017-12-05 13:00:50 -08:00
""
)
2021-09-28 03:12:39 +03:00
if ($Library -eq "system") {
$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"
)
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) {
}
2021-09-28 03:12:39 +03:00
elseif ($patches.Count -eq 1) {
$portfileLines += @(" PATCHES $($patches.name)")
}
2021-09-28 03:12:39 +03:00
else {
$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)")
}
}
$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") {
$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) {
$portfileLines += @(
"if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR)"
2021-09-28 03:12:39 +03:00
" message(FATAL_ERROR `"$portName requires a newer version of vcpkg in order to build.`")"
"endif()"
"include(`${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)"
)
# 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 += @(
"boost_modular_build("
" SOURCE_PATH `${SOURCE_PATH}"
" BOOST_CMAKE_FRAGMENT `"`${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake`""
")"
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") {
$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})"
)
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") {
$portfileLines += @(get-content "$scriptsDir/post-build-stubs/$Library.cmake")
}
2017-12-05 13:00:50 -08:00
$portfileLines += @("")
2021-09-28 03:12:39 +03:00
Set-Content -LiteralPath "$portsDir/$portName/portfile.cmake" `
-Value "$($portfileLines -join "`r`n")" `
-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") {
}
2021-09-28 03:12:39 +03:00
else {
2017-12-05 13:00:50 -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..."
& $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
}
$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[]]) {
$hash = $hash[1]
}
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..."
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" }
2021-09-28 03:12:39 +03:00
elseif ($_ -match "^signals$|last_value.hpp|signal.hpp|signals.hpp") { "signals" }
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 {
$_ -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 $_ })
$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") {
$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 }
)
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
# 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
Set-Content -LiteralPath "$portsDir/boost/portfile.cmake" `
-Value "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" `
-Encoding UTF8 `
-NoNewline
2021-09-28 03:12:39 +03:00
# Generate manifest files for boost-uninstall
GeneratePortManifest `
-PortName "boost-uninstall" `
-Description "Internal vcpkg port used to uninstall Boost"
# Generate manifest files for boost-vcpkg-helpers
GeneratePortManifest `
-PortName "boost-vcpkg-helpers" `
-Description "Internal vcpkg port used to modularize Boost" `
-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" `
-Dependencies @("boost-uninstall")
}