[libgit2] Add SHA256 support via a feature (#49068)

This commit is contained in:
Colden Cullen
2026-01-07 02:21:02 -08:00
committed by GitHub
parent 1051def987
commit e56d62469e
4 changed files with 14 additions and 4 deletions

View File

@@ -71,6 +71,7 @@ vcpkg_check_features(
OUT_FEATURE_OPTIONS GIT2_FEATURES
FEATURES
tools BUILD_CLI
sha256 EXPERIMENTAL_SHA256
)
vcpkg_cmake_configure(
@@ -96,6 +97,11 @@ vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
if("tools" IN_LIST FEATURES)
# Since SHA256 is considered an "experimental" feature, it renames the executable. This renames it back.
if("sha256" IN_LIST FEATURES)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/git2-experimental${VCPKG_TARGET_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/bin/git2${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
endif()
vcpkg_copy_tools(TOOL_NAMES git2 AUTO_CLEAN)
endif()

View File

@@ -51,6 +51,9 @@
"description": "SSL support (sectransp)",
"supports": "osx"
},
"sha256": {
"description": "[experimental] SHA256 OID support"
},
"ssh": {
"description": "SSH support via libssh2",
"dependencies": [

View File

@@ -1,15 +1,16 @@
{
"name": "vcpkg-ci-libgit2",
"version-string": "ci",
"description": "Validates libgit2 with ssh and tools.",
"description": "Validates libgit2 with ssh, tools, and sha256.",
"dependencies": [
{
"name": "libgit2",
"default-features": false,
"features": [
"ssh",
"tools"
"tools",
"sha256"
]
}
]
}
}

View File

@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "3132df66e48bd17fb623b7b7f052b73e4d8ad7a3",
"git-tree": "2fd041b43ab1c68f47f7a23ff487e7dfe3f92d30",
"version-semver": "1.9.2",
"port-version": 0
},