Skip to content

Commit

Permalink
Bulk convert control files. (microsoft#19986)
Browse files Browse the repository at this point in the history
```
function Convert-Control {
    Param($full)
    .\vcpkg.exe format-manifest $full
    $root = $full.Substring(0, $full.Length - 7) # CONTROL
    $new = $root + 'vcpkg.json'
    $content = Get-Content -Raw $new
    $asJson = ConvertFrom-Json $content -AsHashtable -Depth 100
    $oldVersion = $asJson['port-version']
    if ($null -eq $oldVersion) {
        $oldVersionFull = $asJson['version-string']
        Write-Host "Got version $oldVersionFull"
        $match = [System.Text.RegularExpressions.Regex]::Match($oldVersionFull, '^(.+)-(\d+)$')
        if ($match.Success -and -not [System.Text.RegularExpressions.Regex]::IsMatch($oldVersionFull, '^\d\d\d\d-\d\d-\d\d$')) {
            $newFullVersion = [string]$match.Groups[1].Value
            $oldVersion = [int]$match.Groups[2].Value
            Write-Host "newFullVersion $newFullVersion oldVersion $oldVersion"
            $newVersion = $oldVersion + 1
            $asJson['version-string'] = $newFullVersion
            Write-Host "Previous version for $full extracted from version field -- setting version-string $newFullVersion and port-version $newVersion"
        } else {
            Write-Host "No previous version for $full -- setting 1"
            $newVersion = 1
        }
    } else {
        $newVersion = [int]$oldVersion + 1
        Write-Host "New version for $full : $newVersion"
    }

    $asJson['port-version'] = $newVersion

    $content = ConvertTo-Json $asJson -Depth 100
    Set-Content -Path $new -Value $content
    .\vcpkg.exe format-manifest $new
}

Get-ChildItem ports\CONTROL -Recurse | Foreach-Object {
    Convert-Control $_.FullName
}

git commit -am "this message"
.\vcpkg.exe x-add-version -all
git commit -a --amend
```
  • Loading branch information
BillyONeal authored Sep 9, 2021
1 parent 7e04422 commit b295670
Show file tree
Hide file tree
Showing 2,640 changed files with 16,880 additions and 6,473 deletions.
6 changes: 0 additions & 6 deletions ports/7zip/CONTROL

This file was deleted.

8 changes: 8 additions & 0 deletions ports/7zip/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "7zip",
"version-string": "19.00",
"port-version": 3,
"description": "Library for archiving file with a high compression ratio.",
"homepage": "https://www.7-zip.org",
"supports": "!(linux | osx | arm | uwp)"
}
4 changes: 0 additions & 4 deletions ports/absent/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/absent/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "absent",
"version-string": "0.3.1",
"port-version": 1,
"description": "A small C++17 library meant to simplify the composition of nullable types in a generic, type-safe, and declarative way",
"homepage": "https://github.com/rvarago/absent"
}
22 changes: 0 additions & 22 deletions ports/ace/CONTROL

This file was deleted.

30 changes: 30 additions & 0 deletions ports/ace/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "ace",
"version-string": "7.0.3",
"port-version": 1,
"description": "The ADAPTIVE Communication Environment",
"homepage": "https://www.dre.vanderbilt.edu/~schmidt/ACE.html",
"features": {
"ssl": {
"description": "Enable SSL/TLS features in ACE",
"dependencies": [
"openssl"
]
},
"tao": {
"description": "The ACE ORB"
},
"wchar": {
"description": "Enable extra wide char functions in ACE"
},
"xml": {
"description": "Enable XML features in ACE"
},
"zlib": {
"description": "Enable zlib support",
"dependencies": [
"zlib"
]
}
}
}
5 changes: 0 additions & 5 deletions ports/activemq-cpp/CONTROL

This file was deleted.

10 changes: 10 additions & 0 deletions ports/activemq-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "activemq-cpp",
"version-string": "3.9.5",
"port-version": 4,
"description": "Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server.",
"supports": "!(uwp | linux | osx)",
"dependencies": [
"apr"
]
}
4 changes: 0 additions & 4 deletions ports/ade/CONTROL

This file was deleted.

6 changes: 6 additions & 0 deletions ports/ade/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "ade",
"version-string": "0.1.1f",
"port-version": 2,
"description": "ADE Framework is a graph construction, manipulation, and processing framework. ADE Framework is suitable for organizing data flow processing and execution."
}
6 changes: 0 additions & 6 deletions ports/akali/CONTROL

This file was deleted.

8 changes: 8 additions & 0 deletions ports/akali/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "akali",
"version-string": "1.42",
"port-version": 2,
"description": "C++ Common Library.",
"homepage": "https://github.com/winsoft666/akali",
"supports": "!(arm | arm64 | uwp)"
}
5 changes: 0 additions & 5 deletions ports/alac-decoder/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/alac-decoder/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "alac-decoder",
"version-string": "0.2",
"port-version": 5,
"description": "ALAC C implementation of a decoder, written from reverse engineering the file format",
"homepage": "https://distfiles.macports.org/alac_decoder"
}
5 changes: 0 additions & 5 deletions ports/alac/CONTROL

This file was deleted.

