aboutsummaryrefslogtreecommitdiff
path: root/scripts/boost
diff options
context:
space:
mode:
authorLong Nguyen <nguyen.long.908132@gmail.com>2020-11-26 02:26:33 +0700
committerGitHub <noreply@github.com>2020-11-25 11:26:33 -0800
commite2ff466f65a82dd31584468ddf67955092c79c11 (patch)
tree71f24ccffa8d99d36871930a4533d583992971e0 /scripts/boost
parent8d2332660cbfa23edd99abf2ea41ff6e2d7134b7 (diff)
downloadvcpkg-e2ff466f65a82dd31584468ddf67955092c79c11.tar.gz
vcpkg-e2ff466f65a82dd31584468ddf67955092c79c11.zip
[boost-locale] Replace VCPKG_TARGET_IS_WINDOWS in b2-options (#14502)
* [boost-locale] Use CMAKE_SYSTEM_NAME as a fallback where VCPKG_TARGET_IS_WINDOWS is not available * fix this issue in a different way * Remove comments in b2-options.cmake.in Co-authored-by: nicole mazzuca <mazzucan@outlook.com> * fix generate-ports.ps1 Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Diffstat (limited to 'scripts/boost')
-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)"