From 91573c6a3e850562f04b452e34639c887bf41fd9 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 17 Sep 2020 14:40:55 -0700 Subject: [PATCH 1/9] [vcpkg ci:osx] Remove brew install --- scripts/azure-pipelines/azure-pipelines.yml | 3 +++ .../azure-pipelines/osx/Setup-VagrantMachines.ps1 | 7 +++++++ scripts/azure-pipelines/osx/azure-pipelines.yml | 13 +------------ .../azure-pipelines/osx/configuration/VagrantFile | 7 +++++-- .../configuration/vagrant-configuration.schema.json | 3 +++ 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 01810eb0f343d9..e59ab4652ffdc3 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -4,6 +4,7 @@ variables: windows-pool: 'PrWin-2020-08-12' linux-pool: 'PrLin-2020-08-12' + osx-pool: 'PrOsx-2020-09-17' stages: - stage: check_cxx_formatting @@ -81,6 +82,8 @@ stages: poolName: $(windows-pool) - template: osx/azure-pipelines.yml + parameters: + poolName: $(osx-pool) - template: linux/azure-pipelines.yml parameters: diff --git a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 index 5600cb1ed6fc84..33f0095c80065b 100755 --- a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 +++ b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 @@ -13,6 +13,9 @@ configuration JSON file into ~/vagrant/vcpkg-eg-mac. .PARAMETER Pat The personal access token which has Read & Manage permissions on the ADO pool. +.PARAMETER AgentPool +The agent pool to add the machine to. + .PARAMETER ArchivesUsername The username for the archives share. @@ -49,6 +52,9 @@ Param( [Parameter(Mandatory=$True)] [String]$Pat, + [Parameter(Mandatory=$True)] + [String]$AgentPool, + [Parameter(Mandatory=$True)] [String]$ArchivesUsername, @@ -99,6 +105,7 @@ Copy-Item ` $configuration = @{ pat = $Pat; + agent_pool = $AgentPool; base_name = $BaseName; machine_identifiers = $MachineIdentifiers; disk_size = $DiskSize; diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 0856aada79ec77..9923e206e2045a 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -5,8 +5,7 @@ jobs: - job: x64_osx pool: - name: vcpkgAgentPool - demands: Agent.OS -equals Darwin + name: ${{ parameters.poolName }} workspace: clean: resources timeoutInMinutes: 1440 # 1 day @@ -19,16 +18,6 @@ jobs: steps: - bash: df -h displayName: 'Report on Disk Space' - - bash: | - brew list autoconf || brew install autoconf - brew list automake || brew install automake - brew list pkg-config || brew install pkg-config - brew list libtool || brew install libtool - brew list bison || brew install bison - brew list gfortran || brew cask install gfortran - brew list mono || brew install mono - brew list yasm || brew install yasm - displayName: 'Install brew dependencies' - bash: | sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} || 0 sudo chmod 777 ${{ variables.VCPKG_DOWNLOADS }} || 0 diff --git a/scripts/azure-pipelines/osx/configuration/VagrantFile b/scripts/azure-pipelines/osx/configuration/VagrantFile index 1e1cce50f06c99..b87309dcbac6d0 100644 --- a/scripts/azure-pipelines/osx/configuration/VagrantFile +++ b/scripts/azure-pipelines/osx/configuration/VagrantFile @@ -17,8 +17,11 @@ end brew_formulas = [ 'autoconf', 'automake', + 'bison', 'libtool', - 'bison' ] + 'mono', + 'pkg-config', + 'yasm' ] brew_cask_formulas = [ 'powershell', @@ -26,7 +29,7 @@ brew_cask_formulas = [ azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.171.1/vsts-agent-osx-x64-2.171.1.tar.gz' devops_url = 'https://dev.azure.com/vcpkg' -agent_pool = 'vcpkgAgentPool' +agent_pool = configuration['agent_pool'] pat = configuration['pat'] archives = configuration['archives'] archives_url = "//#{archives['username']}:#{url_encode(archives['access_key'])}@#{archives['urn']}/#{archives['share']}" diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json b/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json index f0abc1673419ce..456f579bf8de0a 100644 --- a/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json +++ b/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json @@ -15,6 +15,9 @@ "pat": { "type": "string" }, + "agent_pool": { + "type": "string" + }, "base_name": { "type": "string" }, From 9d4465db719ce268b362768d509718507c2c25c5 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Fri, 18 Sep 2020 17:46:40 -0700 Subject: [PATCH 2/9] add instructions for creating a new vagrant box --- scripts/azure-pipelines/osx/README.md | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/scripts/azure-pipelines/osx/README.md b/scripts/azure-pipelines/osx/README.md index 0395908f0174f0..c2f0b7f10536e7 100644 --- a/scripts/azure-pipelines/osx/README.md +++ b/scripts/azure-pipelines/osx/README.md @@ -67,3 +67,57 @@ $ sudo shutdown -r now and wait for the machine to start back up. Then, start again from `Install-Prerequisites.ps1`. + +## Creating a new Vagrant box + +Whenever we want to install updated versions of the command line tools, +or of macOS, we need to create a new vagrant box. +This is pretty easy, but the results of the creation are not public, +since we're concerned about licensing. +However, if you're sure you're following Apple's licensing, +you can set up your own vagrant boxes that are the same as ours by doing the following: + +You'll need some prerequisites: + +- macinbox - installable via `sudo gem install macinbox` +- vagrant - found at +- VirtualBox - found at +- A macOS installer application - you can get this from the App Store (although I believe only the latest is available) +- An Xcode Command Line Tools installer - you can get this from Apple's developer website, + although you'll need to sign in first: + +First, you'll need to create a base box; +this is where you determine what version of macOS is installed. + +``` +> sudo macinbox \ + --box-format virtualbox \ + --name macos-ci-base \ + --installer \ + --no-gui +``` + +Once you've done that, create a Vagrantfile that looks like the following: + +```rb +Vagrant.configure('2') do |config| + config.vm.box = 'macos-ci-base' + config.vm.boot_timeout = 600 +end +``` + +then, run the following in that vagrant directory: + +```sh +$ vagrant up +$ vagrant scp :clt.dmg +$ vagrant ssh -c 'hdiutil attach clt.dmg -mountpoint /Volumes/setup-installer' +$ vagrant ssh -c 'sudo installer -pkg "/Volumes/setup-installer/Command Line Tools.pkg" -target /' +$ vagrant ssh -c 'hdiutil detach /Volumes/setup-installer' +$ vagrant ssh -c '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"' +$ vagrant package +``` + +This will create a `package.box`, which is the box file for the base VM. +Then, you can `vagrant box add --name `, +and you'll have the base vcpkg box added for purposes of `Setup-VagrantMachines.ps1`! From de2e80cfdd39ab6e6d1ef54342b94a12ab037e53 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Fri, 18 Sep 2020 18:08:20 -0700 Subject: [PATCH 3/9] fix the vagrant scripts for the new box --- .../osx/Setup-VagrantMachines.ps1 | 51 +++++-- .../osx/configuration/VagrantFile | 139 ------------------ .../osx/configuration/Vagrantfile | 129 ++++++++++++++++ .../vagrant-configuration.schema.json | 19 +-- 4 files changed, 175 insertions(+), 163 deletions(-) delete mode 100644 scripts/azure-pipelines/osx/configuration/VagrantFile create mode 100644 scripts/azure-pipelines/osx/configuration/Vagrantfile diff --git a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 index 33f0095c80065b..7e4dc771053c33 100755 --- a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 +++ b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 @@ -10,12 +10,21 @@ Setup-VagrantMachines.ps1 sets up the virtual machines for vcpkg's macOS CI. It puts the VagrantFile and necessary configuration JSON file into ~/vagrant/vcpkg-eg-mac. -.PARAMETER Pat -The personal access token which has Read & Manage permissions on the ADO pool. +.PARAMETER MachineId +The number to give the machine; should match [0-9]{2}. + +.PARAMETER BoxVersion +The version of the box to use. .PARAMETER AgentPool The agent pool to add the machine to. +.PARAMETER DevopsUrl +The URL of the ADO instance; for example, https://dev.azure.com/vcpkg is the vcpkg ADO instance. + +.PARAMETER Pat +The personal access token which has Read & Manage permissions on the ADO pool. + .PARAMETER ArchivesUsername The username for the archives share. @@ -29,18 +38,19 @@ The URN of the archives share; looks like `foo.windows.core.net`. The archives share name. .PARAMETER BaseName -The base name for the vagrant VM; the machine name is $BaseName-$MachineIdentifiers. +The base name for the vagrant VM; the machine name is $BaseName-$MachineId. Defaults to 'vcpkg-eg-mac'. +.PARAMETER BoxName +The name of the box to use. Defaults to 'vcpkg/macos-ci', +which is only available internally. + .PARAMETER Force Delete any existing vagrant/vcpkg-eg-mac directory. .PARAMETER DiskSize The size to make the temporary disks in gigabytes. Defaults to 425. -.PARAMETER MachineIdentifiers -The numbers to give the machines; should match [0-9]{2}. - .INPUTS None @@ -50,11 +60,20 @@ None [CmdletBinding(PositionalBinding=$False)] Param( [Parameter(Mandatory=$True)] - [String]$Pat, + [String]$MachineId, + + [Parameter(Mandatory=$True)] + [String]$BoxVersion, [Parameter(Mandatory=$True)] [String]$AgentPool, + [Parameter(Mandatory=$True)] + [String]$DevopsUrl, + + [Parameter(Mandatory=$True)] + [String]$Pat, + [Parameter(Mandatory=$True)] [String]$ArchivesUsername, @@ -71,13 +90,13 @@ Param( [String]$BaseName = 'vcpkg-eg-mac', [Parameter()] - [Switch]$Force, + [String]$BoxName = 'vcpkg/macos-ci', [Parameter()] - [Int]$DiskSize = 425, + [Switch]$Force, - [Parameter(Mandatory=$True, ValueFromRemainingArguments)] - [String[]]$MachineIdentifiers + [Parameter()] + [Int]$DiskSize = 425 ) Set-StrictMode -Version 2 @@ -100,14 +119,16 @@ New-Item -ItemType 'Directory' -Path '~/vagrant' | Out-Null New-Item -ItemType 'Directory' -Path '~/vagrant/vcpkg-eg-mac' | Out-Null Copy-Item ` - -Path "$PSScriptRoot/configuration/VagrantFile" ` - -Destination '~/vagrant/vcpkg-eg-mac/VagrantFile' + -Path "$PSScriptRoot/configuration/Vagrantfile" ` + -Destination '~/vagrant/vcpkg-eg-mac/Vagrantfile' $configuration = @{ pat = $Pat; agent_pool = $AgentPool; - base_name = $BaseName; - machine_identifiers = $MachineIdentifiers; + devops_url = $DevopsUrl; + machine_name = "${BaseName}-${MachineId}"; + box_name = $BoxName; + box_version = $BoxVersion; disk_size = $DiskSize; archives = @{ username = $ArchivesUsername; diff --git a/scripts/azure-pipelines/osx/configuration/VagrantFile b/scripts/azure-pipelines/osx/configuration/VagrantFile deleted file mode 100644 index b87309dcbac6d0..00000000000000 --- a/scripts/azure-pipelines/osx/configuration/VagrantFile +++ /dev/null @@ -1,139 +0,0 @@ -require 'json' - -require "erb" -include ERB::Util - -configuration = JSON.parse(File.read('./vagrant-configuration.json')) - -servers = configuration['machine_identifiers'].map do |id| - { - :hostname => "#{configuration['base_name']}-#{id}", - :box => 'ramsey/macos-catalina', - :ram => 12000, - :cpu => 5 - } -end - -brew_formulas = [ - 'autoconf', - 'automake', - 'bison', - 'libtool', - 'mono', - 'pkg-config', - 'yasm' ] - -brew_cask_formulas = [ - 'powershell', - 'gfortran' ] - -azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.171.1/vsts-agent-osx-x64-2.171.1.tar.gz' -devops_url = 'https://dev.azure.com/vcpkg' -agent_pool = configuration['agent_pool'] -pat = configuration['pat'] -archives = configuration['archives'] -archives_url = "//#{archives['username']}:#{url_encode(archives['access_key'])}@#{archives['urn']}/#{archives['share']}" - -Vagrant.configure('2') do |config| - # give them extra time to boot up - config.vm.boot_timeout = 600 - - servers.each do |machine| - config.vm.define machine[:hostname] do |node| - - node.vm.box = machine[:box] - node.vm.hostname = machine[:hostname] - node.vm.synced_folder '.', '/vagrant', disabled: true - - diskname = "#{machine[:hostname]}-data.vmdk" - - # I don't like this, but as far as I can tell, it's the only way - # to do this. When vagrant finishes the `disk` feature, switch - # over to that -- Nicole Mazzuca - if (not File.exists? diskname) then - system "VBoxManage createmedium --filename #{diskname} --size #{1024 * 220}" - end - - node.vm.provider 'virtualbox' do |vb| - vb.memory = machine[:ram] - vb.cpus = machine[:cpu] - vb.customize ['modifyvm', :id, '--ioapic', 'on'] - vb.customize ['storageattach', :id, - '--storagectl', 'SATA Controller', - '--port', '1', '--device', '0', '--type', 'hdd', - '--medium', "#{diskname}" - ] - end - - node.vm.provision 'shell', - run: 'once', - name: 'Format and mount the data filesystem', - inline: 'diskutil partitionDisk /dev/disk0 1 GPT jhfs+ data 0', - privileged: true - - node.vm.provision 'shell', - run: 'once', - name: 'Link the data filesystem to the home directory', - inline: "ln -s /Volumes/data ~/Data", - privileged: false - - node.vm.provision 'shell', - run: 'once', - name: 'Download azure agent', - inline: "curl -s -o ~/Downloads/azure-agent.tar.gz #{azure_agent_url}", - privileged: false - - node.vm.provision 'shell', - run: 'once', - name: 'Unpack azure agent', - inline: 'mkdir myagent; cd myagent; tar xf ~/Downloads/azure-agent.tar.gz', - privileged: false - - node.vm.provision 'shell', - run: 'once', - name: 'Install brew and xcode command line tools', - inline: '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"', - privileged: false - - node.vm.provision 'shell', - run: 'once', - name: 'Install brew applications', - inline: "brew install #{brew_formulas.join(' ')} && brew cask install #{brew_cask_formulas.join(' ')}", - privileged: false - - node.vm.provision 'shell', - run: 'once', - name: 'Create archives mountpoint', - inline: 'mkdir ~/Data/archives', - privileged: false - - node.vm.provision "shell", - run: 'once', - name: 'Mount archives directory', - inline: "mount_smbfs -d 777 -f 777 #{archives_url} ~/Data/archives", - privileged: false - - node.vm.provision 'shell', - run: 'once', - name: 'Add VM to azure agent pool', - inline: "cd ~/myagent;\ - ./config.sh --unattended \ - --url #{devops_url} \ - --work ~/Data/work \ - --auth pat --token #{pat} \ - --pool #{agent_pool} \ - --agent `hostname` \ - --replace \ - --acceptTeeEula", - privileged: false - - # Start listening for jobs - node.vm.provision 'shell', - run: 'always', - name: 'Start running azure pipelines', - inline: 'cd /Users/vagrant/myagent;\ - nohup ./run.sh&', - privileged: false - end - end -end diff --git a/scripts/azure-pipelines/osx/configuration/Vagrantfile b/scripts/azure-pipelines/osx/configuration/Vagrantfile new file mode 100644 index 00000000000000..527f26f84fa2ec --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/Vagrantfile @@ -0,0 +1,129 @@ +require 'json' + +require "erb" +include ERB::Util + +configuration = JSON.parse(File.read('./vagrant-configuration.json')) + +server = { + :hostname => configuration['machine_name'], + :box => configuration['box_name'], + :box_version => configuration['box_version'], + :disk_size => configuration['disk_size'], + :ram => 12000, + :cpu => 5 +} + +brew_formulas = [ + 'autoconf', + 'automake', + 'bison', + 'libtool', + 'mono', + 'pkg-config', + 'yasm' ] + +brew_cask_formulas = [ + 'powershell', + 'gfortran' ] + +azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.171.1/vsts-agent-osx-x64-2.171.1.tar.gz' +devops_url = configuration['devops_url'] +agent_pool = configuration['agent_pool'] +pat = configuration['pat'] +archives = configuration['archives'] +archives_url = "//#{archives['username']}:#{url_encode(archives['access_key'])}@#{archives['urn']}/#{archives['share']}" + +Vagrant.configure('2') do |config| + # give them extra time to boot up + config.vm.boot_timeout = 600 + + config.vm.box = server[:box] + config.vm.box_version = server[:box_version] + config.vm.hostname = server[:hostname] + config.vm.synced_folder '.', '/vagrant', disabled: true + + diskname = "#{server[:hostname]}-data.vmdk" + + # I don't like this, but as far as I can tell, it's the only way + # to do this. When vagrant finishes the `disk` feature, switch + # over to that -- Nicole Mazzuca + if (not File.exists? diskname) then + system "VBoxManage createmedium --filename #{diskname} --size #{1024 * disk_size}" + end + + node.vm.provider 'virtualbox' do |vb| + vb.memory = server[:ram] + vb.cpus = server[:cpu] + vb.customize ['modifyvm', :id, '--ioapic', 'on'] + vb.customize ['storageattach', :id, + '--storagectl', 'SATA Controller', + '--port', '1', '--device', '0', '--type', 'hdd', + '--medium', "#{diskname}" + ] + end + + node.vm.provision 'shell', + run: 'once', + name: 'Format and mount the data filesystem', + inline: 'diskutil partitionDisk /dev/disk0 1 GPT jhfs+ data 0', + privileged: true + + node.vm.provision 'shell', + run: 'once', + name: 'Link the data filesystem to the home directory', + inline: "ln -s /Volumes/data ~/Data", + privileged: false + + node.vm.provision 'shell', + run: 'once', + name: 'Download azure agent', + inline: "curl -s -o ~/Downloads/azure-agent.tar.gz #{azure_agent_url}", + privileged: false + + node.vm.provision 'shell', + run: 'once', + name: 'Unpack azure agent', + inline: 'mkdir myagent; cd myagent; tar xf ~/Downloads/azure-agent.tar.gz', + privileged: false + + node.vm.provision 'shell', + run: 'once', + name: 'Install brew applications', + inline: "brew install #{brew_formulas.join(' ')} && brew cask install #{brew_cask_formulas.join(' ')}", + privileged: false + + node.vm.provision 'shell', + run: 'once', + name: 'Create archives mountpoint', + inline: 'mkdir ~/Data/archives', + privileged: false + + node.vm.provision "shell", + run: 'once', + name: 'Mount archives directory', + inline: "mount_smbfs -d 777 -f 777 #{archives_url} ~/Data/archives", + privileged: false + + node.vm.provision 'shell', + run: 'once', + name: 'Add VM to azure agent pool', + inline: "cd ~/myagent;\ + ./config.sh --unattended \ + --url #{devops_url} \ + --work ~/Data/work \ + --auth pat --token #{pat} \ + --pool #{agent_pool} \ + --agent `hostname` \ + --replace \ + --acceptTeeEula", + privileged: false + + # Start listening for jobs + node.vm.provision 'shell', + run: 'always', + name: 'Start running azure pipelines', + inline: 'cd /Users/vagrant/myagent;\ + nohup ./run.sh&', + privileged: false +end diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json b/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json index 456f579bf8de0a..d806f48619630a 100644 --- a/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json +++ b/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json @@ -18,20 +18,21 @@ "agent_pool": { "type": "string" }, - "base_name": { + "devops_url": { + "type": "string" + }, + "machine_name": { + "type": "string" + }, + "box_name": { + "type": "string" + }, + "box_version": { "type": "string" }, "disk_size": { "type": "integer" }, - "machine_identifiers": { - "type": "array", - - "items": { - "type": "string", - "pattern": "[0-9]{2}" - } - }, "archives": { "type": "object", "required": [ From a4640a5e2d7feb27122fc8fdf76872a79d9e8583 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Sat, 19 Sep 2020 10:48:29 -0700 Subject: [PATCH 4/9] finish fixing the setup --- .../osx/Setup-VagrantMachines.ps1 | 11 ++++++---- .../osx/configuration/Vagrantfile | 22 +++++++++---------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 index 7e4dc771053c33..22d2677d2346ae 100755 --- a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 +++ b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 @@ -105,17 +105,20 @@ if (-not $IsMacOS) { throw 'This script should only be run on a macOS host' } -if (Test-Path '~/vagrant') { +if (Test-Path '~/vagrant/vcpkg-eg-mac') { if ($Force) { Write-Host 'Deleting existing directories' - Remove-Item -Recurse -Force -Path '~/vagrant' | Out-Null + Remove-Item -Recurse -Force -Path '~/vagrant/vcpkg-eg-mac' | Out-Null } else { - throw '~/vagrant already exists; try re-running with -Force' + throw '~/vagrant/vcpkg-eg-mac already exists; try re-running with -Force' } } Write-Host 'Creating new directories' -New-Item -ItemType 'Directory' -Path '~/vagrant' | Out-Null +if (-not (Test-Path -Path '~/vagrant')) +{ + New-Item -ItemType 'Directory' -Path '~/vagrant' | Out-Null +} New-Item -ItemType 'Directory' -Path '~/vagrant/vcpkg-eg-mac' | Out-Null Copy-Item ` diff --git a/scripts/azure-pipelines/osx/configuration/Vagrantfile b/scripts/azure-pipelines/osx/configuration/Vagrantfile index 527f26f84fa2ec..91a59860c405d5 100644 --- a/scripts/azure-pipelines/osx/configuration/Vagrantfile +++ b/scripts/azure-pipelines/osx/configuration/Vagrantfile @@ -49,10 +49,10 @@ Vagrant.configure('2') do |config| # to do this. When vagrant finishes the `disk` feature, switch # over to that -- Nicole Mazzuca if (not File.exists? diskname) then - system "VBoxManage createmedium --filename #{diskname} --size #{1024 * disk_size}" + system "VBoxManage createmedium --filename #{diskname} --size #{1024 * server[:disk_size]}" end - node.vm.provider 'virtualbox' do |vb| + config.vm.provider 'virtualbox' do |vb| vb.memory = server[:ram] vb.cpus = server[:cpu] vb.customize ['modifyvm', :id, '--ioapic', 'on'] @@ -63,49 +63,49 @@ Vagrant.configure('2') do |config| ] end - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'once', name: 'Format and mount the data filesystem', inline: 'diskutil partitionDisk /dev/disk0 1 GPT jhfs+ data 0', privileged: true - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'once', name: 'Link the data filesystem to the home directory', inline: "ln -s /Volumes/data ~/Data", privileged: false - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'once', name: 'Download azure agent', inline: "curl -s -o ~/Downloads/azure-agent.tar.gz #{azure_agent_url}", privileged: false - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'once', name: 'Unpack azure agent', inline: 'mkdir myagent; cd myagent; tar xf ~/Downloads/azure-agent.tar.gz', privileged: false - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'once', name: 'Install brew applications', inline: "brew install #{brew_formulas.join(' ')} && brew cask install #{brew_cask_formulas.join(' ')}", privileged: false - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'once', name: 'Create archives mountpoint', inline: 'mkdir ~/Data/archives', privileged: false - node.vm.provision "shell", + config.vm.provision "shell", run: 'once', name: 'Mount archives directory', inline: "mount_smbfs -d 777 -f 777 #{archives_url} ~/Data/archives", privileged: false - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'once', name: 'Add VM to azure agent pool', inline: "cd ~/myagent;\ @@ -120,7 +120,7 @@ Vagrant.configure('2') do |config| privileged: false # Start listening for jobs - node.vm.provision 'shell', + config.vm.provision 'shell', run: 'always', name: 'Start running azure pipelines', inline: 'cd /Users/vagrant/myagent;\ From 4840d01a1f486d0afaf1766a8056d24ed105148c Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Mon, 21 Sep 2020 08:49:40 -0700 Subject: [PATCH 5/9] [mecab jxrlib] fix ports for CI mecab needed to use an actual ref that wasn't master, and jxrlib needed a patch for xcode 12 CLTs. Additionally, this fixes the mecab version to be a date, the date of the last commit, since `1.0` is not the correct version (mecab doesn't have released versions) --- .../0001-include-wchar.h-for-wcslen.patch | 24 +++++++++++++++++++ ports/jxrlib/CONTROL | 3 ++- ports/jxrlib/portfile.cmake | 8 ++++--- ports/mecab/CONTROL | 4 ++-- ports/mecab/portfile.cmake | 4 ++-- 5 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 ports/jxrlib/0001-include-wchar.h-for-wcslen.patch diff --git a/ports/jxrlib/0001-include-wchar.h-for-wcslen.patch b/ports/jxrlib/0001-include-wchar.h-for-wcslen.patch new file mode 100644 index 00000000000000..2d7f8bbe3d45ab --- /dev/null +++ b/ports/jxrlib/0001-include-wchar.h-for-wcslen.patch @@ -0,0 +1,24 @@ +From 9a8da6a23a03ff8dcd3339b5a06a01cdb0d8eb1f Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Mon, 21 Sep 2020 08:45:07 -0700 +Subject: [PATCH] include wchar.h for wcslen + +--- + jxrgluelib/JXRGlueJxr.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/jxrgluelib/JXRGlueJxr.c b/jxrgluelib/JXRGlueJxr.c +index 1745acf..f60a2e3 100644 +--- a/jxrgluelib/JXRGlueJxr.c ++++ b/jxrgluelib/JXRGlueJxr.c +@@ -27,6 +27,7 @@ + // + //*@@@---@@@@****************************************************************** + #include ++#include + #include + + +-- +2.28.0.windows.1 + diff --git a/ports/jxrlib/CONTROL b/ports/jxrlib/CONTROL index c92324b4ffce53..1a8fa60ba50408 100644 --- a/ports/jxrlib/CONTROL +++ b/ports/jxrlib/CONTROL @@ -1,4 +1,5 @@ Source: jxrlib -Version: 2019.10.9-1 +Version: 2019.10.9 +Port-Version: 2 Homepage: https://github.com/4creators/jxrlib Description: Open source implementation of the jpegxr image format standard. diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake index bf131d431b336a..382a73f6af37e8 100644 --- a/ports/jxrlib/portfile.cmake +++ b/ports/jxrlib/portfile.cmake @@ -8,14 +8,16 @@ vcpkg_from_github( REF f7521879862b9085318e814c6157490dd9dbbdb4 SHA512 f5617cbe73b6b905cc6bba181e6a3efedd59584f7a8c90e0f34db580cfdad4239a2ab753df4e221f26a5c0db51475b021052e3b9e3ab3673573573b1d57f3fdb HEAD_REF master + PATCHES + 0001-include-wchar.h-for-wcslen.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) if(NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Darwin AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Linux) - # The file guiddef.h is part of the Windows SDK, - # we then remove the local copy shipped with jxrlib - file(REMOVE ${SOURCE_PATH}/common/include/guiddef.h) + # The file guiddef.h is part of the Windows SDK, + # we then remove the local copy shipped with jxrlib + file(REMOVE ${SOURCE_PATH}/common/include/guiddef.h) endif() vcpkg_configure_cmake( diff --git a/ports/mecab/CONTROL b/ports/mecab/CONTROL index 9bf6cec343ea7f..f0bc5e15f55a03 100644 --- a/ports/mecab/CONTROL +++ b/ports/mecab/CONTROL @@ -1,4 +1,4 @@ Source: mecab -Version: 1.0 +Version: 2019-09-25 Description: A morphological analysis engine based on CRF -Supports: !(uwp|arm|arm64) \ No newline at end of file +Supports: !(uwp|arm|arm64) diff --git a/ports/mecab/portfile.cmake b/ports/mecab/portfile.cmake index b7b04aa0b83d0e..cd34455e8f65fc 100644 --- a/ports/mecab/portfile.cmake +++ b/ports/mecab/portfile.cmake @@ -7,7 +7,7 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taku910/mecab - REF master + REF 3a07c4eefaffb4e7a0690a7f4e5e0263d3ddb8a3 SHA512 2a7f1d159ddca846357b5bcab2d2b5de2e6a27dca4301cdd1cc52c155c352f9c7030b77d1187afe9c0a7f1b131a1acdcc40ee81ce7ba5c0fa6b2325c56676353 HEAD_REF master PATCHES @@ -27,4 +27,4 @@ vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/mecab/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mecab) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/mecab/COPYING ${CURRENT_PACKAGES_DIR}/share/mecab/copyright) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mecab/COPYING ${CURRENT_PACKAGES_DIR}/share/mecab/copyright) From 5881d87ebf8c67dd6c191617b890ecb5ee5135fb Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Tue, 22 Sep 2020 16:47:16 -0700 Subject: [PATCH 6/9] [many ports] fix compile with Xcode 12 CLTs This mostly means fixing errors on implicit-function-declaration, and removing some Werrors * alac-decoder * apr * argtable2 * arrow * hyperscan * mcpp * minizip * mosquitto * stormlib --- ports/alac-decoder/CMakeLists.txt | 2 + ports/alac-decoder/CONTROL | 3 +- ports/apr/CONTROL | 2 +- ports/apr/portfile.cmake | 1 + ...dirs.patch => 0001-fix-install-dirs.patch} | 23 +++-- .../0002-include-correct-headers.patch | 60 +++++++++++++ ports/argtable2/CONTROL | 3 +- ports/argtable2/portfile.cmake | 4 +- ports/arrow/CONTROL | 1 + ports/arrow/portfile.cmake | 1 + ports/hyperscan/0001-remove-Werror.patch | 27 ++++++ ports/hyperscan/portfile.cmake | 2 + ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch | 38 ++++++++ ports/mcpp/CONTROL | 3 +- ports/mcpp/portfile.cmake | 2 + .../0001-remove-ifndef-NOUNCRYPT.patch | 29 ++++++ .../0002-add-declaration-for-mkdir.patch | 29 ++++++ ports/minizip/CONTROL | 3 +- ports/minizip/minizip.patch | 16 ---- ports/minizip/portfile.cmake | 18 ++-- ...-add-archive-destination-to-install.patch} | 65 ++++++++------ ...4-cmake.patch => 0002-win64-support.patch} | 23 +++-- .../0003-add-find_package-libwebsockets.patch | 24 +++++ ....patch => 0004-support-static-build.patch} | 89 +++++++++++-------- ports/mosquitto/0005-add-mach.h-include.patch | 27 ++++++ ports/mosquitto/libwebsockets.patch | 12 --- ports/mosquitto/portfile.cmake | 9 +- ports/mosquitto/vcpkg.json | 2 +- ports/stormlib/CMakeLists.txt | 8 +- ports/stormlib/CONTROL | 3 +- 30 files changed, 405 insertions(+), 124 deletions(-) rename ports/argtable2/{fix-install-dirs.patch => 0001-fix-install-dirs.patch} (60%) create mode 100644 ports/argtable2/0002-include-correct-headers.patch create mode 100644 ports/hyperscan/0001-remove-Werror.patch create mode 100644 ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch create mode 100644 ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch create mode 100644 ports/minizip/0002-add-declaration-for-mkdir.patch delete mode 100644 ports/minizip/minizip.patch rename ports/mosquitto/{archive-dest.patch => 0001-add-archive-destination-to-install.patch} (77%) rename ports/mosquitto/{win64-cmake.patch => 0002-win64-support.patch} (61%) create mode 100644 ports/mosquitto/0003-add-find_package-libwebsockets.patch rename ports/mosquitto/{support-static-build.patch => 0004-support-static-build.patch} (63%) create mode 100644 ports/mosquitto/0005-add-mach.h-include.patch delete mode 100644 ports/mosquitto/libwebsockets.patch diff --git a/ports/alac-decoder/CMakeLists.txt b/ports/alac-decoder/CMakeLists.txt index 1d82fc4e540fb4..a7c62f6487a738 100644 --- a/ports/alac-decoder/CMakeLists.txt +++ b/ports/alac-decoder/CMakeLists.txt @@ -18,6 +18,8 @@ set (SRCS if(MSVC) add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32) +else() + add_compile_options(-Wno-error=implicit-function-declaration) endif() include_directories(.) diff --git a/ports/alac-decoder/CONTROL b/ports/alac-decoder/CONTROL index 10dfb641984b8b..e9bc6f606c046b 100644 --- a/ports/alac-decoder/CONTROL +++ b/ports/alac-decoder/CONTROL @@ -1,4 +1,5 @@ Source: alac-decoder -Version: 0.2-3 +Version: 0.2 +Port-Version: 4 Homepage: https://distfiles.macports.org/alac_decoder Description: ALAC C implementation of a decoder, written from reverse engineering the file format diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index 2c9c0c691cae7c..cf2c0079abb35c 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,6 +1,6 @@ Source: apr Version: 1.7.0 -Port-Version: 2 +Port-Version: 3 Homepage: https://apr.apache.org/ Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. Supports: !uwp diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 39f2370018299a..0d427fbe71d86c 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -64,6 +64,7 @@ else() else() message(STATUS "Configuring apr") endif() + set(ENV{CFLAGS} -Wno-error=implicit-function-declaration) vcpkg_configure_make( SOURCE_PATH "${SOURCE_PATH}" NO_DEBUG diff --git a/ports/argtable2/fix-install-dirs.patch b/ports/argtable2/0001-fix-install-dirs.patch similarity index 60% rename from ports/argtable2/fix-install-dirs.patch rename to ports/argtable2/0001-fix-install-dirs.patch index 5a9be4d72312cb..d852ffa624bbe4 100644 --- a/ports/argtable2/fix-install-dirs.patch +++ b/ports/argtable2/0001-fix-install-dirs.patch @@ -1,5 +1,14 @@ +From 6594abbd953d0e26105fd6c982990eb702f27804 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:22:00 -0700 +Subject: [PATCH 1/2] fix install dirs + +--- + src/CMakeLists.txt | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 3427487..a9b8be0 100644 +index 773c4c8..03e112c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,4 @@ @@ -15,10 +24,12 @@ index 3427487..a9b8be0 100644 -INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib) -SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d ) -\ No newline at end of file -+INSTALL(TARGETS argtable2 -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++INSTALL(TARGETS argtable2 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) +INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/argtable2/0002-include-correct-headers.patch b/ports/argtable2/0002-include-correct-headers.patch new file mode 100644 index 00000000000000..f2e4d5f5ab1231 --- /dev/null +++ b/ports/argtable2/0002-include-correct-headers.patch @@ -0,0 +1,60 @@ +From 271423adb2900c8bf4aad5d73d7ef1efbb5c35d8 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:17:18 -0700 +Subject: [PATCH 2/2] include correct headers + +--- + src/arg_date.c | 4 +++- + src/arg_int.c | 1 + + src/getopt.c | 1 + + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/arg_date.c b/src/arg_date.c +index 22b59e2..5004b42 100644 +--- a/src/arg_date.c ++++ b/src/arg_date.c +@@ -37,6 +37,8 @@ USA. + #include + #endif + ++#include ++ + #include "argtable2.h" + + /* local error codes */ +@@ -112,7 +114,7 @@ static void errorfn(struct arg_date *parent, FILE *fp, int errorcode, const char + char buff[200]; + + fprintf(fp,"illegal timestamp format \"%s\"\n",argval); +- bzero(&tm,sizeof(tm)); ++ memset(&tm, 0, sizeof(tm)); + strptime("1999-12-31 23:59:59","%F %H:%M:%S",&tm); + strftime(buff, sizeof(buff), parent->format, &tm); + printf("correct format is \"%s\"\n", buff); +diff --git a/src/arg_int.c b/src/arg_int.c +index 29c20e5..bc10012 100644 +--- a/src/arg_int.c ++++ b/src/arg_int.c +@@ -30,6 +30,7 @@ USA. + + #include "argtable2.h" + #include ++#include + + /* local error codes */ + enum {EMINCOUNT=1,EMAXCOUNT,EBADINT,EOVERFLOW}; +diff --git a/src/getopt.c b/src/getopt.c +index b208529..b13acc6 100644 +--- a/src/getopt.c ++++ b/src/getopt.c +@@ -47,6 +47,7 @@ + #endif + + #include ++#include + + /* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C +-- +2.24.3 (Apple Git-128) + diff --git a/ports/argtable2/CONTROL b/ports/argtable2/CONTROL index 6cdb294cfabde3..734b97342f6a65 100644 --- a/ports/argtable2/CONTROL +++ b/ports/argtable2/CONTROL @@ -1,4 +1,5 @@ Source: argtable2 -Version: 2.13-7 +Version: 2.13 +Port-Version: 8 Homepage: http://argtable.sourceforge.net Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss. diff --git a/ports/argtable2/portfile.cmake b/ports/argtable2/portfile.cmake index 05f3f015ce4814..cf394f65a8e6a3 100644 --- a/ports/argtable2/portfile.cmake +++ b/ports/argtable2/portfile.cmake @@ -6,7 +6,9 @@ vcpkg_from_sourceforge( REF argtable-2.13 FILENAME "argtable2-13.tar.gz" SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585 - PATCHES fix-install-dirs.patch + PATCHES + 0001-fix-install-dirs.patch + 0002-include-correct-headers.patch ) vcpkg_configure_cmake( diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index f8bb9cbd629a02..ed8a024cd49fda 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,5 +1,6 @@ Source: arrow Version: 1.0.1 +Port-Version: 1 Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, bzip2, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser, openssl, utf8proc Homepage: https://github.com/apache/arrow Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index 5e2f87f0b72ed6..28f11a6fdbc225 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -44,6 +44,7 @@ vcpkg_configure_cmake( -DARROW_WITH_BROTLI=ON -DARROW_WITH_UTF8PROC=ON -DPARQUET_REQUIRE_ENCRYPTION=ON + -DBUILD_WARNING_LEVEL=PRODUCTION ) vcpkg_install_cmake() diff --git a/ports/hyperscan/0001-remove-Werror.patch b/ports/hyperscan/0001-remove-Werror.patch new file mode 100644 index 00000000000000..0b3f53177fc738 --- /dev/null +++ b/ports/hyperscan/0001-remove-Werror.patch @@ -0,0 +1,27 @@ +From e2c0779de8096623be874c5fa0d275113b9d1204 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:44:36 -0700 +Subject: [PATCH] remove Werror + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83197af..d27eb76 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -235,8 +235,8 @@ else() + if (NOT RELEASE_BUILD) + # -Werror is most useful during development, don't potentially break + # release builds +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") +- set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") ++ #set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") ++ #set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") + endif() + + if (DISABLE_ASSERTS) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/hyperscan/portfile.cmake b/ports/hyperscan/portfile.cmake index 19144cca4f450b..a0640d292323bf 100644 --- a/ports/hyperscan/portfile.cmake +++ b/ports/hyperscan/portfile.cmake @@ -8,6 +8,8 @@ vcpkg_from_github( REF v${HYPERSCAN_VERSION} SHA512 e6ac2aef1f3efa1535c00d73fa590ea62fff4686c4ad3ee023d2e72c51896ca4616ec1b85d7c6f88ac7b42d92c3557b9c4bb3b51cfb796e20a79d53b28e53b6c HEAD_REF master + PATCHES + 0001-remove-Werror.patch ) vcpkg_find_acquire_program(PYTHON3) diff --git a/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch b/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch new file mode 100644 index 00000000000000..37f625ba5d0236 --- /dev/null +++ b/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch @@ -0,0 +1,38 @@ +From d2625f80e08ff811a173ca3dbe76a0e004c26c65 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 16:21:43 -0700 +Subject: [PATCH] fix _POSIX_C_SOURCE + +set it to correctly ask for 200112L, for readlink +--- + configed.H | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/configed.H b/configed.H +index 2e01c15..250f441 100644 +--- a/configed.H ++++ b/configed.H +@@ -189,19 +189,13 @@ + #define _POSIX_ 1 + #define _POSIX_SOURCE 1 + #ifndef _POSIX_C_SOURCE +-#define _POSIX_C_SOURCE 1 ++#define _POSIX_C_SOURCE 200112L + #define _POSIX_C_SOURCE_defined 1 + #endif + #include "limits.h" + #ifdef _AIX + #include "sys/stat.h" + #endif +-#undef _POSIX_ +-#undef _POSIX_SOURCE +-#ifdef _POSIX_C_SOURCE_defined +-#undef _POSIX_C_SOURCE +-#undef _POSIX_C_SOURCE_defined +-#endif + #define CHARBIT CHAR_BIT + #define UCHARMAX UCHAR_MAX + #define USHRTMAX USHRT_MAX +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mcpp/CONTROL b/ports/mcpp/CONTROL index cc756ae9a05644..dc607aeb04aaad 100644 --- a/ports/mcpp/CONTROL +++ b/ports/mcpp/CONTROL @@ -1,4 +1,5 @@ Source: mcpp -Version: 2.7.2.14-1 +Version: 2.7.2.14 +Port-Version: 2 Homepage: https://github.com/zeroc-ice/mcpp Description: Fork of mcpp, a C/C++ preprocessor diff --git a/ports/mcpp/portfile.cmake b/ports/mcpp/portfile.cmake index 11e268f99b3464..8e2928ea1ddb04 100644 --- a/ports/mcpp/portfile.cmake +++ b/ports/mcpp/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF e6abf9a561294b667bb931b80cf749c9be2d1a2f SHA512 131b68401683bcfb947ac4969a59aa4c1683412c30f76c50e9e9c5c952a881b9950127db2ef22c96968d8c90d26bcdb5a90fb1b77d4dda7dee67bfe4a2676b35 HEAD_REF master + PATCHES + 0001-fix-_POSIX_C_SOURCE.patch ) vcpkg_configure_cmake( diff --git a/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch b/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch new file mode 100644 index 00000000000000..d9c051d285bf4f --- /dev/null +++ b/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch @@ -0,0 +1,29 @@ +From a6fd3992d44053a523a67aa16f5ae88fecfb20e1 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:09:53 -0700 +Subject: [PATCH 1/2] remove `#ifndef NOUNCRYPT` + +enable decrypt support for password-encrypted ZIP files + +--- + contrib/minizip/unzip.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c +index bcfb941..1895a0f 100644 +--- a/contrib/minizip/unzip.c ++++ b/contrib/minizip/unzip.c +@@ -68,10 +68,6 @@ + #include + #include + +-#ifndef NOUNCRYPT +- #define NOUNCRYPT +-#endif +- + #include "zlib.h" + #include "unzip.h" + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/minizip/0002-add-declaration-for-mkdir.patch b/ports/minizip/0002-add-declaration-for-mkdir.patch new file mode 100644 index 00000000000000..8786a840ba85ba --- /dev/null +++ b/ports/minizip/0002-add-declaration-for-mkdir.patch @@ -0,0 +1,29 @@ +From 6c38b6f544b55f9fc554f0fe22e2cbaddfaed7f8 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:15:04 -0700 +Subject: [PATCH 2/2] add declaration for mkdir + +It's invalid in C99 to implicitly declare mkdir + +--- + contrib/minizip/miniunz.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c +index 3d65401..5341af2 100644 +--- a/contrib/minizip/miniunz.c ++++ b/contrib/minizip/miniunz.c +@@ -12,6 +12,10 @@ + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + */ + ++#if !defined(_WIN32) ++#include ++#endif ++ + #if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 +-- +2.24.3 (Apple Git-128) + diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL index 415a3a82cad755..d4fafd4fd4ae28 100644 --- a/ports/minizip/CONTROL +++ b/ports/minizip/CONTROL @@ -1,5 +1,6 @@ Source: minizip -Version: 1.2.11-6 +Version: 1.2.11 +Port-Version: 7 Build-Depends: zlib Homepage: https://github.com/madler/zlib Description: Zip compression library diff --git a/ports/minizip/minizip.patch b/ports/minizip/minizip.patch deleted file mode 100644 index 04ef8fa2fcc6eb..00000000000000 --- a/ports/minizip/minizip.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c -index f12e3329..bfc05f77 100644 ---- a/contrib/minizip/unzip.c -+++ b/contrib/minizip/unzip.c -@@ -68,10 +68,6 @@ - #include - #include - --#ifndef NOUNCRYPT -- #define NOUNCRYPT --#endif -- - #include "zlib.h" - #include "unzip.h" - - diff --git a/ports/minizip/portfile.cmake b/ports/minizip/portfile.cmake index c1df89ac8f7539..b70f26d9e4b12e 100644 --- a/ports/minizip/portfile.cmake +++ b/ports/minizip/portfile.cmake @@ -7,7 +7,9 @@ vcpkg_from_github( REF v1.2.11 SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf HEAD_REF master - PATCHES minizip.patch # enable decrypt support for password-encrypted ZIP files + PATCHES + 0001-remove-ifndef-NOUNCRYPT.patch + 0002-add-declaration-for-mkdir.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -18,13 +20,13 @@ configure_file(${CMAKE_CURRENT_LIST_DIR}/minizipConfig.cmake.in ${SOURCE_PATH}/ configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - ${FEATURE_OPTIONS} - OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=ON - -DDISABLE_INSTALL_TOOLS=ON + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON ) vcpkg_install_cmake() diff --git a/ports/mosquitto/archive-dest.patch b/ports/mosquitto/0001-add-archive-destination-to-install.patch similarity index 77% rename from ports/mosquitto/archive-dest.patch rename to ports/mosquitto/0001-add-archive-destination-to-install.patch index 40d6c1f6dbd856..5df6128edb6385 100644 --- a/ports/mosquitto/archive-dest.patch +++ b/ports/mosquitto/0001-add-archive-destination-to-install.patch @@ -1,26 +1,39 @@ -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index e1521f1..bd60b75 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -87,7 +87,7 @@ set_target_properties(libmosquitto PROPERTIES - SOVERSION 1 - ) - --install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") -+install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") - - if (WITH_STATIC_LIBRARIES) - add_library(libmosquitto_static STATIC ${C_SRC}) -diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt -index b39ac3f..5805244 100644 ---- a/lib/cpp/CMakeLists.txt -+++ b/lib/cpp/CMakeLists.txt -@@ -13,7 +13,7 @@ set_target_properties(mosquittopp PROPERTIES - VERSION ${VERSION} - SOVERSION 1 - ) --install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") -+install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") - - if (WITH_STATIC_LIBRARIES) - add_library(mosquittopp_static STATIC +From df5ec7ba4e7b1516a2636e47c33a4a6161b5c422 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:38:44 -0700 +Subject: [PATCH 1/5] add archive destination to install + +--- + lib/CMakeLists.txt | 2 +- + lib/cpp/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index e1521f1..bd60b75 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -87,7 +87,7 @@ set_target_properties(libmosquitto PROPERTIES + SOVERSION 1 + ) + +-install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + if (WITH_STATIC_LIBRARIES) + add_library(libmosquitto_static STATIC ${C_SRC}) +diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt +index b39ac3f..5805244 100644 +--- a/lib/cpp/CMakeLists.txt ++++ b/lib/cpp/CMakeLists.txt +@@ -13,7 +13,7 @@ set_target_properties(mosquittopp PROPERTIES + VERSION ${VERSION} + SOVERSION 1 + ) +-install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + if (WITH_STATIC_LIBRARIES) + add_library(mosquittopp_static STATIC +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/win64-cmake.patch b/ports/mosquitto/0002-win64-support.patch similarity index 61% rename from ports/mosquitto/win64-cmake.patch rename to ports/mosquitto/0002-win64-support.patch index 3fdb937006e9d3..8698db81a5cc03 100644 --- a/ports/mosquitto/win64-cmake.patch +++ b/ports/mosquitto/0002-win64-support.patch @@ -1,8 +1,18 @@ +From 675ba1de6c01b4050ae3cc60916d3f0a72b03105 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:40:55 -0700 +Subject: [PATCH 2/5] win64 support + +--- + CMakeLists.txt | 7 +------ + config.h | 2 +- + 2 files changed, 2 insertions(+), 7 deletions(-) + diff --git a/CMakeLists.txt b/CMakeLists.txt -index e58d072..e582a25 100644 +index e11959c..1a92fe3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -54,12 +54,7 @@ option(WITH_THREADING "Include client library threading support?" ON) +@@ -57,12 +57,7 @@ option(WITH_THREADING "Include client library threading support?" ON) if (WITH_THREADING) add_definitions("-DWITH_THREADING") if (WIN32) @@ -17,15 +27,18 @@ index e58d072..e582a25 100644 find_library(LIBPTHREAD pthread) if (LIBPTHREAD) diff --git a/config.h b/config.h -index b7a7616..bceb92a 100644 +index 5cce39e..c673bf4 100644 --- a/config.h +++ b/config.h -@@ -27,7 +27,7 @@ +@@ -31,7 +31,7 @@ # define EPROTO ECONNABORTED #endif -#ifdef WIN32 -+#if defined(WIN32) || defined(WIN64) ++#ifdef _WIN32 # ifndef strcasecmp # define strcasecmp strcmpi # endif +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/0003-add-find_package-libwebsockets.patch b/ports/mosquitto/0003-add-find_package-libwebsockets.patch new file mode 100644 index 00000000000000..b167b0da51f2a2 --- /dev/null +++ b/ports/mosquitto/0003-add-find_package-libwebsockets.patch @@ -0,0 +1,24 @@ +From 902ab5bf91937188d3ebf0aece81a704729e5580 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:42:53 -0700 +Subject: [PATCH 3/5] add find_package libwebsockets + +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1a92fe3..3c78b2c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,6 +45,7 @@ endif (WITH_TLS) + + option(WITH_SOCKS "Include SOCKS5 support?" ON) + if (WITH_SOCKS) ++ find_package(Libwebsockets CONFIG REQUIRED) + add_definitions("-DWITH_SOCKS") + endif (WITH_SOCKS) + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/support-static-build.patch b/ports/mosquitto/0004-support-static-build.patch similarity index 63% rename from ports/mosquitto/support-static-build.patch rename to ports/mosquitto/0004-support-static-build.patch index 28d7d779aacb14..55606e7d5de29e 100644 --- a/ports/mosquitto/support-static-build.patch +++ b/ports/mosquitto/0004-support-static-build.patch @@ -1,38 +1,51 @@ -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index bd60b75..cc01a2a 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -60,7 +60,7 @@ if (UNIX AND NOT APPLE) - endif (UNIX AND NOT APPLE) - - if (WIN32) -- set (LIBRARIES ${LIBRARIES} ws2_32) -+ set (LIBRARIES ${LIBRARIES} ws2_32 crypt32) - endif (WIN32) - - if (WITH_SRV) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 7898ff5..23b3fe8 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -158,7 +158,7 @@ if (UNIX) - endif (UNIX) - - if (WIN32) -- set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32) -+ set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32 crypt32) - endif (WIN32) - - if (WITH_WEBSOCKETS) -@@ -189,6 +189,10 @@ install(FILES mosquitto_broker.h mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL - - if (WITH_TLS) - add_executable(mosquitto_passwd mosquitto_passwd.c) -- target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) -+ if(WIN32) -+ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES} ws2_32 crypt32) -+ else() -+ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) -+ endif() - install(TARGETS mosquitto_passwd RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") - endif (WITH_TLS) +From 4bb19e77e95bc505d32e098190ffbf056810017c Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:44:42 -0700 +Subject: [PATCH 4/5] support static build + +--- + lib/CMakeLists.txt | 2 +- + src/CMakeLists.txt | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index bd60b75..cc01a2a 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -60,7 +60,7 @@ if (UNIX AND NOT APPLE) + endif (UNIX AND NOT APPLE) + + if (WIN32) +- set (LIBRARIES ${LIBRARIES} ws2_32) ++ set (LIBRARIES ${LIBRARIES} ws2_32 crypt32) + endif (WIN32) + + if (WITH_SRV) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7898ff5..f066aea 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -158,7 +158,7 @@ if (UNIX) + endif (UNIX) + + if (WIN32) +- set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32) ++ set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32 crypt32) + endif (WIN32) + + if (WITH_WEBSOCKETS) +@@ -189,6 +189,10 @@ install(FILES mosquitto_broker.h mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL + + if (WITH_TLS) + add_executable(mosquitto_passwd mosquitto_passwd.c) +- target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) ++ if(WIN32) ++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES} ws2_32 crypt32) ++ else() ++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) ++ endif() + install(TARGETS mosquitto_passwd RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + endif (WITH_TLS) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/0005-add-mach.h-include.patch b/ports/mosquitto/0005-add-mach.h-include.patch new file mode 100644 index 00000000000000..b01ff534b04608 --- /dev/null +++ b/ports/mosquitto/0005-add-mach.h-include.patch @@ -0,0 +1,27 @@ +From af7d62dceb064b5a8458616536bc27329ad236b1 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:46:06 -0700 +Subject: [PATCH 5/5] add mach.h include + +--- + lib/mosquitto.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/mosquitto.c b/lib/mosquitto.c +index 795013e..cd00513 100644 +--- a/lib/mosquitto.c ++++ b/lib/mosquitto.c +@@ -33,6 +33,10 @@ Contributors: + #include "packet_mosq.h" + #include "will_mosq.h" + ++#if defined(__APPLE__) ++#include ++#endif ++ + + void mosquitto__destroy(struct mosquitto *mosq); + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/libwebsockets.patch b/ports/mosquitto/libwebsockets.patch deleted file mode 100644 index 647ff5d70034a6..00000000000000 --- a/ports/mosquitto/libwebsockets.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 473931c8f..a8aa78e5d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -45,6 +45,7 @@ endif (WITH_TLS) - - option(WITH_SOCKS "Include SOCKS5 support?" ON) - if (WITH_SOCKS) -+ find_package(Libwebsockets CONFIG REQUIRED) - add_definitions("-DWITH_SOCKS") - endif (WITH_SOCKS) - diff --git a/ports/mosquitto/portfile.cmake b/ports/mosquitto/portfile.cmake index 8c83401c94e366..bf832107b73e99 100644 --- a/ports/mosquitto/portfile.cmake +++ b/ports/mosquitto/portfile.cmake @@ -5,10 +5,11 @@ vcpkg_from_github( SHA512 c192b53f52ce9dc8e02d31acd9e93c00cafbe543b038d7619e6b653f102126872bbd485c94604bca9287e71a5dfe0de2f4d8d3f51cdd5c37f90fd2a6535bd89b HEAD_REF master PATCHES - archive-dest.patch - win64-cmake.patch - libwebsockets.patch - support-static-build.patch + 0001-add-archive-destination-to-install.patch + 0002-win64-support.patch + 0003-add-find_package-libwebsockets.patch + 0004-support-static-build.patch + 0005-add-mach.h-include.patch ) vcpkg_configure_cmake( diff --git a/ports/mosquitto/vcpkg.json b/ports/mosquitto/vcpkg.json index 2e3654754bd238..4f0c6163406475 100644 --- a/ports/mosquitto/vcpkg.json +++ b/ports/mosquitto/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mosquitto", "version-string": "1.6.8", - "port-version": 2, + "port-version": 3, "description": "Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1, MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model, This makes it suitable for machine to machine messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino", "homepage": "https://mosquitto.org/download/", "dependencies": [ diff --git a/ports/stormlib/CMakeLists.txt b/ports/stormlib/CMakeLists.txt index 6a85775b5dfd5d..e8bf793abf1c1c 100644 --- a/ports/stormlib/CMakeLists.txt +++ b/ports/stormlib/CMakeLists.txt @@ -268,6 +268,12 @@ if(WIN32) target_compile_definitions(stormlib PRIVATE UNICODE _UNICODE) endif() +if(NOT MSVC) + # don't error on implicit declarations, which are invalid in C99 but commonly used + target_compile_options(stormlib PRIVATE -Wno-error=implicit-function-declaration) +endif() + + set_target_properties(stormlib PROPERTIES PUBLIC_HEADER "src/StormLib.h;src/StormPort.h") install(TARGETS stormlib EXPORT stormlibConfig @@ -277,4 +283,4 @@ install(TARGETS stormlib EXPORT stormlibConfig PUBLIC_HEADER DESTINATION include ) -install(EXPORT stormlibConfig NAMESPACE stormlib:: DESTINATION share/stormlib) \ No newline at end of file +install(EXPORT stormlibConfig NAMESPACE stormlib:: DESTINATION share/stormlib) diff --git a/ports/stormlib/CONTROL b/ports/stormlib/CONTROL index 7f1513b78ccb02..4a38c9f3d07651 100644 --- a/ports/stormlib/CONTROL +++ b/ports/stormlib/CONTROL @@ -1,4 +1,5 @@ Source: stormlib -Version: 2019-05-10-1 +Version: 2019-05-10 +Port-Version: 2 Build-Depends: zlib, bzip2 Description: StormLib is a library for opening and manipulating Blizzard MPQ files From 0b05f7c7d9f34f37d257363d0fa8609a5fb85ed5 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 23 Sep 2020 11:52:35 -0700 Subject: [PATCH 7/9] [many ports] even more Xcode 12 CLT fixes --- ports/bde/CONTROL | 3 +- ports/bde/portfile.cmake | 6 +- ports/binn/0001_fix_uwp.patch | 65 ++++--------------- ports/binn/CONTROL | 3 +- .../0001-correct-headers-for-getcwd.patch | 40 ++++++++++++ ports/cfitsio/CONTROL | 3 +- ports/cfitsio/portfile.cmake | 4 +- ports/chromium-base/CONTROL | 3 +- ports/chromium-base/portfile.cmake | 5 +- ports/cspice/CMakeLists.txt | 1 + ports/cspice/CONTROL | 4 +- ports/fmilib/0001-remove-install-prefix.patch | 12 ++++ .../0002-include-sys-stat.h-for-mkdir.patch | 33 ++++++++++ ports/fmilib/CONTROL | 3 +- ports/fmilib/portfile.cmake | 1 + ports/gdal/CONTROL | 4 +- ports/gdal/portfile.cmake | 2 + ...pack.patch => 0001-use-old-pem-pack.patch} | 16 +++++ ports/licensepp/0002-fix-cmake.patch | 38 +++++++++++ ports/licensepp/CONTROL | 1 + ports/licensepp/fix-cmake.patch | 25 ------- ports/licensepp/portfile.cmake | 11 +--- ports/mecab/CONTROL | 1 + ports/mecab/portfile.cmake | 2 +- .../0001-include-unistd-for-gete-ug-id.patch | 27 ++++++++ ports/opencl/portfile.cmake | 2 + ports/unixodbc/CONTROL | 3 +- ports/unixodbc/portfile.cmake | 1 + 28 files changed, 215 insertions(+), 104 deletions(-) create mode 100644 ports/cfitsio/0001-correct-headers-for-getcwd.patch create mode 100644 ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch rename ports/licensepp/{use-old-pem-pack.patch => 0001-use-old-pem-pack.patch} (50%) create mode 100644 ports/licensepp/0002-fix-cmake.patch delete mode 100644 ports/licensepp/fix-cmake.patch create mode 100644 ports/opencl/0001-include-unistd-for-gete-ug-id.patch diff --git a/ports/bde/CONTROL b/ports/bde/CONTROL index 8fd05f2d040093..10accadc9f8b90 100644 --- a/ports/bde/CONTROL +++ b/ports/bde/CONTROL @@ -1,3 +1,4 @@ Source: bde -Version: 3.2.0.0-1 +Version: 3.2.0.0 +Port-Version: 2 Description: Basic Development Environment - a set of foundational C++ libraries used at Bloomberg. diff --git a/ports/bde/portfile.cmake b/ports/bde/portfile.cmake index c3aed42fe2ef74..3acdd38205aef1 100644 --- a/ports/bde/portfile.cmake +++ b/ports/bde/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --library-type=static) @@ -58,8 +56,10 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") else() message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME) +if(VCPKG_TARGET_IS_WINDOWS) set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --msvc-runtime-type=static) +else() + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") endif() # Configure debug diff --git a/ports/binn/0001_fix_uwp.patch b/ports/binn/0001_fix_uwp.patch index c4f0b6658733a7..f43cdd2c85f5ac 100644 --- a/ports/binn/0001_fix_uwp.patch +++ b/ports/binn/0001_fix_uwp.patch @@ -2,27 +2,22 @@ diff --git a/src/binn.c b/src/binn.c index ef32f35..d12d473 100644 --- a/src/binn.c +++ b/src/binn.c -@@ -142,8 +142,8 @@ BINN_PRIVATE void copy_be64(u64 *pdest, u64 *psource) { +@@ -142,8 +142,14 @@ BINN_PRIVATE void copy_be64(u64 *pdest, u64 *psource) { /***************************************************************************/ #ifndef WIN32 --#define stricmp strcasecmp --#define strnicmp strncasecmp -+#define _stricmp strcasecmp -+#define _strnicmp strncasecmp + #define stricmp strcasecmp + #define strnicmp strncasecmp ++#define sprintf_s(b, n, ...) sprintf(b, __VA_ARGS__) ++#define strcpy_s(b, n, s) strcpy(b, s) ++#else ++#define stricmp _stricmp ++#define strnicmp _strnicmp ++#define strdup _strdup #endif BINN_PRIVATE BOOL IsValidBinnHeader(void *pbuf, int *ptype, int *pcount, int *psize, int *pheadersize); -@@ -614,7 +614,7 @@ BINN_PRIVATE unsigned char * SearchForKey(unsigned char *p, int header_size, int - if (p > plimit) break; - // Compare if the strings are equal. - if (len > 0) { -- if (strnicmp((char*)p, key, len) == 0) { // note that there is no null terminator here -+ if (_strnicmp((char*)p, key, len) == 0) { // note that there is no null terminator here - if (keylen == len) { - p += len; - return p; -@@ -1582,6 +1582,7 @@ BINN_PRIVATE BOOL binn_read_pair(int expected_type, void *ptr, int pos, int *pid +@@ -1582,6 +1588,7 @@ BINN_PRIVATE BOOL binn_read_pair(int expected_type, void *ptr, int pos, int *pid base = p; plimit = p + size - 1; p += header_size; @@ -30,40 +25,16 @@ index ef32f35..d12d473 100644 for (i = 0; i < count; i++) { switch (type) { -@@ -3147,15 +3148,15 @@ BINN_PRIVATE BOOL is_bool_str(char *str, BOOL *pbool) { - - if (str == NULL || pbool == NULL) return FALSE; - -- if (stricmp(str, "true") == 0) goto loc_true; -- if (stricmp(str, "yes") == 0) goto loc_true; -- if (stricmp(str, "on") == 0) goto loc_true; -- //if (stricmp(str, "1") == 0) goto loc_true; -+ if (_stricmp(str, "true") == 0) goto loc_true; -+ if (_stricmp(str, "yes") == 0) goto loc_true; -+ if (_stricmp(str, "on") == 0) goto loc_true; -+ //if (_stricmp(str, "1") == 0) goto loc_true; - -- if (stricmp(str, "false") == 0) goto loc_false; -- if (stricmp(str, "no") == 0) goto loc_false; -- if (stricmp(str, "off") == 0) goto loc_false; -- //if (stricmp(str, "0") == 0) goto loc_false; -+ if (_stricmp(str, "false") == 0) goto loc_false; -+ if (_stricmp(str, "no") == 0) goto loc_false; -+ if (_stricmp(str, "off") == 0) goto loc_false; -+ //if (_stricmp(str, "0") == 0) goto loc_false; - - if (is_integer(str)) { - vint = atoi64(str); -@@ -3333,7 +3334,7 @@ char * APIENTRY binn_get_str(binn *value) { +@@ -3333,7 +3340,7 @@ char * APIENTRY binn_get_str(binn *value) { if (type_family(value->type) == BINN_FAMILY_INT) { if (copy_int_value(value->ptr, &vint, value->type, BINN_INT64) == FALSE) return NULL; - sprintf(buf, "%" INT64_FORMAT, vint); -+ sprintf_s(buf, "%" INT64_FORMAT, vint); ++ sprintf_s(buf, sizeof buf, "%" INT64_FORMAT, vint); goto loc_convert_value; } -@@ -3341,15 +3342,15 @@ char * APIENTRY binn_get_str(binn *value) { +@@ -3341,14 +3348,14 @@ char * APIENTRY binn_get_str(binn *value) { case BINN_FLOAT: value->vdouble = value->vfloat; case BINN_DOUBLE: @@ -81,13 +52,3 @@ index ef32f35..d12d473 100644 + strcpy_s(buf, sizeof buf, "false"); goto loc_convert_value; } - -@@ -3358,7 +3359,7 @@ char * APIENTRY binn_get_str(binn *value) { - loc_convert_value: - - //value->vint64 = 0; -- value->ptr = strdup(buf); -+ value->ptr = _strdup(buf); - if (value->ptr == NULL) return NULL; - value->freefn = free; - value->type = BINN_STRING; diff --git a/ports/binn/CONTROL b/ports/binn/CONTROL index f0c5dc45a4319d..0e0cc1ac431c96 100644 --- a/ports/binn/CONTROL +++ b/ports/binn/CONTROL @@ -1,3 +1,4 @@ Source: binn Version: 2.0 -Description: Binn is a binary data serialization format designed to be compact, fast and easy to use. \ No newline at end of file +Port-Version: 1 +Description: Binn is a binary data serialization format designed to be compact, fast and easy to use. diff --git a/ports/cfitsio/0001-correct-headers-for-getcwd.patch b/ports/cfitsio/0001-correct-headers-for-getcwd.patch new file mode 100644 index 00000000000000..afd63b61ae4614 --- /dev/null +++ b/ports/cfitsio/0001-correct-headers-for-getcwd.patch @@ -0,0 +1,40 @@ +From 67400fcbd3ab2f7e68a8e7a60139b1b615debae2 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:27:43 -0700 +Subject: [PATCH] correct headers for getcwd + +--- + fitsio.h | 3 +++ + group.c | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/fitsio.h b/fitsio.h +index ec26d9d..792bb95 100644 +--- a/fitsio.h ++++ b/fitsio.h +@@ -39,6 +39,9 @@ SERVICES PROVIDED HEREUNDER." + #define CFITSIO_MAJOR 3 + #define CFITSIO_SONAME 5 + ++/* Required for getcwd() */ ++#define _POSIX_C_SOURCE 200112L ++ + /* the SONAME is incremented in a new release if the binary shared */ + /* library (on linux and Mac systems) is not backward compatible */ + /* with the previous release of CFITSIO */ +diff --git a/group.c b/group.c +index 9326c57..cec0f6a 100644 +--- a/group.c ++++ b/group.c +@@ -24,7 +24,7 @@ + #include /* defines the getcwd function on Windows PCs */ + #endif + +-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(HAVE_UNISTD_H) ++#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(HAVE_UNISTD_H) + #include /* needed for getcwd prototype on unix machines */ + #endif + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL index c46eaadfe0a288..e7a63830367fcc 100644 --- a/ports/cfitsio/CONTROL +++ b/ports/cfitsio/CONTROL @@ -1,4 +1,5 @@ Source: cfitsio -Version: 3.410-3 +Version: 3.410 +Port-Version: 4 Homepage: https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake index c14b6743c0f81d..12e3e2d4af6bdb 100644 --- a/ports/cfitsio/portfile.cmake +++ b/ports/cfitsio/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz" FILENAME "cfitsio3410.tar.gz" @@ -9,6 +7,8 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} + PATCHES + 0001-correct-headers-for-getcwd.patch ) vcpkg_configure_cmake( diff --git a/ports/chromium-base/CONTROL b/ports/chromium-base/CONTROL index 91b0590181f5af..589f60a26ac58c 100644 --- a/ports/chromium-base/CONTROL +++ b/ports/chromium-base/CONTROL @@ -1,5 +1,6 @@ Source: chromium-base Version: 86.0.4199.1 +Port-Version: 1 Homepage: https://chromium.googlesource.com/chromium/src Description: Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web. -Supports: x64 & (osx|windows|linux) & !uwp \ No newline at end of file +Supports: x64 & (osx|windows|linux) & !uwp diff --git a/ports/chromium-base/portfile.cmake b/ports/chromium-base/portfile.cmake index 409c2d589eaa06..6f6d9728cd6b1b 100644 --- a/ports/chromium-base/portfile.cmake +++ b/ports/chromium-base/portfile.cmake @@ -68,7 +68,8 @@ file(COPY "${RES}/test_fonts" DESTINATION "${SOURCE_PATH}/third_party") set(OPTIONS "\ use_custom_libcxx=false \ clang_use_chrome_plugins=false \ - forbid_non_component_debug_builds=false") + forbid_non_component_debug_builds=false \ + treat_warnings_as_errors=false") set(DEFINITIONS "") if(WIN32) @@ -76,7 +77,7 @@ if(WIN32) # https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk SET(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) set(ENV{DEPOT_TOOLS_WIN_TOOLCHAIN} 0) - set(OPTIONS "${OPTIONS} treat_warnings_as_errors=false use_lld=false") + set(OPTIONS "${OPTIONS} use_lld=false") endif() if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux) diff --git a/ports/cspice/CMakeLists.txt b/ports/cspice/CMakeLists.txt index af5c3e22b15a82..0ccfcfab604a4b 100644 --- a/ports/cspice/CMakeLists.txt +++ b/ports/cspice/CMakeLists.txt @@ -24,6 +24,7 @@ elseif (UNIX) elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) target_compile_options(cspice PUBLIC -m32 -ansi -fPIC) endif() + target_compile_options(cspice PRIVATE -Wno-error=implicit-function-declaration) endif () if (NOT _SKIP_HEADERS) diff --git a/ports/cspice/CONTROL b/ports/cspice/CONTROL index bb83e586d2ae9b..310fbe48b3c11a 100644 --- a/ports/cspice/CONTROL +++ b/ports/cspice/CONTROL @@ -1,6 +1,6 @@ Source: cspice Version: 66 -Port-Version: 2 +Port-Version: 3 Homepage: https://naif.jpl.nasa.gov/naif/toolkit_C.html Description: NASA C SPICE toolkit -Supports: !uwp \ No newline at end of file +Supports: !uwp diff --git a/ports/fmilib/0001-remove-install-prefix.patch b/ports/fmilib/0001-remove-install-prefix.patch index b54c903d74c348..42ba75701e5a15 100644 --- a/ports/fmilib/0001-remove-install-prefix.patch +++ b/ports/fmilib/0001-remove-install-prefix.patch @@ -1,3 +1,12 @@ +From 04bb359c724308e30268840c64932ea1d05b9077 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:00:23 -0700 +Subject: [PATCH 1/2] remove install prefix + +--- + CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + diff --git a/CMakeLists.txt b/CMakeLists.txt index f7372bf..f3c11f1 100644 --- a/CMakeLists.txt @@ -34,3 +43,6 @@ index f7372bf..f3c11f1 100644 set(DOXYFILE_STRIP_FROM_PATH "${FMILIBRARYHOME}") +-- +2.24.3 (Apple Git-128) + diff --git a/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch b/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch new file mode 100644 index 00000000000000..d4012d2c04fc06 --- /dev/null +++ b/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch @@ -0,0 +1,33 @@ +From 080876bf3735efeedaab0b211d2be7b3c3524d97 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:03:30 -0700 +Subject: [PATCH 2/2] include sys/stat.h for mkdir + +--- + ThirdParty/Minizip/minizip/miniunz.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ThirdParty/Minizip/minizip/miniunz.c b/ThirdParty/Minizip/minizip/miniunz.c +index 2264705..e0167d5 100644 +--- a/ThirdParty/Minizip/minizip/miniunz.c ++++ b/ThirdParty/Minizip/minizip/miniunz.c +@@ -53,6 +53,7 @@ + #else + # include + # include ++# include + #endif + + +@@ -141,7 +142,7 @@ int mymkdir(dirname) + ret = mkdir (dirname,0775); + #elif __APPLE__ + ret = mkdir (dirname,0775); +-#else ++#else + #error Unknown platform + #endif + return ret; +-- +2.24.3 (Apple Git-128) + diff --git a/ports/fmilib/CONTROL b/ports/fmilib/CONTROL index 4a837377d8cc80..b5a0517c33819b 100644 --- a/ports/fmilib/CONTROL +++ b/ports/fmilib/CONTROL @@ -1,4 +1,5 @@ Source: fmilib -Version: 2.0.3-2 +Version: 2.0.3 +Port-Version: 3 Description: FMI library is intended as a foundation for applications interfacing FMUs (Functional Mockup Units) that follow FMI Standard. This version of the library supports FMI 1.0 and FMI2.0. Homepage: https://www.fmi-standard.org/ diff --git a/ports/fmilib/portfile.cmake b/ports/fmilib/portfile.cmake index 39b0e0377c5509..0f3a4f290d8823 100644 --- a/ports/fmilib/portfile.cmake +++ b/ports/fmilib/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} PATCHES 0001-remove-install-prefix.patch + 0002-include-sys-stat.h-for-mkdir.patch ) # Note that if you have configured and built both static and shared library on Windows diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 531811ecc1025c..36d3510fc4a2f9 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,6 +1,6 @@ Source: gdal Version: 2.4.1 -Port-Version: 11 +Port-Version: 12 Homepage: https://gdal.org/ Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib @@ -12,4 +12,4 @@ Description: Add mysql support using libmariadb Feature: libspatialite Build-Depends: libspatialite -Description: Create or update SpatiaLite databases using libspatialite \ No newline at end of file +Description: Create or update SpatiaLite databases using libspatialite diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 298dd06880310c..aabd95f53febb8 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -349,6 +349,8 @@ elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STRE if (NOT MAKE) message(FATAL_ERROR "MAKE not found") endif() + + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") ################ diff --git a/ports/licensepp/use-old-pem-pack.patch b/ports/licensepp/0001-use-old-pem-pack.patch similarity index 50% rename from ports/licensepp/use-old-pem-pack.patch rename to ports/licensepp/0001-use-old-pem-pack.patch index d7c05edaeb9d94..37656f61323433 100644 --- a/ports/licensepp/use-old-pem-pack.patch +++ b/ports/licensepp/0001-use-old-pem-pack.patch @@ -1,3 +1,16 @@ +From d1b446c7a69344cb53be6692cd76186960a1428d Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 09:40:32 -0700 +Subject: [PATCH 1/2] use old pem pack + +In this commit: https://github.com/noloader/cryptopp-pem/commit/0cfa60820ec1d5e8ac4d77a0a8786ee43e9a2400 +the parameter orders have been changed. +But we cannot update pem-pack to this version or newer because it +wont compile with the current version of cryptopp in vcpkg. +--- + src/external/Ripe.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/src/external/Ripe.cc b/src/external/Ripe.cc index 6ff9561..a1d1eec 100644 --- a/src/external/Ripe.cc @@ -11,3 +24,6 @@ index 6ff9561..a1d1eec 100644 } snk.MessageEnd(); } +-- +2.24.3 (Apple Git-128) + diff --git a/ports/licensepp/0002-fix-cmake.patch b/ports/licensepp/0002-fix-cmake.patch new file mode 100644 index 00000000000000..5f13d03e1855f8 --- /dev/null +++ b/ports/licensepp/0002-fix-cmake.patch @@ -0,0 +1,38 @@ +From 5a7cbbe8423ee3daf533bcc1fefa7d1f1315634c Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 09:43:37 -0700 +Subject: [PATCH 2/2] fix cmake + +Remove this patch if https://github.com/amrayn/licensepp/pull/33 is merged +--- + CMakeLists.txt | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2c39d1..0d49632 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,10 +35,8 @@ if (APPLE) + endif() + endif() + +-if(MSVC) +- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 ") +-else() +- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 -Wall -Werror ") ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -Wall") + endif() + + # Check for cryptopp (static) +@@ -73,6 +71,7 @@ endif() + set_target_properties (licensepp-lib PROPERTIES + VERSION ${LICENSEPP_SOVERSION} + ) ++target_include_directories(licensepp-lib PUBLIC $) + target_link_libraries (licensepp-lib + ${CRYPTOPP_LIBRARIES} + ) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/licensepp/CONTROL b/ports/licensepp/CONTROL index c21d13b4adda6c..b9bf20b7b970c1 100644 --- a/ports/licensepp/CONTROL +++ b/ports/licensepp/CONTROL @@ -1,5 +1,6 @@ Source: licensepp Version: 2020-05-19 +Port-Version: 1 Description: Cross platform software licensing library Build-Depends: cryptopp[pem-pack] Supports: !uwp diff --git a/ports/licensepp/fix-cmake.patch b/ports/licensepp/fix-cmake.patch deleted file mode 100644 index f421b6d922bb6a..00000000000000 --- a/ports/licensepp/fix-cmake.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" -index b2c39d1..24a6866 100644 ---- "a/CMakeLists.txt" -+++ "b/CMakeLists.txt" -@@ -35,10 +35,8 @@ if (APPLE) - endif() - endif() - --if(MSVC) -- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 ") --else() -- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 -Wall -Werror ") -+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -Wall -Werror") - endif() - - # Check for cryptopp (static) -@@ -73,6 +71,7 @@ endif() - set_target_properties (licensepp-lib PROPERTIES - VERSION ${LICENSEPP_SOVERSION} - ) -+target_include_directories (licensepp-lib PUBLIC $) - target_link_libraries (licensepp-lib - ${CRYPTOPP_LIBRARIES} - ) diff --git a/ports/licensepp/portfile.cmake b/ports/licensepp/portfile.cmake index 171b26fcc3f587..aa4d009695228f 100644 --- a/ports/licensepp/portfile.cmake +++ b/ports/licensepp/portfile.cmake @@ -9,15 +9,8 @@ vcpkg_from_github( SHA512 2161575815d8ff49110d7c2823662ba30d9f1ca2eb6be6dad1ee0807fb3fa9f28483839a133c9d380035254df7c452f8d6fa7f17fd4f29acd8b9bfbbda059291 HEAD_REF master PATCHES - # TODO: - # In this commit, https://github.com/noloader/cryptopp-pem/commit/0cfa60820ec1d5e8ac4d77a0a8786ee43e9a2400 - # the parameter orders have been changed. - # But we can not update pem-pack to this version or newer because it - # won't compile with the current version of cryptopp in `vcpkg`. - # Remove this patch in the future. - use-old-pem-pack.patch - # TODO: Remove this patch if https://github.com/amrayn/licensepp/pull/33 was merged. - fix-cmake.patch + 0001-use-old-pem-pack.patch + 0002-fix-cmake.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCryptoPP.cmake DESTINATION ${SOURCE_PATH}/cmake) diff --git a/ports/mecab/CONTROL b/ports/mecab/CONTROL index f0bc5e15f55a03..7e0e23612868eb 100644 --- a/ports/mecab/CONTROL +++ b/ports/mecab/CONTROL @@ -1,4 +1,5 @@ Source: mecab Version: 2019-09-25 +Port-Version: 1 Description: A morphological analysis engine based on CRF Supports: !(uwp|arm|arm64) diff --git a/ports/mecab/portfile.cmake b/ports/mecab/portfile.cmake index cd34455e8f65fc..849377616080aa 100644 --- a/ports/mecab/portfile.cmake +++ b/ports/mecab/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taku910/mecab REF 3a07c4eefaffb4e7a0690a7f4e5e0263d3ddb8a3 - SHA512 2a7f1d159ddca846357b5bcab2d2b5de2e6a27dca4301cdd1cc52c155c352f9c7030b77d1187afe9c0a7f1b131a1acdcc40ee81ce7ba5c0fa6b2325c56676353 + SHA512 d3288cca7207daf66df4349819b64fc9cc069c775512cf0607ca855e9e5512509c36b0e2bb0e955478acae13ff0c35df7442f18a8458fab0ed664d62854c0b25 HEAD_REF master PATCHES fix_wpath_unsigned.patch diff --git a/ports/opencl/0001-include-unistd-for-gete-ug-id.patch b/ports/opencl/0001-include-unistd-for-gete-ug-id.patch new file mode 100644 index 00000000000000..4674aff794ca4d --- /dev/null +++ b/ports/opencl/0001-include-unistd-for-gete-ug-id.patch @@ -0,0 +1,27 @@ +From 0f783f1a8eac7a78bc92198e140d4a5c745382ca Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 11:50:21 -0700 +Subject: [PATCH] include unistd for gete?[ug]id + +--- + loader/linux/icd_linux_envvars.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/loader/linux/icd_linux_envvars.c b/loader/linux/icd_linux_envvars.c +index 4af5a08..92b0698 100644 +--- a/loader/linux/icd_linux_envvars.c ++++ b/loader/linux/icd_linux_envvars.c +@@ -25,6 +25,10 @@ + + #include + ++#if defined(__APPLE__) ++#include ++#endif ++ + char *khrIcd_getenv(const char *name) { + // No allocation of memory necessary for Linux. + return getenv(name); +-- +2.24.3 (Apple Git-128) + diff --git a/ports/opencl/portfile.cmake b/ports/opencl/portfile.cmake index 9fc56a9bef57fc..e7b5e132abe91f 100644 --- a/ports/opencl/portfile.cmake +++ b/ports/opencl/portfile.cmake @@ -56,6 +56,8 @@ vcpkg_from_github( REF e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae SHA512 f3563c0a4c094d3795d8386ec0db41189d350ab8136d80ae5de611ee3db87fbb0ab851bad2b33e111eddf135add5dbfef77d96979473ca5a23c036608d443378 HEAD_REF master + PATCHES + 0001-include-unistd-for-gete-ug-id.patch ) vcpkg_configure_cmake( diff --git a/ports/unixodbc/CONTROL b/ports/unixodbc/CONTROL index 8ff0ce87b86619..6b3350532eea1b 100644 --- a/ports/unixodbc/CONTROL +++ b/ports/unixodbc/CONTROL @@ -1,5 +1,6 @@ Source: unixodbc -Version: 2.3.7-1 +Version: 2.3.7 +Port-Version: 2 Homepage: https://github.com/lurcher/unixODBC Description: unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux, Mac OSX, and UNIX Supports: (osx|linux) diff --git a/ports/unixodbc/portfile.cmake b/ports/unixodbc/portfile.cmake index 4ae0fd149010a0..f54488163325f1 100644 --- a/ports/unixodbc/portfile.cmake +++ b/ports/unixodbc/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( HEAD_REF master ) +set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") vcpkg_configure_make( SOURCE_PATH ${SOURCE_PATH} AUTOCONFIG From ddd64c1f990ac79f9fdc090506bffc222895e4d0 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 24 Sep 2020 10:03:21 -0700 Subject: [PATCH 8/9] [jxrlib darknet] fix the last ports! (hopefully) --- ...ame-_castu32_f32-to-gemm_castu32_f32.patch | 26 +++++++++++++++++++ ports/darknet/CONTROL | 1 + ports/darknet/portfile.cmake | 2 ++ .../0001-include-wchar.h-for-wcslen.patch | 24 ----------------- ports/jxrlib/CMakeLists.txt | 1 + ports/jxrlib/portfile.cmake | 4 --- 6 files changed, 30 insertions(+), 28 deletions(-) create mode 100644 ports/darknet/0001-rename-_castu32_f32-to-gemm_castu32_f32.patch delete mode 100644 ports/jxrlib/0001-include-wchar.h-for-wcslen.patch diff --git a/ports/darknet/0001-rename-_castu32_f32-to-gemm_castu32_f32.patch b/ports/darknet/0001-rename-_castu32_f32-to-gemm_castu32_f32.patch new file mode 100644 index 00000000000000..3e459c22503274 --- /dev/null +++ b/ports/darknet/0001-rename-_castu32_f32-to-gemm_castu32_f32.patch @@ -0,0 +1,26 @@ +From ed14dcf873775dcfc56883f55c10619779d8f87e Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Thu, 24 Sep 2020 09:48:16 -0700 +Subject: [PATCH] rename _castu32_f32 to gemm_castu32_f32 + +since _castu32_f32 is reserved, an implementation is allowed to name a function that, +and it turns out Xcode 12 did. +--- + src/gemm.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gemm.c b/src/gemm.c +index 0b06d98..bc2aef3 100644 +--- a/src/gemm.c ++++ b/src/gemm.c +@@ -546,6 +546,7 @@ static inline float _mm256_extract_float32(__m256 a, const int index) { + #include + #include + ++#define _castu32_f32 gemm_castu32_f32 + static inline float _castu32_f32(uint32_t a) { + return *((float *)&a); + } +-- +2.24.3 (Apple Git-128) + diff --git a/ports/darknet/CONTROL b/ports/darknet/CONTROL index 32e5b629f37c9a..25617ab14163b5 100644 --- a/ports/darknet/CONTROL +++ b/ports/darknet/CONTROL @@ -1,5 +1,6 @@ Source: darknet Version: 2020-08-30 +Port-Version: 1 Description: Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities. Build-Depends: pthreads, stb diff --git a/ports/darknet/portfile.cmake b/ports/darknet/portfile.cmake index b1ba7cf1598c94..54f204f84ff0f5 100644 --- a/ports/darknet/portfile.cmake +++ b/ports/darknet/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF ecad770071eb776208a46977347e6d2410d4f50e SHA512 1de0dc3f4842c68f5c12addf100996f7176ffb50dcd89a0b57446ba996d9199e31531f64c32eedbc2ea6a449459573811444dd35f1a50ece3880f58717c795ab HEAD_REF master + PATCHES + 0001-rename-_castu32_f32-to-gemm_castu32_f32.patch ) # enable CUDA inside DARKNET diff --git a/ports/jxrlib/0001-include-wchar.h-for-wcslen.patch b/ports/jxrlib/0001-include-wchar.h-for-wcslen.patch deleted file mode 100644 index 2d7f8bbe3d45ab..00000000000000 --- a/ports/jxrlib/0001-include-wchar.h-for-wcslen.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9a8da6a23a03ff8dcd3339b5a06a01cdb0d8eb1f Mon Sep 17 00:00:00 2001 -From: Nicole Mazzuca -Date: Mon, 21 Sep 2020 08:45:07 -0700 -Subject: [PATCH] include wchar.h for wcslen - ---- - jxrgluelib/JXRGlueJxr.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/jxrgluelib/JXRGlueJxr.c b/jxrgluelib/JXRGlueJxr.c -index 1745acf..f60a2e3 100644 ---- a/jxrgluelib/JXRGlueJxr.c -+++ b/jxrgluelib/JXRGlueJxr.c -@@ -27,6 +27,7 @@ - // - //*@@@---@@@@****************************************************************** - #include -+#include - #include - - --- -2.28.0.windows.1 - diff --git a/ports/jxrlib/CMakeLists.txt b/ports/jxrlib/CMakeLists.txt index 727b969069962e..7a73e3cba5ace4 100644 --- a/ports/jxrlib/CMakeLists.txt +++ b/ports/jxrlib/CMakeLists.txt @@ -20,6 +20,7 @@ endmacro() if(NOT MSVC) add_definitions(-D__ANSI__) + add_compile_options(-Wno-error=implicit-function-declaration) endif() include(TestBigEndian) diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake index 382a73f6af37e8..ed4e4594061251 100644 --- a/ports/jxrlib/portfile.cmake +++ b/ports/jxrlib/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -8,8 +6,6 @@ vcpkg_from_github( REF f7521879862b9085318e814c6157490dd9dbbdb4 SHA512 f5617cbe73b6b905cc6bba181e6a3efedd59584f7a8c90e0f34db580cfdad4239a2ab753df4e221f26a5c0db51475b021052e3b9e3ab3673573573b1d57f3fdb HEAD_REF master - PATCHES - 0001-include-wchar.h-for-wcslen.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) From 96148c7bb14241f66c1ee5f6331d472c6b23d558 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 24 Sep 2020 13:07:32 -0700 Subject: [PATCH 9/9] CRs, plus minor wip changes to osx scripts --- ports/apr/portfile.cmake | 2 +- .../0002-include-sys-stat.h-for-mkdir.patch | 15 +-------- .../osx/Get-InternalBaseBox.ps1 | 32 +++++++++++++++++++ scripts/azure-pipelines/osx/README.md | 11 +++++++ 4 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 0d427fbe71d86c..de969c20fe5399 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -64,7 +64,7 @@ else() else() message(STATUS "Configuring apr") endif() - set(ENV{CFLAGS} -Wno-error=implicit-function-declaration) + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") vcpkg_configure_make( SOURCE_PATH "${SOURCE_PATH}" NO_DEBUG diff --git a/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch b/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch index d4012d2c04fc06..a39617e4743a70 100644 --- a/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch +++ b/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch @@ -11,23 +11,10 @@ diff --git a/ThirdParty/Minizip/minizip/miniunz.c b/ThirdParty/Minizip/minizip/m index 2264705..e0167d5 100644 --- a/ThirdParty/Minizip/minizip/miniunz.c +++ b/ThirdParty/Minizip/minizip/miniunz.c -@@ -53,6 +53,7 @@ +@@ -53,5 +53,6 @@ #else # include # include +# include #endif - -@@ -141,7 +142,7 @@ int mymkdir(dirname) - ret = mkdir (dirname,0775); - #elif __APPLE__ - ret = mkdir (dirname,0775); --#else -+#else - #error Unknown platform - #endif - return ret; --- -2.24.3 (Apple Git-128) - diff --git a/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 b/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 new file mode 100644 index 00000000000000..07b3f9a9b7c847 --- /dev/null +++ b/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 @@ -0,0 +1,32 @@ +#!pwsh +#Requires -Version 6.0 + +<# +.SYNOPSIS +Installs the base box at the specified version from the share. + +.PARAMETER StorageAccountAccessKey +An access key for the storage account. + +.PARAMETER BaseBoxVersion +The version of the base box to import; this should be a date, i.e. 2020-09-17 +#> +[CmdletBinding(PositionalBinding=$False)] +Param( + [Parameter(Mandatory=$True)] + [String]$StorageAccountAccessKey, + [Parameter(Mandatory=$True)] + [String]$BaseBoxVersion +) + +Set-StrictMode -Version 2 + +if (-not $IsMacOS) { + throw 'This script should only be run on a macOS host' +} + +$encodedAccessKey = [System.Web.HttpUtility]::UrlEncode($StorageAccountAccessKey) + +# TODO: finish this, once I have access to a mac again +# mount_smbfs +# vagrant box add diff --git a/scripts/azure-pipelines/osx/README.md b/scripts/azure-pipelines/osx/README.md index c2f0b7f10536e7..5c6dd74e7ee541 100644 --- a/scripts/azure-pipelines/osx/README.md +++ b/scripts/azure-pipelines/osx/README.md @@ -121,3 +121,14 @@ $ vagrant package This will create a `package.box`, which is the box file for the base VM. Then, you can `vagrant box add --name `, and you'll have the base vcpkg box added for purposes of `Setup-VagrantMachines.ps1`! + +Once you've created the base box, if you're making it the new base box for the CI, +upload it to the `vcpkgvagrant` storage account, to the `vagrant-boxes` share. +Then, add the metadata about the box (the name and version) to the JSON file there. +Once you've done that, add the software versions below. + +### VM Software Versions + +* 2020-09-17: + * macOS: 10.15.6 + * Xcode CLTs: 12