From b5bb1511f0a07be530e0bde3ae098eb3d8e83e68 Mon Sep 17 00:00:00 2001 From: ras0219 <533828+ras0219@users.noreply.github.com> Date: Fri, 26 Mar 2021 12:55:34 -0700 Subject: [many ports] Apply host dependencies (#16479) * [vcpkg] Add VCPKG_HOST_TRIPLET. Improve vcpkg.schema.json * [many ports] Apply host dependencies * [yasm-tool] Revert yasm-tool changes to split into PR #16478 * [many ports] Add versions * [vcpkg.cmake] Revert change applied in other PR * [boost-modular-build-helper] Merge from master Co-authored-by: Robert Schumacher --- scripts/azure-pipelines/test-modified-ports.ps1 | 4 +--- scripts/boost/generate-ports.ps1 | 19 ++++++++++++++++--- scripts/vcpkg.schema.json | 5 ++--- 3 files changed, 19 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/azure-pipelines/test-modified-ports.ps1 b/scripts/azure-pipelines/test-modified-ports.ps1 index 9ca814cca..fa80a1a10 100755 --- a/scripts/azure-pipelines/test-modified-ports.ps1 +++ b/scripts/azure-pipelines/test-modified-ports.ps1 @@ -138,9 +138,7 @@ $skipList = . "$PSScriptRoot/generate-skip-list.ps1" ` # WORKAROUND: the x86-windows flavors of these are needed for all cross-compilation, but they are not auto-installed. # Install them so the CI succeeds: -if ($Triplet -in @('x64-uwp', 'arm64-windows', 'arm-uwp')) { - .\vcpkg.exe install protobuf:x86-windows boost-build:x86-windows sqlite3:x86-windows yasm-tool:x86-windows ampl-mp:x86-windows @commonArgs -} elseif ($Triplet -in @('x64-windows', 'x64-windows-static', 'x64-windows-static-md')) { +if ($Triplet -in @('x64-uwp', 'arm64-windows', 'arm-uwp', 'x64-windows', 'x64-windows-static', 'x64-windows-static-md')) { .\vcpkg.exe install yasm-tool:x86-windows @commonArgs } diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 index f3620aa73..499a09dee 100644 --- a/scripts/boost/generate-ports.ps1 +++ b/scripts/boost/generate-ports.ps1 @@ -28,7 +28,9 @@ else $port_versions = @{ #e.g. "asio" = 1; "asio" = 1; - "python" = 1; + "python" = 2; + "context" = 2; + "concept-check" = 2; } $per_port_data = @{ @@ -112,6 +114,11 @@ function Generate() { $controlLines["port-version"] = $port_versions[$PortName] } + elseif ($NeedsBuild) + { + # This can be removed on next update; this is used to track the host dependencies change + $controlLines["port-version"] = 1 + } if ($per_port_data[$PortName]) { @@ -170,7 +177,10 @@ function Generate() if ($NeedsBuild) { $portfileLines += @( - "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" + "if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR)" + " message(FATAL_ERROR `"boost-$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 if (Test-Path "$portsDir/boost-$PortName/b2-options.cmake") @@ -397,7 +407,10 @@ foreach ($library in $libraries) $needsBuild = $false if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse" -and $library -ne "graph_parallel") { - $deps += @("boost-build", "boost-modular-build-helper") + $deps += @( + @{ name="boost-build"; host=$True }, + @{ name="boost-modular-build-helper"; host=$True } + ) $needsBuild = $true } diff --git a/scripts/vcpkg.schema.json b/scripts/vcpkg.schema.json index 215f5dd9c..14848f00c 100644 --- a/scripts/vcpkg.schema.json +++ b/scripts/vcpkg.schema.json @@ -279,11 +279,10 @@ } }, "features": { - "description": "An object of features supported by the package", + "description": "A map of features supported by the package", "type": "object", "patternProperties": { - "^\\$": {}, - "^[a-z-]+": { + "": { "$ref": "#/definitions/feature" } } -- cgit v1.2.3