aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/boost/generate-ports.ps136
1 files changed, 31 insertions, 5 deletions
diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1
index d92ab8adf..29ab213da 100644
--- a/scripts/boost/generate-ports.ps1
+++ b/scripts/boost/generate-ports.ps1
@@ -5,15 +5,27 @@ param (
$portsDir = $null
)
+$ErrorActionPreference = 'Stop'
+
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
if ($null -eq $portsDir)
{
$portsDir = "$scriptsDir/../../ports"
}
+if ($IsWindows)
+{
+ $vcpkg = "$scriptsDir/../../vcpkg.exe"
+}
+else
+{
+ $vcpkg = "$scriptsDir/../../vcpkg"
+}
+
# Optionally clear this array when moving to a new boost version
$port_versions = @{
#e.g. "asio" = 1;
+ "locale" = 1;
}
$per_port_data = @{
@@ -82,7 +94,7 @@ function Generate()
mkdir "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null
$controlLines = @(
- "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1"
+ "# Automatically generated by scripts/boost/generate-ports.ps1"
"Source: boost-$PortName"
"Version: $version"
)
@@ -106,7 +118,7 @@ function Generate()
$controlLines | out-file -enc ascii "$portsDir/boost-$PortName/CONTROL"
$portfileLines = @(
- "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1"
+ "# Automatically generated by scripts/boost/generate-ports.ps1"
""
)
@@ -167,6 +179,20 @@ function Generate()
")"
)
}
+ elseif (Test-Path "$portsDir/boost-$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"'
+ ')'
+ )
+ }
else
{
$portfileLines += @(
@@ -249,9 +275,9 @@ foreach ($library in $libraries)
if (!(Test-Path $archive))
{
"Downloading boost/$library..."
- & @(vcpkg fetch aria2)[-1] "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz"
+ & @(& $vcpkg fetch aria2)[-1] "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz"
}
- $hash = vcpkg hash $archive
+ $hash = & $vcpkg hash $archive
$unpacked = "$scriptsDir/libs/$library-boost-$version"
if (!(Test-Path $unpacked))
{
@@ -408,7 +434,7 @@ if ($libraries_in_boost_port.length -gt 1) {
$boostDependsList = @($libraries_in_boost_port | % { "boost-$_" } | ? { $_ -notmatch "boost-mpi" }) -join ", "
@(
- "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1"
+ "# Automatically generated by scripts/boost/generate-ports.ps1"
"Source: boost"
"Version: $version"
"Port-Version: $($port_versions.boost)"