8 changes: 8 additions & 0 deletions ports/alac/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "alac",
"version-string": "2017-11-03-c38887c5",
"port-version": 2,
"description": "The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices.",
"homepage": "https://github.com/macosforge/alac",
"supports": "!uwp"
}
5 changes: 0 additions & 5 deletions ports/aliyun-oss-c-sdk/CONTROL

This file was deleted.

11 changes: 11 additions & 0 deletions ports/aliyun-oss-c-sdk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "aliyun-oss-c-sdk",
"version-string": "3.10.0",
"port-version": 1,
"description": "Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.",
"supports": "!(uwp | linux | osx)",
"dependencies": [
"apr-util",
"curl"
]
}
5 changes: 0 additions & 5 deletions ports/ampl-asl/CONTROL

This file was deleted.

8 changes: 8 additions & 0 deletions ports/ampl-asl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "ampl-asl",
"version-string": "2020-11-11",
"port-version": 1,
"description": "AMPL Solver Library",
"homepage": "https://github.com/ampl/asl",
"supports": "!uwp"
}
4 changes: 0 additions & 4 deletions ports/anax/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/anax/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "anax",
"version-string": "2.1.0",
"port-version": 7,
"description": "An open source C++ entity system.",
"homepage": "https://github.com/miguelmartin75/anax"
}
6 changes: 0 additions & 6 deletions ports/antlr4/CONTROL

This file was deleted.

14 changes: 14 additions & 0 deletions ports/antlr4/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "antlr4",
"version-string": "4.9.1",
"port-version": 1,
"description": "ANother Tool for Language Recognition",
"homepage": "https://www.antlr.org",
"supports": "!uwp",
"dependencies": [
{
"name": "libuuid",
"platform": "!uwp & !windows & !osx"
}
]
}
6 changes: 0 additions & 6 deletions ports/apr-util/CONTROL

This file was deleted.

12 changes: 12 additions & 0 deletions ports/apr-util/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "apr-util",
"version-string": "1.6.1",
"port-version": 4,
"description": "Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation",
"homepage": "https://apr.apache.org/",
"dependencies": [
"apr",
"expat",
"openssl"
]
}
5 changes: 0 additions & 5 deletions ports/arb/CONTROL

This file was deleted.

10 changes: 10 additions & 0 deletions ports/arb/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "arb",
"version-string": "2.18.1",
"port-version": 1,
"description": "a C library for arbitrary-precision interval arithmetic",
"homepage": "https://github.com/fredrik-johansson/arb",
"dependencies": [
"flint"
]
}
3 changes: 0 additions & 3 deletions ports/argagg/CONTROL

This file was deleted.

6 changes: 6 additions & 0 deletions ports/argagg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "argagg",
"version-string": "0.4.6",
"port-version": 1,
"description": "A simple C++11 command line argument parser"
}
3 changes: 0 additions & 3 deletions ports/argh/CONTROL

This file was deleted.

6 changes: 6 additions & 0 deletions ports/argh/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "argh",
"version-string": "2018-12-18",
"port-version": 3,
"description": "Argh! A minimalist argument handler."
}
6 changes: 0 additions & 6 deletions ports/argtable2/CONTROL

This file was deleted.

8 changes: 8 additions & 0 deletions ports/argtable2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "argtable2",
"version-string": "2.13",
"port-version": 9,
"description": "Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss.",
"homepage": "http://argtable.sourceforge.net",
"supports": "!uwp"
}
4 changes: 0 additions & 4 deletions ports/argumentum/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/argumentum/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "argumentum",
"version-string": "0.3.1",
"port-version": 1,
"description": "A C++17 command line argument parser inspired by Python argparse",
"homepage": "https://github.com/mmahnic/argumentum"
}
5 changes: 0 additions & 5 deletions ports/asmjit/CONTROL

This file was deleted.

8 changes: 8 additions & 0 deletions ports/asmjit/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "asmjit",
"version-string": "2020-09-14",
"port-version": 1,
"description": "Complete x86/x64 JIT and Remote Assembler for C++",
"homepage": "https://github.com/asmjit/asmjit",
"supports": "!arm"
}
6 changes: 0 additions & 6 deletions ports/assimp/CONTROL

This file was deleted.

18 changes: 18 additions & 0 deletions ports/assimp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "assimp",
"version-string": "5.0.1",
"port-version": 5,
"description": "The Open Asset import library",
"homepage": "https://github.com/assimp/assimp",
"dependencies": [
"irrlicht",
"kubazip",
"minizip",
"poly2tri",
"polyclipping",
"rapidjson",
"stb",
"utfcpp",
"zlib"
]
}
4 changes: 0 additions & 4 deletions ports/asynch/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/asynch/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "asynch",
"version-string": "2019-09-21",
"port-version": 2,
"description": "Async.h - asynchronous, stackless subroutines.",
"homepage": "https://github.com/naasking/async.h"
}
4 changes: 0 additions & 4 deletions ports/asyncplusplus/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/asyncplusplus/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "asyncplusplus",
"version-string": "1.1",
"port-version": 1,
"description": "Async++ is a lightweight concurrency framework for C++11",
"supports": "!uwp"
}
4 changes: 0 additions & 4 deletions ports/atlmfc/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/atlmfc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "atlmfc",
"version-string": "0",
"port-version": 1,
"description": "a stub package that ensures VS has ATL/MFC installed.",
"supports": "windows"
}
Loading

0 comments on commit b295670

Please sign in to comment.