aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBilly Robert O'Neal III <bion@microsoft.com>2020-08-28 16:31:27 -0700
committerBilly Robert O'Neal III <bion@microsoft.com>2020-08-28 16:31:27 -0700
commitc828f3634723996e6031fb2e3c3d1ac3f4de0cad (patch)
treeb3fe00a043d5b9351868a0d1f8aead41bb52d2be /scripts
parent6635a2fa596ca457565eebc2a45664309cd24d77 (diff)
parentf3f329a048eaff759c1992c458f2e12351486bc7 (diff)
downloadvcpkg-c828f3634723996e6031fb2e3c3d1ac3f4de0cad.tar.gz
vcpkg-c828f3634723996e6031fb2e3c3d1ac3f4de0cad.zip
Merge remote-tracking branch 'origin/master' into HEADupdate-geos-381
Diffstat (limited to 'scripts')
-rw-r--r--scripts/azure-pipelines/azure-pipelines.yml6
-rw-r--r--scripts/azure-pipelines/linux/azure-pipelines.yml12
-rwxr-xr-xscripts/azure-pipelines/linux/create-vmss.ps14
-rwxr-xr-xscripts/azure-pipelines/linux/provision-image.sh5
-rw-r--r--scripts/azure-pipelines/osx/azure-pipelines.yml14
-rw-r--r--scripts/azure-pipelines/windows/Check-CxxFormatting.ps110
-rw-r--r--scripts/azure-pipelines/windows/Check-ManifestFormatting.ps12
-rw-r--r--scripts/azure-pipelines/windows/azure-pipelines.yml17
-rw-r--r--scripts/azure-pipelines/windows/create-vmss.ps18
-rw-r--r--scripts/azure-pipelines/windows/provision-image.txt83
-rw-r--r--scripts/azure-pipelines/windows/sysprep.ps12
-rw-r--r--scripts/buildsystems/vcpkg.cmake8
-rw-r--r--scripts/ci.baseline.txt48
-rw-r--r--scripts/cmake/vcpkg_acquire_msys.cmake34
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake4
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake3
-rw-r--r--scripts/cmake/vcpkg_escape_regex_control_characters.cmake4
-rw-r--r--scripts/cmake/vcpkg_execute_required_process.cmake15
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake174
-rw-r--r--scripts/cmake/vcpkg_fixup_pkgconfig.cmake16
-rw-r--r--scripts/cmake/vcpkg_from_sourceforge.cmake46
-rw-r--r--scripts/test_ports/vcpkg-find-acquire-program/CONTROL4
-rw-r--r--scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake21
23 files changed, 320 insertions, 220 deletions
diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml
index cda29f7e6..01810eb0f 100644
--- a/scripts/azure-pipelines/azure-pipelines.yml
+++ b/scripts/azure-pipelines/azure-pipelines.yml
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: MIT
#
variables:
- windows-pool: 'PrWin-2020-06-30'
- linux-pool: 'PrLin-2020-06-30'
+ windows-pool: 'PrWin-2020-08-12'
+ linux-pool: 'PrLin-2020-08-12'
stages:
- stage: check_cxx_formatting
@@ -19,6 +19,7 @@ stages:
inputs:
filePath: 'scripts/azure-pipelines/windows/Check-CxxFormatting.ps1'
arguments: '-Root .'
+ pwsh: true
- stage: check_manifest_formatting
displayName: Check the formatting of port manifests
pool: $(windows-pool)
@@ -36,6 +37,7 @@ stages:
inputs:
filePath: 'scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1'
arguments: '-Root .'
+ pwsh: true
- stage: run_port_ci
displayName: 'Run the Port CI'
dependsOn:
diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml
index 969348980..054197504 100644
--- a/scripts/azure-pipelines/linux/azure-pipelines.yml
+++ b/scripts/azure-pipelines/linux/azure-pipelines.yml
@@ -33,7 +33,7 @@ jobs:
displayName: 'Build vcpkg'
inputs:
filePath: bootstrap-vcpkg.sh
- arguments: "-buildTests"
+ arguments: '-buildTests'
- bash: toolsrc/build.rel/vcpkg-test
displayName: 'Run vcpkg tests'
- task: PowerShell@2
@@ -47,20 +47,18 @@ jobs:
displayName: 'Report on Disk Space After Build'
condition: always()
- task: PublishBuildArtifacts@1
- displayName: 'Publish Artifact: x86-linux Build Failure Logs'
+ displayName: 'Publish Artifact: failure logs for x64-linux'
inputs:
PathtoPublish: '$(System.ArtifactsDirectory)/failure-logs'
- ArtifactName: 'x64-linux port build failure logs'
+ ArtifactName: 'failure logs for x64-linux'
condition: failed()
- bash: |
python3 scripts/file_script.py /mnt/vcpkg-ci/installed/vcpkg/info/
displayName: 'Build a file list for all packages'
condition: always()
-
- task: PublishBuildArtifacts@1
- displayName: 'Upload file lists for all packages'
+ displayName: 'Publish Artifact: file lists for x64-linux'
condition: always()
-
inputs:
PathtoPublish: scripts/list_files
- ArtifactName: "x64-linux package file lists"
+ ArtifactName: 'file lists for x64-linux'
diff --git a/scripts/azure-pipelines/linux/create-vmss.ps1 b/scripts/azure-pipelines/linux/create-vmss.ps1
index 84c83dfea..169a80fc9 100755
--- a/scripts/azure-pipelines/linux/create-vmss.ps1
+++ b/scripts/azure-pipelines/linux/create-vmss.ps1
@@ -220,7 +220,7 @@ Write-Progress `
-Status 'Running provisioning script provision-image.sh in VM' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
-Invoke-AzVMRunCommand `
+$ProvisionImageResult = Invoke-AzVMRunCommand `
-ResourceGroupName $ResourceGroupName `
-VMName $ProtoVMName `
-CommandId 'RunShellScript' `
@@ -228,6 +228,8 @@ Invoke-AzVMRunCommand `
-Parameter @{StorageAccountName=$StorageAccountName; `
StorageAccountKey=$StorageAccountKey;}
+Write-Host "provision-image.sh output: $($ProvisionImageResult.value.Message)"
+
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
diff --git a/scripts/azure-pipelines/linux/provision-image.sh b/scripts/azure-pipelines/linux/provision-image.sh
index 5a59161e6..4936cf719 100755
--- a/scripts/azure-pipelines/linux/provision-image.sh
+++ b/scripts/azure-pipelines/linux/provision-image.sh
@@ -27,7 +27,10 @@ APT_PACKAGES="$APT_PACKAGES libxkbcommon-dev libxcb-keysyms1-dev \
APT_PACKAGES="$APT_PACKAGES libkrb5-dev"
# Additionally required by mesa
-APT_PACKAGES="$APT_PACKAGES python3-setuptools"
+APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-mako"
+
+# Additionally required by some packages to install additional python packages
+APT_PACKAGES="$APT_PACKAGES python3-pip"
# Additionally required/installed by Azure DevOps Scale Set Agents
APT_PACKAGES="$APT_PACKAGES liblttng-ust0 libkrb5-3 zlib1g libicu60"
diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml
index 6e48238a7..0856aada7 100644
--- a/scripts/azure-pipelines/osx/azure-pipelines.yml
+++ b/scripts/azure-pipelines/osx/azure-pipelines.yml
@@ -17,10 +17,8 @@ jobs:
value: /Users/vagrant/Data/downloads
steps:
- - bash: |
- df -h
+ - bash: df -h
displayName: 'Report on Disk Space'
- condition: always()
- bash: |
brew list autoconf || brew install autoconf
brew list automake || brew install automake
@@ -59,20 +57,18 @@ jobs:
displayName: 'Report on Disk Space After Build'
condition: always()
- task: PublishBuildArtifacts@1
- displayName: 'Publish Artifact: x64-osx port build failure logs'
+ displayName: 'Publish Artifact: failure logs for x64-osx'
inputs:
PathtoPublish: '$(System.ArtifactsDirectory)/failure-logs'
- ArtifactName: 'x64-osx port build failure logs'
+ ArtifactName: 'failure logs for x64-osx'
condition: failed()
- bash: |
python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/
displayName: 'Build a file list for all packages'
condition: always()
-
- task: PublishBuildArtifacts@1
- displayName: 'Upload file lists for all packages'
+ displayName: 'Publish Artifact: file lists for x64-osx'
condition: always()
-
inputs:
PathtoPublish: scripts/list_files
- ArtifactName: "x64-osx package file lists"
+ ArtifactName: 'file lists for x64-osx'
diff --git a/scripts/azure-pipelines/windows/Check-CxxFormatting.ps1 b/scripts/azure-pipelines/windows/Check-CxxFormatting.ps1
index 2adeeae45..eaa9e692b 100644
--- a/scripts/azure-pipelines/windows/Check-CxxFormatting.ps1
+++ b/scripts/azure-pipelines/windows/Check-CxxFormatting.ps1
@@ -9,8 +9,12 @@ Param(
$clangFormat = 'C:\Program Files\LLVM\bin\clang-format.exe'
if (-not (Test-Path $clangFormat))
{
- Write-Error "clang-format not found; is it installed in the CI machines?"
- throw
+ $clangFormat = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin\clang-format.exe'
+ if (-not (Test-Path $clangFormat))
+ {
+ Write-Error 'clang-format not found; is it installed in the CI machines?'
+ throw
+ }
}
$toolsrc = Get-Item "$Root/toolsrc"
@@ -32,7 +36,7 @@ try
$msg = @(
"",
"The formatting of the C++ files didn't match our expectation.",
- "See https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#vcpkg-internal-code for solution."
+ "See github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#vcpkg-internal-code for solution."
)
$msg += "File list:"
$msg += " $changedFiles"
diff --git a/scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1 b/scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1
index 6e97ba35c..e4c59582d 100644
--- a/scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1
+++ b/scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1
@@ -37,7 +37,7 @@ if (-not $IgnoreErrors -and $null -ne $changedFiles)
$msg = @(
"",
"The formatting of the manifest files didn't match our expectation.",
- "See https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#manifest for solution."
+ "See github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#manifest for solution."
)
$msg += ""
diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml
index 340138e12..bb8c7435c 100644
--- a/scripts/azure-pipelines/windows/azure-pipelines.yml
+++ b/scripts/azure-pipelines/windows/azure-pipelines.yml
@@ -20,11 +20,13 @@ jobs:
displayName: 'Initialize Environment'
inputs:
filePath: 'scripts/azure-pipelines/windows/initialize-environment.ps1'
+ pwsh: true
- task: PowerShell@2
displayName: 'Report on Disk Space'
condition: always()
inputs:
filePath: 'scripts/azure-pipelines/windows/disk-space.ps1'
+ pwsh: true
# Note: D: is the Azure machines' temporary disk.
- script: .\bootstrap-vcpkg.bat
displayName: 'Build vcpkg'
@@ -49,35 +51,38 @@ jobs:
inputs:
filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1'
arguments: '-Triplet ${{ parameters.triplet }} -WorkingRoot ${{ variables.WORKING_ROOT }}'
+ pwsh: true
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
inputs:
failOnStderr: true
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -ArchivesRoot W:\ -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactsDirectory $(System.ArtifactsDirectory)'
+ pwsh: true
- task: PowerShell@2
displayName: 'Report on Disk Space After Build'
condition: always()
inputs:
filePath: 'scripts/azure-pipelines/windows/disk-space.ps1'
+ pwsh: true
- task: PublishBuildArtifacts@1
- displayName: 'Publish Artifact: ${{ parameters.triplet }} port build failure logs'
+ displayName: 'Publish Artifact: failure logs for ${{ parameters.triplet }}'
inputs:
PathtoPublish: '$(System.ArtifactsDirectory)\failure-logs'
- ArtifactName: '${{ parameters.triplet }} port build failure logs'
+ ArtifactName: 'failure logs for ${{ parameters.triplet }}'
condition: failed()
- task: PowerShell@2
- displayName: "Generating all packages files"
+ displayName: 'Build a file list for all packages'
condition: always()
-
inputs:
targetType: inline
script: |
./vcpkg.exe fetch python3
& $(.\vcpkg fetch python3) .\scripts\file_script.py D:\installed\vcpkg\info\
+ pwsh: true
- task: PublishBuildArtifacts@1
- displayName: 'Upload file lists for all packages'
+ displayName: 'Publish Artifact: file lists for ${{ parameters.triplet }}'
condition: always()
inputs:
PathtoPublish: scripts/list_files
- ArtifactName: "${{ parameters.triplet }} package file lists"
+ ArtifactName: 'file lists for ${{ parameters.triplet }}'
diff --git a/scripts/azure-pipelines/windows/create-vmss.ps1 b/scripts/azure-pipelines/windows/create-vmss.ps1
index b1aa5d0ce..3bb89ee25 100644
--- a/scripts/azure-pipelines/windows/create-vmss.ps1
+++ b/scripts/azure-pipelines/windows/create-vmss.ps1
@@ -198,7 +198,7 @@ Write-Progress `
-Status 'Running provisioning script provision-image.txt (as a .ps1) in VM' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
-Invoke-AzVMRunCommand `
+$ProvisionImageResult = Invoke-AzVMRunCommand `
-ResourceGroupName $ResourceGroupName `
-VMName $ProtoVMName `
-CommandId 'RunPowerShellScript' `
@@ -207,6 +207,8 @@ Invoke-AzVMRunCommand `
StorageAccountName=$StorageAccountName; `
StorageAccountKey=$StorageAccountKey;}
+Write-Host "provision-image.ps1 output: $($ProvisionImageResult.value.Message)"
+
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
@@ -221,12 +223,14 @@ Write-Progress `
-Status 'Running provisioning script sysprep.ps1 in VM' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
-Invoke-AzVMRunCommand `
+$SysprepResult = Invoke-AzVMRunCommand `
-ResourceGroupName $ResourceGroupName `
-VMName $ProtoVMName `
-CommandId 'RunPowerShellScript' `
-ScriptPath "$PSScriptRoot\sysprep.ps1"
+Write-Host "sysprep.ps1 output: $($SysprepResult.value.Message)"
+
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
diff --git a/scripts/azure-pipelines/windows/provision-image.txt b/scripts/azure-pipelines/windows/provision-image.txt
index 798b96e9a..b43b1bf87 100644
--- a/scripts/azure-pipelines/windows/provision-image.txt
+++ b/scripts/azure-pipelines/windows/provision-image.txt
@@ -7,7 +7,7 @@ Sets up a machine to be an image for a scale set.
.DESCRIPTION
provision-image.ps1 runs on an existing, freshly provisioned virtual machine,
-and sets that virtual machine up as a vcpkg build machine. After this is done,
+and sets up that virtual machine as a build machine. After this is done,
(outside of this script), we take that machine and make it an image to be copied
for setting up new VMs in the scale set.
@@ -60,10 +60,14 @@ Function Get-TempFilePath {
return Join-Path $tempPath $tempName
}
-if (-not [string]::IsNullOrEmpty($AdminUserPassword)) {
- Write-Host "AdminUser password supplied; switching to AdminUser"
+$TranscriptPath = 'C:\provision-image-transcript.txt'
+
+if ([string]::IsNullOrEmpty($AdminUserPassword)) {
+ Start-Transcript -Path $TranscriptPath
+} else {
+ Write-Host 'AdminUser password supplied; switching to AdminUser.'
$PsExecPath = Get-TempFilePath -Extension 'exe'
- Write-Host "Downloading psexec to $PsExecPath"
+ Write-Host "Downloading psexec to: $PsExecPath"
& curl.exe -L -o $PsExecPath -s -S https://live.sysinternals.com/PsExec64.exe
$PsExecArgs = @(
'-u',
@@ -89,8 +93,11 @@ if (-not [string]::IsNullOrEmpty($AdminUserPassword)) {
$PsExecArgs += $StorageAccountKey
}
- Write-Host "Executing $PsExecPath " + @PsExecArgs
- & $PsExecPath @PsExecArgs > C:\ProvisionLog.txt
+ Write-Host "Executing: $PsExecPath $PsExecArgs"
+
+ $proc = Start-Process -FilePath $PsExecPath -ArgumentList $PsExecArgs -Wait -PassThru
+ Write-Host 'Reading transcript...'
+ Get-Content -Path $TranscriptPath
Write-Host 'Cleaning up...'
Remove-Item $PsExecPath
exit $proc.ExitCode
@@ -118,7 +125,6 @@ $WindowsSDKUrl = 'https://download.microsoft.com/download/1/c/3/1c3d5161-d9e9-4e
$WindowsWDKUrl = 'https://download.microsoft.com/download/1/a/7/1a730121-7aa7-46f7-8978-7db729aa413d/wdk/wdksetup.exe'
$MpiUrl = 'https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe'
-$LlvmUrl = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe'
$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe'
$CudaFeatures = 'nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 ' + `
@@ -127,7 +133,7 @@ $CudaFeatures = 'nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_ad
'cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1 ' + `
'occupancy_calculator_10.1 fortran_examples_10.1'
-$BinSkimUrl = 'https://www.nuget.org/api/v2/package/Microsoft.CodeAnalysis.BinSkim/1.6.0'
+$PwshUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi'
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
@@ -191,7 +197,7 @@ Function InstallVisualStudio {
Write-Host 'Downloading Visual Studio...'
[string]$bootstrapperExe = Get-TempFilePath -Extension 'exe'
curl.exe -L -o $bootstrapperExe -s -S $BootstrapperUrl
- Write-Host "Installing Visual Studio..."
+ Write-Host 'Installing Visual Studio...'
$args = @('/c', $bootstrapperExe, '--quiet', '--norestart', '--wait', '--nocache')
foreach ($workload in $Workloads) {
$args += '--add'
@@ -364,59 +370,6 @@ Function InstallWindowsWDK {
<#
.SYNOPSIS
-Installs LLVM.
-
-.DESCRIPTION
-InstallLLVM installs LLVM from the supplied URL.
-
-.PARAMETER Url
-The URL of the LLVM installer.
-#>
-Function InstallLLVM {
- Param(
- [String]$Url
- )
-
- try {
- Write-Host 'Downloading LLVM...'
- [string]$installerPath = Get-TempFilePath -Extension 'exe'
- curl.exe -L -o $installerPath -s -S $Url
- Write-Host 'Installing LLVM...'
- $proc = Start-Process -FilePath $installerPath -ArgumentList @('/S') -NoNewWindow -Wait -PassThru
- PrintMsiExitCodeMessage $proc.ExitCode
- }
- catch {
- Write-Error "Failed to install LLVM! $($_.Exception.Message)"
- throw
- }
-}
-
-<#
-.SYNOPSIS
-Installs LLVM.
-
-.DESCRIPTION
-InstallLLVM installs LLVM from the supplied URL.
-
-.PARAMETER Url
-The URL of the LLVM installer.
-#>
-Function InstallLLVM {
- try {
- Write-Host 'Downloading LLVM...'
- [string]$installerPath = Get-TempFilePath -Extension 'exe'
- curl.exe -L -o $installerPath -s -S $Url
- Write-Host 'Installing LLVM...'
- $proc = Start-Process -FilePath $installerPath -ArgumentList @('/S') -NoNewWindow -Wait -PassThru
- PrintMsiExitCodeMessage $proc.ExitCode
- }
- catch {
- Write-Error "Failed to install LLVM! $($_.Exception.Message)"
- }
-}
-
-<#
-.SYNOPSIS
Installs MPI
.DESCRIPTION
@@ -458,7 +411,7 @@ Installs NVIDIA's CUDA Toolkit.
.DESCRIPTION
InstallCuda installs the CUDA Toolkit with the features specified as a
-space separated list of strings in $Features.
+space-separated list of strings in $Features.
.PARAMETER Url
The URL of the CUDA installer.
@@ -504,6 +457,7 @@ if ($null -eq $av) {
Write-Host 'AntiVirus not installed, skipping exclusions.'
} else {
Write-Host 'Configuring AntiVirus exclusions...'
+ Add-MpPreference -ExclusionPath C:\agent
Add-MPPreference -ExclusionPath D:\
Add-MPPreference -ExclusionProcess ninja.exe
Add-MPPreference -ExclusionProcess clang-cl.exe
@@ -515,10 +469,9 @@ if ($null -eq $av) {
InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl -Nickname 'Stable'
InstallWindowsSDK -Url $WindowsSDKUrl
InstallWindowsWDK -Url $WindowsWDKUrl
-InstallLLVM -Url $LlvmUrl
InstallMpi -Url $MpiUrl
InstallCuda -Url $CudaUrl -Features $CudaFeatures
-InstallZip -Url $BinSkimUrl -Name 'BinSkim' -Dir 'C:\BinSkim'
+InstallMSI -Url $PwshUrl -Name 'PowerShell Core'
if ([string]::IsNullOrWhiteSpace($StorageAccountName)) {
Write-Host 'No storage account name configured.'
} else {
diff --git a/scripts/azure-pipelines/windows/sysprep.ps1 b/scripts/azure-pipelines/windows/sysprep.ps1
index c0965350d..a29950044 100644
--- a/scripts/azure-pipelines/windows/sysprep.ps1
+++ b/scripts/azure-pipelines/windows/sysprep.ps1
@@ -14,4 +14,4 @@ for more information.
$ErrorActionPreference = 'Stop'
Write-Host 'Running sysprep'
-& C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /shutdown
+& C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /shutdown
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 7eb6d474a..753c0523c 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -23,7 +23,13 @@ function(_vcpkg_get_directory_name_of_file_above OUT DIRECTORY FILENAME)
set(${OUT} ${_vcpkg_get_dir_out} CACHE INTERNAL "_vcpkg_get_directory_name_of_file_above: ${OUT}")
endfunction()
-_vcpkg_get_directory_name_of_file_above(_VCPKG_MANIFEST_DIR ${CMAKE_CURRENT_SOURCE_DIR} "vcpkg.json")
+if(NOT DEFINED VCPKG_MANIFEST_DIR)
+ if(EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json")
+ set(_VCPKG_MANIFEST_DIR "${CMAKE_SOURCE_DIR}")
+ endif()
+else()
+ set(_VCPKG_MANIFEST_DIR ${VCPKG_MANIFEST_DIR})
+endif()
if(NOT DEFINED VCPKG_MANIFEST_MODE)
if(_VCPKG_MANIFEST_DIR)
set(VCPKG_MANIFEST_MODE ON)
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index e5292ed5c..b8a17988f 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -143,8 +143,6 @@ bond:x64-uwp=fail
botan:arm64-windows=fail
botan:arm-uwp=fail
botan:x64-uwp=fail
-box2d:x64-uwp=fail
-box2d:arm-uwp=fail
breakpad:arm64-windows=fail
bullet3:arm64-windows=fail
bullet3:arm-uwp=fail
@@ -155,6 +153,11 @@ caf:x64-uwp=fail
caffe2:x86-windows=fail
caffe2:arm64-windows=fail
cairomm:x64-linux=fail
+# capnproto currently triggers an ICE
+capnproto:x86-windows=fail
+capnproto:x64-windows=fail
+capnproto:x64-windows-static=fail
+# capnproto doesn't support arm, arm64, or UWP
capnproto:arm64-windows=fail
capnproto:arm-uwp=fail
capnproto:x64-uwp=fail
@@ -208,8 +211,9 @@ chmlib:x64-uwp=fail
civetweb:arm64-windows = skip
civetweb:arm-uwp = skip
civetweb:x64-uwp = skip
-# clapack is replaced by lapack-reference.
+# clapack is replaced by lapack-reference.
clapack:x64-linux = skip
+clapack:x64-osx = skip
clapack:x64-windows = skip
clapack:x64-windows-static = skip
clapack:x86-windows = skip
@@ -270,8 +274,6 @@ crashpad:x86-windows=fail
crfsuite:arm-uwp=fail
crfsuite:x64-uwp=fail
crossguid:x64-osx=fail
-cspice:arm-uwp=fail
-cspice:x64-uwp=fail
ctemplate:arm64-windows=fail
ctemplate:arm-uwp=fail
ctemplate:x64-linux=fail
@@ -424,6 +426,16 @@ flint:x64-osx=fail
fltk:arm-uwp=fail
fltk:x64-uwp=fail
fluidsynth:x64-osx=fail
+# fluidlite conflicts with fluidsynth; we test fluidsynth rather than fluidlite because
+# fluidlite has no dependencies and thus is less likely to be broken by another package.
+fluidlite:arm-uwp=skip
+fluidlite:arm64-windows=skip
+fluidlite:x64-linux=skip
+fluidlite:x64-osx=skip
+fluidlite:x64-uwp=skip
+fluidlite:x64-windows-static=skip
+fluidlite:x64-windows=skip
+fluidlite:x86-windows=skip
fmem:arm-uwp=fail
fmem:x64-uwp=fail
fmi4cpp:arm-uwp=fail
@@ -508,6 +520,8 @@ gmmlib:x64-uwp=fail
gmmlib:x64-windows=fail
gmmlib:x64-windows-static=fail
gmmlib:x86-windows=fail
+# VS 2019 16.7 broke gmp UWP https://github.com/microsoft/vcpkg/issues/13172
+gmp:x64-uwp=fail
google-cloud-cpp:arm64-windows=fail
google-cloud-cpp:arm-uwp=fail
google-cloud-cpp:x64-uwp=fail
@@ -1172,6 +1186,17 @@ ogre-next:x86-windows = skip
ois:arm64-windows=fail
ois:arm-uwp=fail
ois:x64-uwp=fail
+# ompl is vulnerable to some form of race in its dependent ports, and adding 'ode' as a dependency
+# does not resolve the issue
+# src/ompl/CMakeFiles/ompl.dir/extensions/ode/src/OpenDEStateValidityChecker.cpp.o
+# -L/mnt/vcpkg-ci/packages/flann_x64-linux/debug/lib -L/mnt/vcpkg-ci/packages/ode_x64-linux/debug/lib
+# -Wl,-rpath,/mnt/vcpkg-ci/packages/flann_x64-linux/debug/lib:/mnt/vcpkg-ci/packages/ode_x64-linux/debug/lib::::::::::::::::::::::::::::::::::::::::::::::::
+# -lode /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_serialization.a
+# /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_filesystem.a
+# /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_system.a -lpthread && :
+# /usr/bin/ld: cannot find -lode
+ompl:x64-osx=fail
+ompl:x64-linux=fail
open62541:arm-uwp=fail
open62541:x64-uwp=fail
openal-soft:arm-uwp=fail
@@ -1214,10 +1239,6 @@ openexr:arm-uwp=fail
openexr:x64-uwp=fail
opengl:arm64-windows=fail
opengl:arm-uwp=fail
-openmama:x64-windows=fail
-openmama:x86-windows=fail
-openmama:x64-linux=fail
-openmama:x64-osx=fail
openmesh:arm64-windows=fail
openmesh:arm-uwp=fail
openmesh:x64-uwp=fail
@@ -1227,7 +1248,6 @@ openmpi:x64-uwp=fail
openmpi:x64-windows=fail
openmpi:x64-windows-static=fail
openmpi:x86-windows=fail
-openmvs:x64-linux=fail
openni2:x64-uwp=fail
openni2:x64-windows-static=fail
openscap:x64-linux=fail
@@ -1346,10 +1366,6 @@ portaudio:x64-uwp=fail
portaudio:x64-windows-static=fail
portaudio:x64-windows=fail
portaudio:x86-windows=fail
-portmidi:arm-uwp=fail
-portmidi:x64-linux=fail
-portmidi:x64-osx=fail
-portmidi:x64-uwp=fail
pqp:arm-uwp=fail
pqp:x64-uwp=fail
proj4:arm64-windows=fail
@@ -1775,6 +1791,10 @@ uvatlas:arm-uwp=fail
uvatlas:x64-linux=fail
uvatlas:x64-osx=fail
uvatlas:x64-windows-static=fail
+v8:arm64-windows=fail
+v8:arm-uwp=fail
+v8:x64-osx=fail
+v8:x64-uwp=fail
vectorclass:arm64-windows=fail
vectorclass:arm-uwp=fail
vlpp:x64-osx=fail
diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake
index c7d0e8d95..c9c11a7ad 100644
--- a/scripts/cmake/vcpkg_acquire_msys.cmake
+++ b/scripts/cmake/vcpkg_acquire_msys.cmake
@@ -4,7 +4,7 @@
##
## ## Usage
## ```cmake
-## vcpkg_acquire_msys(<MSYS_ROOT_VAR> [PACKAGES <package>...])
+## vcpkg_acquire_msys(<MSYS_ROOT_VAR> [PACKAGES <package>...] [TIMEOUT <seconds>])
## ```
##
## ## Parameters
@@ -14,6 +14,9 @@
## ### PACKAGES
## A list of packages to acquire in msys.
##
+## ### TIMEOUT
+## Optional timeout to override the default (10 min.) after which installation of PACKAGES is terminated.
+##
## To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)`
##
## ## Notes
@@ -38,7 +41,13 @@
function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
set(TIMESTAMP 20200812)
set(TOOLPATH ${DOWNLOADS}/tools/msys2-${TIMESTAMP})
- cmake_parse_arguments(_am "" "" "PACKAGES" ${ARGN})
+ cmake_parse_arguments(_am "" "TIMEOUT" "PACKAGES" ${ARGN})
+
+ if(_am_TIMEOUT)
+ set(TIMEOUT_PACKAGES "TIMEOUT;${_am_TIMEOUT}")
+ else()
+ set(TIMEOUT_PACKAGES "TIMEOUT;600")
+ endif()
if(NOT CMAKE_HOST_WIN32)
message(FATAL_ERROR "vcpkg_acquire_msys() can only be used on Windows hosts")
@@ -55,7 +64,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
set(TOOLSUBPATH msys64)
set(URLS
"https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz/download"
- "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz"
+ "https://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz"
)
set(ARCHIVE "msys2-base-x86_64-20190524.tar.xz")
set(HASH 50796072d01d30cc4a02df0f9dafb70e2584462e1341ef0eff94e2542d3f5173f20f81e8f743e9641b7528ea1492edff20ce83cb40c6e292904905abe2a91ccc)
@@ -64,7 +73,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
set(TOOLSUBPATH msys32)
set(URLS
"https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20190524.tar.xz/download"
- "http://repo.msys2.org/distrib/i686/msys2-base-i686-20190524.tar.xz"
+ "https://repo.msys2.org/distrib/i686/msys2-base-i686-20190524.tar.xz"
)
set(ARCHIVE "msys2-base-i686-20190524.tar.xz")
set(HASH b26d7d432e1eabe2138c4caac5f0a62670f9dab833b9e91ca94b9e13d29a763323b0d30160f09a381ac442b473482dac799be0fea5dd7b28ea2ddd3ba3cd3c25)
@@ -85,12 +94,12 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
# download the new keyring, without it new packages and package updates
# might not install
vcpkg_download_distfile(KEYRING_PATH
- URLS http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
+ URLS https://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
FILENAME msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
SHA512 a5023fd17ccf6364bc6e27c5e63aea25f1fc264a5247cbae4008864c828c38c3e0b4de09ded650e28d2e24e319b5fcf7a9c0da0fa3a8ac81679470fc6bd120c9
)
vcpkg_download_distfile(KEYRING_SIG_PATH
- URLS http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
+ URLS https://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
FILENAME msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
SHA512 c326fefd13f58339afe0d0dc78306aa6ab27cafa8c4d792c2d34aa81fdd1f759d490990ab79daa9664a03a6dfa14ffd2b2ad828bf19a883410112d01f5ed6c4c
)
@@ -107,7 +116,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
)
# install the new keyring
_execute_process(
- COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman-key --verify ${KEYRING_SIG_PATH}"
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman-key --verify \"${KEYRING_SIG_PATH}\""
WORKING_DIRECTORY ${TOOLPATH}
RESULT_VARIABLE _vam_error_code
)
@@ -115,7 +124,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
message(FATAL_ERROR "Cannot verify MSYS2 keyring.")
endif()
_execute_process(
- COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -U ${KEYRING_PATH} --noconfirm"
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -U \"${KEYRING_PATH}\" --noconfirm"
WORKING_DIRECTORY ${TOOLPATH}
)
# we have to kill all GnuPG daemons otherwise bash would potentially not be
@@ -128,8 +137,9 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
# we need to update pacman before anything else due to pacman transitioning
# to using zstd packages, and our pacman is too old to support those
_execute_process(
- COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Sy pacman --noconfirm"
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Sy pacman --noconfirm --disable-download-timeout"
WORKING_DIRECTORY ${TOOLPATH}
+ TIMEOUT 600
)
# dash relies on specific versions of the base packages, which prevents us
# from doing a proper update. However, we don't need it so we remove it
@@ -138,8 +148,9 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
WORKING_DIRECTORY ${TOOLPATH}
)
_execute_process(
- COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syu --noconfirm"
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syu --noconfirm --disable-download-timeout"
WORKING_DIRECTORY ${TOOLPATH}
+ TIMEOUT 600
)
file(WRITE "${TOOLPATH}/${STAMP}" "0")
message(STATUS "Acquiring MSYS2... OK")
@@ -153,9 +164,10 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
set(ENV{PATH} ${PATH_TO_ROOT}/usr/bin)
vcpkg_execute_required_process(
ALLOW_IN_DOWNLOAD_MODE
- COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "pacman -S --noconfirm --needed ${_am_PACKAGES}"
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "pacman -S --noconfirm --disable-download-timeout --needed ${_am_PACKAGES}"
WORKING_DIRECTORY ${TOOLPATH}
LOGNAME msys-pacman-${TARGET_TRIPLET}
+ ${TIMEOUT_PACKAGES}
)
set(ENV{PATH} "${_ENV_ORIGINAL}")
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake
index 9f75c5e07..ce534b7aa 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -59,11 +59,11 @@
## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
function(vcpkg_configure_cmake)
- cmake_parse_arguments(_csc
+ # parse parameters such that semicolons in arguments to OPTIONS don't get erased
+ cmake_parse_arguments(PARSE_ARGV 0 _csc
"PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG"
"SOURCE_PATH;GENERATOR"
"OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE"
- ${ARGN}
)
if(NOT VCPKG_PLATFORM_TOOLSET)
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index 6ad073803..1cc06147a 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -59,9 +59,6 @@ function(vcpkg_download_distfile VAR)
message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.")
endif()
if(NOT _VCPKG_INTERNAL_NO_HASH_CHECK)
- if(vcpkg_download_distfile_SKIP_SHA512 AND NOT VCPKG_USE_HEAD_VERSION)
- message(FATAL_ERROR "vcpkg_download_distfile only allows SKIP_SHA512 when building with --head")
- endif()
if(NOT vcpkg_download_distfile_SKIP_SHA512 AND NOT DEFINED vcpkg_download_distfile_SHA512)
message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.")
endif()
diff --git a/scripts/cmake/vcpkg_escape_regex_control_characters.cmake b/scripts/cmake/vcpkg_escape_regex_control_characters.cmake
new file mode 100644
index 000000000..3d9d92b5e
--- /dev/null
+++ b/scripts/cmake/vcpkg_escape_regex_control_characters.cmake
@@ -0,0 +1,4 @@
+function(vcpkg_escape_regex_control_characters out_var string_with_regex_characters)
+ string(REGEX REPLACE "[][+.*()^\\$?|]" "\\\\\\0" _escaped_content "${string_with_regex_characters}")
+ set(${out_var} "${_escaped_content}" PARENT_SCOPE)
+endfunction()
diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake
index f25a5b55e..af5ab1e9e 100644
--- a/scripts/cmake/vcpkg_execute_required_process.cmake
+++ b/scripts/cmake/vcpkg_execute_required_process.cmake
@@ -8,6 +8,7 @@
## COMMAND <${PERL}> [<arguments>...]
## WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg>
## LOGNAME <build-${TARGET_TRIPLET}-dbg>
+## [TIMEOUT <seconds>]
## )
## ```
## ## Parameters
@@ -24,6 +25,9 @@
## ### LOGNAME
## The prefix to use for the log files.
##
+## ### TIMEOUT
+## Optional timeout after which to terminate the command.
+##
## This should be a unique name for different triplets so that the logs don't conflict when building multiple at once.
##
## ## Examples
@@ -34,10 +38,16 @@
## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake)
include(vcpkg_prettify_command)
function(vcpkg_execute_required_process)
- cmake_parse_arguments(vcpkg_execute_required_process "ALLOW_IN_DOWNLOAD_MODE" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN})
+ cmake_parse_arguments(vcpkg_execute_required_process "ALLOW_IN_DOWNLOAD_MODE" "WORKING_DIRECTORY;LOGNAME;TIMEOUT" "COMMAND" ${ARGN})
set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log")
set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log")
+ if(vcpkg_execute_required_process_TIMEOUT)
+ set(TIMEOUT_PARAM "TIMEOUT;${vcpkg_execute_required_process_TIMEOUT}")
+ else()
+ set(TIMEOUT_PARAM "")
+ endif()
+
set(execute_process_function execute_process)
if (DEFINED VCPKG_DOWNLOAD_MODE AND NOT vcpkg_execute_required_process_ALLOW_IN_DOWNLOAD_MODE)
message(FATAL_ERROR
@@ -52,7 +62,8 @@ Halting portfile execution.
OUTPUT_FILE ${LOG_OUT}
ERROR_FILE ${LOG_ERR}
RESULT_VARIABLE error_code
- WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY})
+ WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY}
+ ${TIMEOUT_PARAM})
if(error_code)
set(LOGS)
file(READ "${LOG_OUT}" out_contents)
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index 0a9ed4507..30809e32b 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -52,55 +52,55 @@ function(vcpkg_find_acquire_program VAR)
unset(NOEXTRACT)
unset(_vfa_RENAME)
unset(SUBDIR)
+ unset(PROG_PATH_SUBDIR)
unset(REQUIRED_INTERPRETER)
unset(_vfa_SUPPORTED)
unset(POST_INSTALL_COMMAND)
-
- vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS)
- set(PROGRAM_FILES_32_BIT $ENV{ProgramFiles\(X86\)})
- if (NOT DEFINED PROGRAM_FILES_32_BIT)
- set(PROGRAM_FILES_32_BIT $ENV{PROGRAMFILES})
- endif()
+ unset(PATHS)
if(VAR MATCHES "PERL")
set(PROGNAME perl)
- set(PATHS ${DOWNLOADS}/tools/perl/perl/bin)
+ set(PERL_VERSION 5.30.0.1)
+ set(SUBDIR ${PERL_VERSION})
+ set(PATHS ${DOWNLOADS}/tools/perl/${SUBDIR}/perl/bin)
set(BREW_PACKAGE_NAME "perl")
set(APT_PACKAGE_NAME "perl")
set(URL
- "https://strawberry.perl.bot/download/5.30.0.1/strawberry-perl-5.30.0.1-32bit.zip"
- "http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-32bit.zip"
+ "https://strawberry.perl.bot/download/${PERL_VERSION}/strawberry-perl-${PERL_VERSION}-32bit.zip"
+ "http://strawberryperl.com/download/${PERL_VERSION}/strawberry-perl-${PERL_VERSION}-32bit.zip"
)
- set(ARCHIVE "strawberry-perl-5.30.0.1-32bit.zip")
+ set(ARCHIVE "strawberry-perl-${PERL_VERSION}-32bit.zip")
set(HASH d353d3dc743ebdc6d1e9f6f2b7a6db3c387c1ce6c890bae8adc8ae5deae8404f4c5e3cf249d1e151e7256d4c5ee9cd317e6c41f3b6f244340de18a24b938e0c4)
elseif(VAR MATCHES "NASM")
set(PROGNAME nasm)
- set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.14.02)
+ set(NASM_VERSION 2.14.02)
+ set(PATHS ${DOWNLOADS}/tools/nasm/nasm-${NASM_VERSION})
set(BREW_PACKAGE_NAME "nasm")
set(APT_PACKAGE_NAME "nasm")
set(URL
- "http://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win32/nasm-2.14.02-win32.zip"
- "http://fossies.org/windows/misc/nasm-2.14.02-win32.zip"
+ "https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/win32/nasm-${NASM_VERSION}-win32.zip"
+ "https://fossies.org/windows/misc/nasm-${NASM_VERSION}-win32.zip"
)
- set(ARCHIVE "nasm-2.14.02-win32.zip")
+ set(ARCHIVE "nasm-${NASM_VERSION}-win32.zip")
set(HASH a0f16a9f3b668b086e3c4e23a33ff725998e120f2e3ccac8c28293fd4faeae6fc59398919e1b89eed7461685d2730de02f2eb83e321f73609f35bf6b17a23d1e)
elseif(VAR MATCHES "YASM")
set(PROGNAME yasm)
+ set(YASM_VERSION 1.3.0.6.g1962)
set(SUBDIR 1.3.0.6)
- set(PATHS ${DOWNLOADS}/tools/yasm/${SUBDIR})
set(BREW_PACKAGE_NAME "yasm")
set(APT_PACKAGE_NAME "yasm")
- set(URL "https://www.tortall.net/projects/yasm/snapshots/v1.3.0.6.g1962/yasm-1.3.0.6.g1962.exe")
- set(ARCHIVE "yasm-1.3.0.6.g1962.exe")
+ set(URL "https://www.tortall.net/projects/yasm/snapshots/v${YASM_VERSION}/yasm-${YASM_VERSION}.exe")
+ set(ARCHIVE "yasm-${YASM_VERSION}.exe")
set(_vfa_RENAME "yasm.exe")
set(NOEXTRACT ON)
set(HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b)
elseif(VAR MATCHES "GIT")
set(PROGNAME git)
if(CMAKE_HOST_WIN32)
- set(SUBDIR "git-2.26.2-1-windows")
- set(URL "https://github.com/git-for-windows/git/releases/download/v2.26.2.windows.1/PortableGit-2.26.2-32-bit.7z.exe")
- set(ARCHIVE "PortableGit-2.26.2-32-bit.7z.exe")
+ set(GIT_VERSION 2.26.2)
+ set(SUBDIR "git-${GIT_VERSION}-1-windows")
+ set(URL "https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/PortableGit-${GIT_VERSION}-32-bit.7z.exe")
+ set(ARCHIVE "PortableGit-${GIT_VERSION}-32-bit.7z.exe")
set(HASH d3cb60d62ca7b5d05ab7fbed0fa7567bec951984568a6c1646842a798c4aaff74bf534cf79414a6275c1927081a11b541d09931c017bf304579746e24fe57b36)
set(PATHS
"${DOWNLOADS}/tools/${SUBDIR}/mingw32/bin"
@@ -129,29 +129,30 @@ function(vcpkg_find_acquire_program VAR)
set(HASH "263e02bd79eee0cb7b664831b7898565c5656a046328d8f187ef7ae2a4d766991d477b190c9b425fcc960ab76f381cd3e396afb85cba7408ca9e74eb32c175db")
endif()
set(SUBDIR "${GN_VERSION}")
- set(PATHS "${DOWNLOADS}/tools/gn/${SUBDIR}")
set(URL "${CIPD_DOWNLOAD_GN}/${GN_PLATFORM}/+/${GN_VERSION}")
set(ARCHIVE "gn-${GN_PLATFORM}.zip")
elseif(VAR MATCHES "GO")
set(PROGNAME go)
- set(PATHS ${DOWNLOADS}/tools/go/go/bin)
+ set(SUBDIR 1.13.1.windows-386)
+ set(PATHS ${DOWNLOADS}/tools/go/${SUBDIR}/go/bin)
set(BREW_PACKAGE_NAME "go")
set(APT_PACKAGE_NAME "golang-go")
- set(URL "https://dl.google.com/go/go1.13.1.windows-386.zip")
- set(ARCHIVE "go1.13.1.windows-386.zip")
+ set(URL "https://dl.google.com/go/go${SUBDIR}.zip")
+ set(ARCHIVE "go${SUBDIR}.zip")
set(HASH 2ab0f07e876ad98d592351a8808c2de42351ab387217e088bc4c5fa51d6a835694c501e2350802323b55a27dc0157f8b70045597f789f9e50f5ceae50dea3027)
elseif(VAR MATCHES "PYTHON3")
if(CMAKE_HOST_WIN32)
set(PROGNAME python)
+ set(PYTHON_VERSION 3.8.3)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
- set(SUBDIR "python-3.8.3-x86")
- set(URL "https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-win32.zip")
- set(ARCHIVE "python-3.8.3-embed-win32.zip")
+ set(SUBDIR "python-${PYTHON_VERSION}-x86")
+ set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-win32.zip")
+ set(ARCHIVE "python-${PYTHON_VERSION}-embed-win32.zip")
set(HASH 8c9078f55b1b5d694e0e809eee6ccf8a6e15810dd4649e8ae1209bff30e102d49546ce970a5d519349ca7759d93146f459c316dc440737171f018600255dcd0a)
else()
- set(SUBDIR "python-3.8.3-x64")
- set(URL "https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-amd64.zip")
- set(ARCHIVE "python-3.8.3-embed-amd64.zip")
+ set(SUBDIR "python-${PYTHON_VERSION}-x64")
+ set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-amd64.zip")
+ set(ARCHIVE "python-${PYTHON_VERSION}-embed-amd64.zip")
set(HASH a322fc925167edb1897764297cf47e294ad3f52c109a05f8911412807eb83e104f780e9fe783b17fe0d9b18b7838797c15e9b0805dab759829f77a9bc0159424)
endif()
set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR})
@@ -164,15 +165,16 @@ function(vcpkg_find_acquire_program VAR)
elseif(VAR MATCHES "PYTHON2")
if(CMAKE_HOST_WIN32)
set(PROGNAME python)
+ set(PYTHON_VERSION 2.7.16)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
- set(SUBDIR "python-2.7.16-x86")
- set(URL "https://www.python.org/ftp/python/2.7.16/python-2.7.16.msi")
- set(ARCHIVE "python-2.7.16.msi")
+ set(SUBDIR "python-${PYTHON_VERSION}-x86")
+ set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.msi")
+ set(ARCHIVE "python-${PYTHON_VERSION}.msi")
set(HASH c34a6fa2438682104dccb53650a2bdb79eac7996deff075201a0f71bb835d60d3ed866652a1931f15a29510fe8e1009ac04e423b285122d2e5747fefc4c10254)
else()
- set(SUBDIR "python-2.7.16-x64")
- set(URL "https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi")
- set(ARCHIVE "python-2.7.16.amd64.msi")
+ set(SUBDIR "python-${PYTHON_VERSION}-x64")
+ set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.amd64.msi")
+ set(ARCHIVE "python-${PYTHON_VERSION}.amd64.msi")
set(HASH 47c1518d1da939e3ba6722c54747778b93a44c525bcb358b253c23b2510374a49a43739c8d0454cedade858f54efa6319763ba33316fdc721305bc457efe4ffb)
endif()
set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR})
@@ -192,32 +194,31 @@ function(vcpkg_find_acquire_program VAR)
set(SUBDIR "jom-1.1.3")
set(PATHS ${DOWNLOADS}/tools/jom/${SUBDIR})
set(URL
- "http://download.qt.io/official_releases/jom/jom_1_1_3.zip"
- "http://mirrors.ocf.berkeley.edu/qt/official_releases/jom/jom_1_1_3.zip"
+ "https://download.qt.io/official_releases/jom/jom_1_1_3.zip"
+ "https://mirrors.ocf.berkeley.edu/qt/official_releases/jom/jom_1_1_3.zip"
)
set(ARCHIVE "jom_1_1_3.zip")
set(HASH 5b158ead86be4eb3a6780928d9163f8562372f30bde051d8c281d81027b766119a6e9241166b91de0aa6146836cea77e5121290e62e31b7a959407840fc57b33)
elseif(VAR MATCHES "7Z")
set(PROGNAME 7z)
- set(PATHS "${PROGRAM_FILES_PLATFORM_BITNESS}/7-Zip" "${PROGRAM_FILES_32_BIT}/7-Zip" "${DOWNLOADS}/tools/7z/Files/7-Zip")
+ set(PATHS "${DOWNLOADS}/tools/7z/Files/7-Zip")
set(URL "https://7-zip.org/a/7z1900.msi")
set(ARCHIVE "7z1900.msi")
set(HASH f73b04e2d9f29d4393fde572dcf3c3f0f6fa27e747e5df292294ab7536ae24c239bf917689d71eb10cc49f6b9a4ace26d7c122ee887d93cc935f268c404e9067)
elseif(VAR MATCHES "NINJA")
set(PROGNAME ninja)
set(NINJA_VERSION 1.10.0)
- set(SUBDIR "ninja-${NINJA_VERSION}")
set(_vfa_SUPPORTED ON)
if(CMAKE_HOST_WIN32)
set(ARCHIVE "ninja-win-${NINJA_VERSION}.zip")
- set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-windows")
- list(APPEND PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}")
+ set(SUBDIR "${NINJA_VERSION}-windows")
set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-win.zip")
set(HASH a196e243c53daa1df9d287af658d6d38d6b830b614f2d5704e8c88ffc61f179a533ae71cdb6d0d383d1559d65dacccbaaab270fb2a33aa211e5dba42ff046f97)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(ARCHIVE "ninja-mac-${NINJA_VERSION}.zip")
set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-mac.zip")
- set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-osx")
+ set(SUBDIR "${NINJA_VERSION}-osx")
+ set(PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-osx")
set(HASH 619a1924067a0b30fc5f8887f868d3ee5481838d2f0f158d031f7614a2a10b95a73d4a56b658d5d560283ebf809e2e536b968c6c01ff0108075c3f393f5780ba)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-freebsd")
@@ -225,14 +226,15 @@ function(vcpkg_find_acquire_program VAR)
else()
set(ARCHIVE "ninja-linux-${NINJA_VERSION}.zip")
set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip")
- set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-linux")
+ set(SUBDIR "${NINJA_VERSION}-linux")
+ set(PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-linux")
set(HASH ffb179ab8ea315167fcc99a8f13286e1363590185b18cf819cc73e09f2a7553790e9dc45fd1ccd0bd1d2dbf543aee3f6c0951cf9ce453a7168ffd2ac873cdd29)
endif()
set(VERSION_CMD --version)
elseif(VAR MATCHES "NUGET")
set(PROGNAME nuget)
set(SUBDIR "5.5.1")
- set(PATHS "${DOWNLOADS}/tools/nuget/${SUBDIR}")
+ set(PATHS "${DOWNLOADS}/tools/nuget-${SUBDIR}-windows")
set(BREW_PACKAGE_NAME "nuget")
set(URL "https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe")
set(_vfa_RENAME "nuget.exe")
@@ -284,9 +286,10 @@ function(vcpkg_find_acquire_program VAR)
endif()
elseif(VAR MATCHES "GPERF")
set(PROGNAME gperf)
+ set(GPERF_VERSION 3.0.1)
set(PATHS ${DOWNLOADS}/tools/gperf/bin)
- set(URL "https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/gperf-3.0.1-bin.zip/download")
- set(ARCHIVE "gperf-3.0.1-bin.zip")
+ set(URL "https://sourceforge.net/projects/gnuwin32/files/gperf/${GPERF_VERSION}/gperf-${GPERF_VERSION}-bin.zip/download")
+ set(ARCHIVE "gperf-${GPERF_VERSION}-bin.zip")
set(HASH 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9)
elseif(VAR MATCHES "GASPREPROCESSOR")
set(NOEXTRACT true)
@@ -308,21 +311,23 @@ function(vcpkg_find_acquire_program VAR)
set(HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516)
elseif(VAR MATCHES "SCONS")
set(PROGNAME scons)
+ set(SCONS_VERSION 3.0.1)
+ set(SUBDIR ${SCONS_VERSION})
set(REQUIRED_INTERPRETER PYTHON2)
set(SCRIPTNAME "scons.py")
- set(PATHS ${DOWNLOADS}/tools/scons)
- set(URL "https://sourceforge.net/projects/scons/files/scons-local-3.0.1.zip/download")
- set(ARCHIVE "scons-local-3.0.1.zip")
+ set(URL "https://sourceforge.net/projects/scons/files/scons-local-${SCONS_VERSION}.zip/download")
+ set(ARCHIVE "scons-local-${SCONS_VERSION}.zip")
set(HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727)
elseif(VAR MATCHES "SWIG")
set(VERSION 4.0.2)
set(PROGNAME swig)
if(CMAKE_HOST_WIN32)
- set(URL "https://sourceforge.net/projects/swig/files/swigwin/swigwin-${VERSION}/swigwin-${VERSION}.zip/download")
+ #set(URL "https://sourceforge.net/projects/swig/files/swigwin/swigwin-${VERSION}/swigwin-${VERSION}.zip/download")
set(ARCHIVE "swigwin-${VERSION}.zip")
set(HASH b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d)
- set(SUBDIR "swigwin-${VERSION}")
- set(PATHS "${DOWNLOADS}/tools/swig/${SUBDIR}/${SUBDIR}")
+ set(SUBDIR b8f105f9b9-f0518bc3b7/swigwin-${VERSION})
+ #set(SUBDIR "swigwin-${VERSION}")
+ #set(PATHS "${DOWNLOADS}/tools/swig/swigwin-${VERSION}")
else()
#Not used
set(_vfa_SUPPORTED TRUE)
@@ -333,7 +338,8 @@ function(vcpkg_find_acquire_program VAR)
set(PATHS "${DOWNLOADS}/tools/swig/${SUBDIR}")
endif()
set(SOURCEFORGE_ARGS
- REPO swig
+ REPO swig/swigwin
+ REF swigwin-${VERSION}
FILENAME "${ARCHIVE}"
SHA512 "${HASH}"
NO_REMOVE_ONE_LEVEL
@@ -342,61 +348,67 @@ function(vcpkg_find_acquire_program VAR)
elseif(VAR MATCHES "DOXYGEN")
set(PROGNAME doxygen)
set(DOXYGEN_VERSION 1.8.17)
- set(PATHS ${DOWNLOADS}/tools/doxygen)
- set(URL
- "http://doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.windows.bin.zip"
- "https://sourceforge.net/projects/doxygen/files/rel-${DOXYGEN_VERSION}/doxygen-${DOXYGEN_VERSION}.windows.bin.zip")
- set(ARCHIVE "doxygen-${DOXYGEN_VERSION}.windows.bin.zip")
- set(HASH 6bac47ec552486783a70cc73b44cf86b4ceda12aba6b52835c2221712bd0a6c845cecec178c9ddaa88237f5a781f797add528f47e4ed017c7888eb1dd2bc0b4b)
+ set(SOURCEFORGE_ARGS
+ REPO doxygen
+ REF rel-${DOXYGEN_VERSION}
+ FILENAME "doxygen-${DOXYGEN_VERSION}.windows.bin.zip"
+ SHA512 6bac47ec552486783a70cc73b44cf86b4ceda12aba6b52835c2221712bd0a6c845cecec178c9ddaa88237f5a781f797add528f47e4ed017c7888eb1dd2bc0b4b
+ NO_REMOVE_ONE_LEVEL
+ WORKING_DIRECTORY "${DOWNLOADS}/tools/doxygen"
+ )
+ set(SUBDIR 6bac47ec55-25c819fd77)
elseif(VAR MATCHES "BAZEL")
set(PROGNAME bazel)
set(BAZEL_VERSION 0.25.2)
- set(SUBDIR ${BAZEL_VERSION})
- set(PATHS ${DOWNLOADS}/tools/bazel/${SUBDIR})
set(_vfa_RENAME "bazel")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(_vfa_SUPPORTED ON)
- set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64")
- set(ARCHIVE "bazel-${BAZEL_VERSION}-linux-x86_64")
+ set(SUBDIR ${BAZEL_VERSION}-linux)
+ set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64")
+ set(ARCHIVE "bazel-${SUBDIR}-x86_64")
set(NOEXTRACT ON)
set(HASH db4a583cf2996aeb29fd008261b12fe39a4a5faf0fbf96f7124e6d3ffeccf6d9655d391378e68dd0915bc91c9e146a51fd9661963743857ca25179547feceab1)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(_vfa_SUPPORTED ON)
- set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-darwin-x86_64")
- set(ARCHIVE "bazel-${BAZEL_VERSION}-darwin-x86_64")
+ set(SUBDIR ${BAZEL_VERSION}-darwin)
+ set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64")
+ set(ARCHIVE "bazel-${SUBDIR}-x86_64")
set(NOEXTRACT ON)
set(HASH 420a37081e6ee76441b0d92ff26d1715ce647737ce888877980d0665197b5a619d6afe6102f2e7edfb5062c9b40630a10b2539585e35479b780074ada978d23c)
else()
- set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-windows-x86_64.zip")
- set(ARCHIVE "bazel-${BAZEL_VERSION}-windows-x86_64.zip")
+ set(SUBDIR ${BAZEL_VERSION}-windows)
+ set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64.zip")
+ set(ARCHIVE "bazel-${SUBDIR}-x86_64.zip")
set(HASH 6482f99a0896f55ef65739e7b53452fd9c0adf597b599d0022a5e0c5fa4374f4a958d46f98e8ba25af4b065adacc578bfedced483d8c169ea5cb1777a99eea53)
endif()
- # Download Tools
elseif(VAR MATCHES "ARIA2")
set(PROGNAME aria2c)
- set(PATHS ${DOWNLOADS}/tools/aria2c/aria2-1.34.0-win-32bit-build1)
- set(URL "https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip")
- set(ARCHIVE "aria2-1.34.0-win-32bit-build1.zip")
+ set(ARIA2_VERSION 1.34.0)
+ set(PATHS ${DOWNLOADS}/tools/aria2c/aria2-${ARIA2_VERSION}-win-32bit-build1)
+ set(URL "https://github.com/aria2/aria2/releases/download/release-${ARIA2_VERSION}/aria2-${ARIA2_VERSION}-win-32bit-build1.zip")
+ set(ARCHIVE "aria2-${ARIA2_VERSION}-win-32bit-build1.zip")
set(HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27)
elseif(VAR MATCHES "PKGCONFIG")
set(PROGNAME pkg-config)
+ set(VERSION 0.29.2-1)
+ set(LIBWINPTHREAD_VERSION git-8.0.0.5906.c9a21571-1)
if(ENV{PKG_CONFIG})
debug_message(STATUS "PKG_CONFIG found in ENV! Using $ENV{PKG_CONFIG}")
set(PKGCONFIG $ENV{PKG_CONFIG} PARENT_SCOPE)
return()
elseif(CMAKE_HOST_WIN32)
- set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/0.29.2-1")
+ set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${VERSION}")
set(PKGCONFIG "${PROG_PATH_SUBDIR}/mingw32/bin/pkg-config.exe")
if(NOT EXISTS "${PKGCONFIG}")
vcpkg_download_distfile(PKGCONFIG_ARCHIVE
- URLS "https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-1-any.pkg.tar.xz"
+ URLS "https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-${VERSION}-any.pkg.tar.xz"
SHA512 3b1b706a24d9aef7bbdf3ce4427aaa813ba6fbd292ed9dda181b4300e117c3d59a159ddcca8b013fd01ce76da2d95d590314ff9628c0d68a6966bac4842540f0
- FILENAME mingw-w64-i686-pkg-config-0.29.2-1-any.pkg.tar.xz
+ FILENAME mingw-w64-i686-pkg-config-${VERSION}-any.pkg.tar.xz
)
vcpkg_download_distfile(LIBWINPTHREAD_ARCHIVE
- URLS "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst"
+ URLS "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-${LIBWINPTHREAD_VERSION}-any.pkg.tar.zst"
SHA512 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c
- FILENAME mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst
+ FILENAME mingw-w64-i686-libwinpthread-${LIBWINPTHREAD_VERSION}-any.pkg.tar.zst
)
file(REMOVE_RECURSE ${PROG_PATH_SUBDIR} ${PROG_PATH_SUBDIR}.tmp)
file(MAKE_DIRECTORY ${PROG_PATH_SUBDIR}.tmp)
@@ -475,6 +487,13 @@ function(vcpkg_find_acquire_program VAR)
endif()
endmacro()
+ if(NOT DEFINED PROG_PATH_SUBDIR)
+ set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}")
+ endif()
+ if(DEFINED SUBDIR)
+ list(APPEND PATHS ${PROG_PATH_SUBDIR})
+ endif()
+
do_find()
if(NOT ${VAR})
if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _vfa_SUPPORTED)
@@ -499,7 +518,6 @@ function(vcpkg_find_acquire_program VAR)
FILENAME ${ARCHIVE}
)
- set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}")
file(MAKE_DIRECTORY ${PROG_PATH_SUBDIR})
if(DEFINED NOEXTRACT)
if(DEFINED _vfa_RENAME)
diff --git a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
index 3e44ec172..2cc2dd04a 100644
--- a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
+++ b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
@@ -37,6 +37,8 @@
##
## ## Examples
## Just call vcpkg_fixup_pkgconfig() after any install step which installs *.pc files.
+
+include(vcpkg_escape_regex_control_characters)
function(vcpkg_fixup_pkgconfig_check_files pkg_cfg_cmd _file _config _system_libs _ignore_flags)
# Setup pkg-config paths
set(_VCPKG_INSTALLED_PKGCONF "${CURRENT_INSTALLED_DIR}")
@@ -134,6 +136,7 @@ function(vcpkg_fixup_pkgconfig_check_files pkg_cfg_cmd _file _config _system_lib
foreach(_search_path IN LISTS _pkg_lib_paths_output)
debug_message("REMOVING:'${_search_path}'")
debug_message("FROM:'${_pkg_libs_output}'")
+ vcpkg_escape_regex_control_characters(_search_path "${_search_path}")
string(REGEX REPLACE "(^[\t ]*|[\t ]+|;[\t ]*)-L${_search_path}([\t ]+|[\t ]*$)" ";" _pkg_libs_output "${_pkg_libs_output}") # Remove search paths from libs
endforeach()
debug_message("LIBS AFTER -L<path> REMOVAL:'${_pkg_libs_output}'")
@@ -254,14 +257,15 @@ function(vcpkg_fixup_pkgconfig)
message(FATAL_ERROR "vcpkg_fixup_pkgconfig was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}")
endif()
+ vcpkg_escape_regex_control_characters(_vfpkg_ESCAPED_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}")
if(NOT _vfpkg_RELEASE_FILES)
file(GLOB_RECURSE _vfpkg_RELEASE_FILES "${CURRENT_PACKAGES_DIR}/**/*.pc")
- list(FILTER _vfpkg_RELEASE_FILES EXCLUDE REGEX "${CURRENT_PACKAGES_DIR}/debug/")
+ list(FILTER _vfpkg_RELEASE_FILES EXCLUDE REGEX "${_vfpkg_ESCAPED_CURRENT_PACKAGES_DIR}/debug/")
endif()
if(NOT _vfpkg_DEBUG_FILES)
file(GLOB_RECURSE _vfpkg_DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/**/*.pc")
- list(FILTER _vfpkg_DEBUG_FILES INCLUDE REGEX "${CURRENT_PACKAGES_DIR}/debug/")
+ list(FILTER _vfpkg_DEBUG_FILES INCLUDE REGEX "${_vfpkg_ESCAPED_CURRENT_PACKAGES_DIR}/debug/")
endif()
vcpkg_find_acquire_program(PKGCONFIG)
@@ -283,8 +287,8 @@ function(vcpkg_fixup_pkgconfig)
string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}")
string(REPLACE "${_VCPKG_PACKAGES_DIR}" "\${prefix}" _contents "${_contents}")
string(REPLACE "${_VCPKG_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}")
- string(REGEX REPLACE "^prefix=(\")?(\\\\)?\\\${prefix}(\")?" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
- string(REGEX REPLACE "[\n]prefix=(\")?(\\\\)?\\\${prefix}(\")?" "\nprefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
+ string(REGEX REPLACE "^prefix[ \t]*=[ \t]*(\")?(\\\\)?\\\${prefix}(\")?" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
+ string(REGEX REPLACE "[\n]prefix[ \t]*=[ \t]*(\")?(\\\\)?\\\${prefix}(\")?" "\nprefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
file(WRITE "${_file}" "${_contents}")
unset(PKG_LIB_SEARCH_PATH)
endforeach()
@@ -313,8 +317,8 @@ function(vcpkg_fixup_pkgconfig)
string(REPLACE "debug/share" "../share" _contents "${_contents}")
string(REPLACE "\${prefix}/share" "\${prefix}/../share" _contents "${_contents}")
string(REPLACE "debug/lib" "lib" _contents "${_contents}") # the prefix will contain the debug keyword
- string(REGEX REPLACE "^prefix=(\")?(\\\\)?\\\${prefix}(/debug)?(\")?" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
- string(REGEX REPLACE "[\n]prefix=(\")?(\\\\)?\\\${prefix}(/debug)?(\")?" "\nprefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
+ string(REGEX REPLACE "^prefix[ \t]*=[ \t]*(\")?(\\\\)?\\\${prefix}(/debug)?(\")?" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
+ string(REGEX REPLACE "[\n]prefix[ \t]*=[ \t]*(\")?(\\\\)?\\\${prefix}(/debug)?(\")?" "\nprefix=\${pcfiledir}/${RELATIVE_PC_PATH}" _contents "${_contents}") # make pc file relocatable
string(REPLACE "\${prefix}/debug" "\${prefix}" _contents "${_contents}") # replace remaining debug paths if they exist.
file(WRITE "${_file}" "${_contents}")
unset(PKG_LIB_SEARCH_PATH)
diff --git a/scripts/cmake/vcpkg_from_sourceforge.cmake b/scripts/cmake/vcpkg_from_sourceforge.cmake
index 34b2a12b0..10dc8b623 100644
--- a/scripts/cmake/vcpkg_from_sourceforge.cmake
+++ b/scripts/cmake/vcpkg_from_sourceforge.cmake
@@ -65,6 +65,34 @@
## * [tinyfiledialogs](https://github.com/Microsoft/vcpkg/blob/master/ports/tinyfiledialogs/portfile.cmake)
function(vcpkg_from_sourceforge)
+ macro(check_file_content)
+ if (EXISTS ${ARCHIVE})
+ file(SIZE ${ARCHIVE} DOWNLOAD_FILE_SIZE)
+ if (DOWNLOAD_FILE_SIZE LESS_EQUAL 1024)
+ file(READ ${ARCHIVE} _FILE_CONTENT_)
+ string(FIND "${_FILE_CONTENT_}" "the Sourceforge site is currently in Disaster Recovery mode." OUT_CONTENT)
+ message("OUT_CONTENT: ${OUT_CONTENT}")
+ if (OUT_CONTENT EQUAL -1)
+ set(download_success 1)
+ else()
+ file(REMOVE ${ARCHIVE})
+ endif()
+ endif()
+ endif()
+ endmacro()
+
+ macro(check_file_sha512)
+ file(SHA512 ${ARCHIVE} FILE_HASH)
+ if(NOT FILE_HASH STREQUAL _vdus_SHA512)
+ message(FATAL_ERROR
+ "\nFile does not have expected hash:\n"
+ " File path: [ ${ARCHIVE} ]\n"
+ " Expected hash: [ ${_vdus_SHA512} ]\n"
+ " Actual hash: [ ${FILE_HASH} ]\n"
+ "${CUSTOM_ERROR_ADVICE}\n")
+ endif()
+ endmacro()
+
set(booleanValueArgs DISABLE_SSL NO_REMOVE_ONE_LEVEL)
set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 FILENAME WORKING_DIRECTORY)
set(multipleValuesArgs PATCHES)
@@ -151,13 +179,15 @@ function(vcpkg_from_sourceforge)
message(STATUS "Trying auto-select mirror...")
vcpkg_download_distfile(ARCHIVE
URLS "${DOWNLOAD_URL}"
- SHA512 "${_vdus_SHA512}"
+ SKIP_SHA512
FILENAME "${_vdus_FILENAME}"
SILENT_EXIT
)
-
- if (EXISTS ${ARCHIVE})
- set(download_success 1)
+ check_file_content()
+ if (download_success)
+ check_file_sha512()
+ else()
+ message(STATUS "The default mirror is in Disaster Recovery mode, trying other mirrors...")
endif()
if (NOT download_success EQUAL 1)
@@ -166,13 +196,19 @@ function(vcpkg_from_sourceforge)
message(STATUS "Trying mirror ${SOURCEFORGE_MIRROR}...")
vcpkg_download_distfile(ARCHIVE
URLS "${DOWNLOAD_URL}"
- SHA512 "${_vdus_SHA512}"
+ SKIP_SHA512
FILENAME "${_vdus_FILENAME}"
SILENT_EXIT
)
if (EXISTS ${ARCHIVE})
set(download_success 1)
+ check_file_content()
+ if (download_success)
+ check_file_sha512()
+ else()
+ message(STATUS "Mirror ${SOURCEFORGE_MIRROR} is in Disaster Recovery mode, trying other mirrors...")
+ endif()
break()
endif()
endforeach()
diff --git a/scripts/test_ports/vcpkg-find-acquire-program/CONTROL b/scripts/test_ports/vcpkg-find-acquire-program/CONTROL
new file mode 100644
index 000000000..6f248be58
--- /dev/null
+++ b/scripts/test_ports/vcpkg-find-acquire-program/CONTROL
@@ -0,0 +1,4 @@
+Source: vcpkg-find-acquire-program
+Version: 0
+Description: Test port to exercise vcpkg_find_acquire_program
+Supports: windows
diff --git a/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake b/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake
new file mode 100644
index 000000000..88a4856c5
--- /dev/null
+++ b/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake
@@ -0,0 +1,21 @@
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+
+if(CMAKE_HOST_WIN32)
+ foreach(PROG GO JOM NASM PERL YASM GIT PYTHON3 PYTHON2 RUBY 7Z NUGET FLEX BISON GPERF GASPREPROCESSOR DARK SCONS SWIG DOXYGEN ARIA2 PKGCONFIG)
+ vcpkg_find_acquire_program(${PROG})
+ foreach(SUBPROG IN LISTS ${PROG})
+ if(NOT EXISTS "${SUBPROG}")
+ message(FATAL_ERROR "Program ${SUBPROG} did not exist.")
+ endif()
+ endforeach()
+ endforeach()
+endif()
+
+foreach(PROG GN NINJA MESON BAZEL)
+ vcpkg_find_acquire_program(${PROG})
+ foreach(SUBPROG IN LISTS ${PROG})
+ if(NOT EXISTS "${SUBPROG}")
+ message(FATAL_ERROR "Program ${SUBPROG} did not exist.")
+ endif()
+ endforeach()
+endforeach()