vcpkg/ports/dcmtk/vcpkg.json

77 lines
1.6 KiB
JSON
Raw Normal View History

Bulk convert control files. (#19986) ``` 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 ```
2021-09-09 16:24:04 +08:00
{
"name": "dcmtk",
2024-01-18 04:02:49 +08:00
"version": "3.6.8",
2024-10-23 14:57:38 +08:00
"port-version": 9,
2021-11-19 13:02:06 +08:00
"description": "This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard.",
"homepage": "https://github.com/DCMTK/dcmtk",
2024-10-23 14:57:38 +08:00
"license": null,
"supports": "!uwp",
2021-11-19 13:02:06 +08:00
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
2024-10-23 14:57:38 +08:00
},
{
"name": "vcpkg-cmake-get-vars",
"host": true
2021-11-19 13:02:06 +08:00
}
],
"features": {
"external-dict": {
"description": "Enable external dictionary"
},
"iconv": {
"description": "Enable Iconv support",
"dependencies": [
"libiconv"
]
},
"icu": {
"description": "Enable ICU support",
"dependencies": [
"icu"
]
},
"openssl": {
"description": "Enable OpenSSL",
"dependencies": [
"openssl"
]
},
"png": {
"description": "Enable PNG support",
"dependencies": [
"libpng"
]
},
"tiff": {
"description": "Enable TIFF support",
"dependencies": [
{
"name": "tiff",
"default-features": false
}
]
},
"tools": {
"description": "Build apps"
},
"xml2": {
"description": "Enable XML support",
"dependencies": [
"libxml2"
]
},
"zlib": {
"description": "Enable zlib support",
"dependencies": [
"zlib"
]
}
}
Bulk convert control files. (#19986) ``` 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 ```
2021-09-09 16:24:04 +08:00
}