Skip to content

Commit

Permalink
Fix conflicting file
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhao Liu committed Jul 13, 2023
2 parents 81cac2f + 78784c0 commit d522f1e
Show file tree
Hide file tree
Showing 2,301 changed files with 26,158 additions and 11,401 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: I have a question
url: https://github.com/microsoft/vcpkg/discussions
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/check_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- opened

jobs:
missing-windows-sdk-issue:
check-for-common-issues:
runs-on: ubuntu-latest
permissions:
issues: write
Expand All @@ -20,6 +20,8 @@ jobs:
repo: context.repo.repo
};
let issue = await github.rest.issues.get(issue_query)
// missing-windows-sdk-issue
let reg = /RC Pass 1: command "rc .*" failed \(exit code 0\) with the following output:/;
if (reg.test(issue.data.body)){
await github.rest.issues.removeAllLabels(issue_query);
Expand All @@ -30,3 +32,13 @@ jobs:
await github.rest.issues.createComment({...issue_query, body});
// Close the issue?
}
// msys2 download fails => old vcpkg version
reg = /error: https:\/\/repo\.msys2\.org\/.*: failed: status code 404/;
if (reg.test(issue.data.body)){
await github.rest.issues.removeAllLabels(issue_query);
await github.rest.issues.setLabels({...issue_query, labels: ["category:question"]});
let body = "Try updating your vcpkg version via `git pull` to resolve this issue. MSYS2 downloads are removed from the upstream servers from time to time, so using an up-to-date vcpkg version is necessary."
await github.rest.issues.createComment({...issue_query, body});
// Close the issue?
}
31 changes: 31 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
stale-issue-message: 'This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.'
only-labels: 'category:question'
days-before-issue-stale: 28
days-before-pr-stale: -1
days-before-close: 14
- uses: actions/stale@v6
with:
stale-issue-message: 'This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.'
only-labels: 'requires:repro'
days-before-issue-stale: 28
days-before-pr-stale: -1
days-before-close: 14
- uses: actions/stale@v6
with:
stale-issue-message: "This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 60 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment."
any-of-labels: 'category:new-port'
close-issue-label: 'new-port-unresolved'
days-before-issue-stale: 60
days-before-pr-stale: -1
days-before-close: 14
49 changes: 36 additions & 13 deletions .github/workflows/untrustedPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
unset VCPKG_ROOT
git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*portfile.cmake' | sed 's/[MAR]\t*//' > .github-pr.changed-portfiles
if [ -s .github-pr.changed-portfiles ]; then (grep -n -H -E '(vcpkg_apply_patches|vcpkg_build_msbuild|vcpkg_extract_source_archive_ex|vcpkg_install_cmake|vcpkg_build_cmake|vcpkg_configure_cmake|vcpkg_fixup_cmake_targets)' $(cat .github-pr.changed-portfiles) || true) > .github-pr.deprecated-cmake; else touch .github-pr.deprecated-cmake; fi
if [ -s .github-pr.changed-portfiles ]; then (grep -n -H -E '(vcpkg_apply_patches|vcpkg_build_msbuild|vcpkg_extract_source_archive_ex)' $(cat .github-pr.changed-portfiles) || true) > .github-pr.deprecated-function; else touch .github-pr.deprecated-function; fi
if [ -s .github-pr.changed-portfiles ]; then (grep -n -H -E '(vcpkg_install_cmake|vcpkg_build_cmake|vcpkg_configure_cmake|vcpkg_fixup_cmake_targets)' $(cat .github-pr.changed-portfiles) || true) > .github-pr.deprecated-cmake; else touch .github-pr.deprecated-cmake; fi
git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*vcpkg.json' | sed 's/[MAR]\t*//' > .github-pr.changed-manifest-files
cat .github-pr.changed-manifest-files | while read filename; do grep -q -E '"license": ' "$filename" || echo "$filename" || true; done > .github-pr.missing-license
cat .github-pr.changed-manifest-files | while read filename; do match=$(grep -oiP '"license": ".*\K(AGPL-1\.0|AGPL-3\.0|BSD-2-Clause-FreeBSD|BSD-2-Clause-NetBSD|bzip2-1\.0\.5|eCos-2\.0|GFDL-1\.1|GFDL-1\.2|GFDL-1\.3|GPL-1\.0|GPL-1\.0\+|GPL-2\.0|GPL-2\.0\+|GPL-2\.0-with-autoconf-exception|GPL-2\.0-with-bison-exception|GPL-2\.0-with-classpath-exception|GPL-2\.0-with-font-exception|GPL-2\.0-with-GCC-exception|GPL-3\.0|GPL-3\.0\+|GPL-3\.0-with-autoconf-exception|GPL-3\.0-with-GCC-exception|LGPL-2\.0|LGPL-2\.0\+|LGPL-2\.1|LGPL-2\.1\+|LGPL-3\.0|LGPL-3\.0\+|Nunit|StandardML-NJ|wxWindows)(?=[ "])' "$filename" || true); if [ ! -z "$match" ]; then echo "$filename (has deprecated license \"$match\")" ; fi ; done > .github-pr.deprecated-license
Expand All @@ -53,7 +54,8 @@ jobs:
const add_version_out = (await fs.readFile('.github-pr.x-add-version.out', 'utf8')).trim()
const version_string_out = (await fs.readFile('.github-pr.version-string.out', 'utf8')).trim()
const format = (await fs.readFile('.github-pr.format-manifest', 'utf8')).trim()
const cmake = (await fs.readFile('.github-pr.deprecated-cmake', 'utf8')).split('\n').filter(s => s.length > 0)
const deprecated_function = (await fs.readFile('.github-pr.deprecated-function', 'utf8')).split('\n').filter(s => s.length > 0)
const deprecated_cmake = (await fs.readFile('.github-pr.deprecated-cmake', 'utf8')).split('\n').filter(s => s.length > 0)
const missing_license = (await fs.readFile('.github-pr.missing-license', 'utf8')).trim()
const deprecated_license = (await fs.readFile('.github-pr.deprecated-license', 'utf8')).trim()
Expand Down Expand Up @@ -92,34 +94,55 @@ jobs:
approve = false;
}
if (cmake.length > 0) {
if (deprecated_function.length > 0) {
var deprecated_output = '';
deprecated_output += "You have modified or added at least one portfile where deprecated functions are used.\n"
deprecated_output += "If you feel able to do so, please consider migrating them to the new functions.\n";
deprecated_output += "In the ports that use the new function vcpkg_cmake_install, vcpkg_cmake_build or vcpkg_cmake_config_fixup, you have to add the corresponding dependencies:\n";
core.warning(deprecated_output);
let deprecated_functions = {
vcpkg_extract_source_archive_ex: 'vcpkg_extract_source_archive https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_extract_source_archive',
vcpkg_build_msbuild: 'vcpkg_install_msbuild https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_install_msbuild',
vcpkg_apply_patches: 'the PATCHES arguments to the \"extract\" helpers (for example, vcpkg_from_github() (https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_from_github))',
};
for (let line of deprecated_function) {
// line has the format: <path>:<line_number>:<matched_string
// For example: ports/rtlsdr/portfile.cmake:42: vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
[file, line_number, match] = line.split(':');
for (deprecated_func in deprecated_functions) {
if (match.indexOf(deprecated_func) !== -1) {
core.warning(`The function ${deprecated_func} is deprecated. Please use ${deprecated_functions[deprecated_func]}`, {file, startLine: line_number});
break;
}
}
}
}
if (deprecated_cmake.length > 0) {
var deprecated_output = '';
deprecated_output += "You have modified or added at least one portfile where deprecated functions are used.\n"
deprecated_output += "These functions have been forbidden in vcpkg, please migrating them to the new functions.\n";
deprecated_output += "In the ports that use the new function vcpkg_cmake_configure, vcpkg_cmake_install, vcpkg_cmake_build or vcpkg_cmake_config_fixup, you have to add the corresponding dependencies:\n";
deprecated_output += "```json\n";
deprecated_output += '{\n "name": "vcpkg-cmake",\n "host": true\n},\n'
deprecated_output += '{\n "name": "vcpkg-cmake-config",\n "host": true\n}\n';
deprecated_output += "```\n";
core.warning(deprecated_output);
core.error(deprecated_output);
const deprecated_functions = {
let deprecated_functions = {
vcpkg_install_cmake: 'vcpkg_cmake_install (from port vcpkg-cmake)',
vcpkg_install_cmake: 'vcpkg_cmake_install (from port vcpkg-cmake)',
vcpkg_build_cmake: 'vcpkg_cmake_build (from port vcpkg-cmake)',
vcpkg_configure_cmake: 'vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)',
vcpkg_fixup_cmake_targets: 'vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)',
vcpkg_extract_source_archive_ex: 'vcpkg_extract_source_archive https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_extract_source_archive',
vcpkg_build_msbuild: 'vcpkg_install_msbuild https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_install_msbuild',
vcpkg_apply_patches: 'the PATCHES arguments to the \"extract\" helpers (for example, vcpkg_from_github() (https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_from_github))',
};
for (let line of cmake) {
for (let line of deprecated_cmake) {
// line has the format: <path>:<line_number>:<matched_string
// For example: ports/rtlsdr/portfile.cmake:42: vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
[file, line_number, match] = line.split(':');
for (deprecated_function in deprecated_functions) {
if (match.indexOf(deprecated_function) !== -1) {
core.warning(`The function ${deprecated_function} is deprecated. Please use ${deprecated_functions[deprecated_function]}`, {file, startLine: line_number});
for (deprecated_cmake_function in deprecated_functions) {
if (match.indexOf(deprecated_cmake_function) !== -1) {
core.warning(`The function ${deprecated_cmake_function} is deprecated. Please use ${deprecated_functions[deprecated_cmake_function]}`, {file, startLine: line_number});
break;
}
}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ This will still allow people to not use vcpkg,
by passing the `CMAKE_TOOLCHAIN_FILE` directly,
but it will make the configure-build step slightly easier.

[getting-started:using-a-package]: https://learn.microsoft.com/vcpkg/examples/installing-and-using-packages.md
[getting-started:using-a-package]: https://learn.microsoft.com/vcpkg/examples/installing-and-using-packages
[getting-started:git]: https://git-scm.com/downloads
[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
[getting-started:linux-gcc]: #installing-linux-developer-tools
Expand Down Expand Up @@ -282,9 +282,9 @@ depending on the shell you use, then restart your console.
# Examples

See the [documentation](https://learn.microsoft.com/vcpkg) for specific walkthroughs,
including [installing and using a package](https://learn.microsoft.com/vcpkg/examples/installing-and-using-packages.md),
[adding a new package from a zipfile](https://learn.microsoft.com/vcpkg/examples/packaging-zipfiles.md),
and [adding a new package from a GitHub repo](https://learn.microsoft.com/vcpkg/examples/packaging-github-repos.md).
including [installing and using a package](https://learn.microsoft.com/vcpkg/examples/installing-and-using-packages),
[adding a new package from a zipfile](https://learn.microsoft.com/vcpkg/examples/packaging-zipfiles),
and [adding a new package from a GitHub repo](https://learn.microsoft.com/vcpkg/examples/packaging-github-repos).

Our docs are now also available online at our website https://vcpkg.io/. We really appreciate any and all feedback! You can submit an issue in https://github.com/vcpkg/vcpkg.github.io/issues.

Expand Down Expand Up @@ -323,7 +323,7 @@ by the original developers of those libraries, and download source code and buil
official distribution locations. For use behind a firewall, the specific access needed will depend
on which ports are being installed. If you must install in in an "air gapped" environment, consider
installing once in a non-"air gapped" environment, populating an
[asset cache](https://learn.microsoft.com/vcpkg/users/assetcaching.md) shared with the otherwise "air gapped" environment.
[asset cache](https://learn.microsoft.com/vcpkg/users/assetcaching) shared with the otherwise "air gapped" environment.

# Telemetry

Expand Down
14 changes: 6 additions & 8 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Vcpkg 可帮助您在 Windows、 Linux 和 MacOS 上管理 C 和 C++ 库。
* GitHub: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg)
* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), #vcpkg 频道
* Discord: [\#include \<C++\>](https://www.includecpp.org), #🌏vcpkg 频道
* 文档: [Documentation](docs/README.md)
* 文档: [Documentation](https://learn.microsoft.com/vcpkg)

# 目录

Expand Down Expand Up @@ -241,16 +241,14 @@ set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems

使用此种方式可无需设置 `CMAKE_TOOLCHAIN_FILE` 即可使用 vcpkg,且更容易完成配置工作。

[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md
[getting-started:integration]: docs/users/buildsystems/integration.md
[getting-started:using-a-package]: https://learn.microsoft.com/vcpkg/examples/installing-and-using-packages
[getting-started:git]: https://git-scm.com/downloads
[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
[getting-started:linux-gcc]: #installing-linux-developer-tools
[getting-started:macos-dev-tools]: #installing-macos-developer-tools
[getting-started:macos-brew]: #installing-gcc-on-macos
[getting-started:macos-gcc]: #installing-gcc-on-macos
[getting-started:visual-studio]: https://visualstudio.microsoft.com/
[getting-started:manifest-spec]: docs/specifications/manifests.md

# Tab 补全/自动补全

Expand All @@ -271,10 +269,10 @@ $ ./vcpkg integrate bash # 或 zsh

## 示例

请查看 [文档](docs/README.md) 获取具体示例,
其包含 [安装并使用包](docs/examples/installing-and-using-packages.md)
[使用压缩文件添加包](docs/examples/packaging-zipfiles.md)
[从 GitHub 源中添加一个包](docs/examples/packaging-github-repos.md)
请查看 [文档](https://learn.microsoft.com/vcpkg) 获取具体示例,
其包含 [安装并使用包](https://learn.microsoft.com/vcpkg/examples/installing-and-using-packages)
[使用压缩文件添加包](https://learn.microsoft.com/vcpkg/examples/packaging-zipfiles)
[从 GitHub 源中添加一个包](https://learn.microsoft.com/vcpkg/examples/packaging-github-repos)

我们的文档现在也可以从 [vcpkg.io](https://vcpkg.io/) 在线获取。
我们真诚的希望您向我们提出关于此网站的任何建议! 请在[这里](https://github.com/vcpkg/vcpkg.github.io/issues) 创建 issue.
Expand Down
13 changes: 0 additions & 13 deletions ports/3fd/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# Check architecture:
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(BUILD_ARCH "Win32")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(BUILD_ARCH "x64")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(BUILD_ARCH "ARM")
else()
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()

# Check library linkage:
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)

Expand All @@ -28,14 +17,12 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP:
vcpkg_install_msbuild(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "3FD/3FD.WinRT.UWP.vcxproj"
PLATFORM ${BUILD_ARCH}
USE_VCPKG_INTEGRATION
)
elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32:
vcpkg_install_msbuild(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "3FD/3FD.vcxproj"
PLATFORM ${BUILD_ARCH}
TARGET Build
USE_VCPKG_INTEGRATION
)
Expand Down
2 changes: 1 addition & 1 deletion ports/3fd/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "3fd",
"version": "2.6.3",
"port-version": 2,
"port-version": 3,
"description": "C++ Framework For Fast Development",
"supports": "windows & !static & !arm64",
"dependencies": [
Expand Down
3 changes: 2 additions & 1 deletion ports/7zip/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "7zip",
"version-string": "22.01",
"port-version": 1,
"description": "Library for archiving file with a high compression ratio.",
"homepage": "https://www.7-zip.org",
"license": "LGPL-2.1-or-later",
"supports": "!uwp",
"supports": "!uwp & !xbox",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand Down
4 changes: 2 additions & 2 deletions ports/abseil/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
REF 20230125.0
SHA512 b3d334215c78b31a2eb10bd9d4a978cd48367866d6daa2065c6c727282bafe19ef7ff5bd7cd4ed5c319d3b04e0711222e08ddbe7621ef1e079fed93a7307112f
REF 20230125.3
SHA512 50509acfc4128fd31435631f71ac8cd0350acd9e290f78502723149016e7f07c9d84182ba99e0938b1873fecda09393d3fd7af8dabfb0d89cdcdd8a69a917e70
HEAD_REF master
PATCHES
fix-dll-support.patch
Expand Down
3 changes: 1 addition & 2 deletions ports/abseil/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "abseil",
"version": "20230125.0",
"port-version": 1,
"version": "20230125.3",
"description": [
"an open-source collection designed to augment the C++ standard library.",
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
Expand Down
Loading

0 comments on commit d522f1e

Please sign in to comment.