[ms-gsl] Upgrade GSL to 4.0.0 (#22791)

* Bump GSL to 4.0.0

* Update version database

* Fix typo

* Add missing file

* Update version database

* GSL portfile properly expose Microsoft.GSL package

* Update version database

* Respond to review

* Update version database

* Update version database v2

* Update release ref

* Update version database

* Respond to review

* Update version database

* Add patch to SEAL to link to correct GSL version

* Update version database

* Update version database v2
This commit is contained in:
dmitrykobets-msft 2022-02-01 14:53:10 -08:00 committed by GitHub
parent 4f2d305da8
commit aad1aa28bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 136 additions and 16 deletions

View File

@ -0,0 +1,80 @@
diff --git a/interface/coroutine/net.h b/interface/coroutine/net.h
index 17b70a8..3c44827 100644
--- a/interface/coroutine/net.h
+++ b/interface/coroutine/net.h
@@ -344,7 +344,7 @@ void poll_net_tasks(uint64_t nano) noexcept(false);
* @ingroup Network
*/
uint32_t get_address(const addrinfo& hint, //
- gsl::czstring<> host, gsl::czstring<> serv,
+ gsl::czstring host, gsl::czstring serv,
gsl::span<sockaddr_in> output) noexcept;
/**
@@ -361,7 +361,7 @@ uint32_t get_address(const addrinfo& hint, //
* @ingroup Network
*/
uint32_t get_address(const addrinfo& hint, //
- gsl::czstring<> host, gsl::czstring<> serv,
+ gsl::czstring host, gsl::czstring serv,
gsl::span<sockaddr_in6> output) noexcept;
/**
@@ -377,7 +377,7 @@ uint32_t get_address(const addrinfo& hint, //
* @ingroup Network
*/
uint32_t get_name(const sockaddr_in& addr, //
- gsl::zstring<NI_MAXHOST> name, gsl::zstring<NI_MAXSERV> serv,
+ gsl::basic_zstring<char, NI_MAXHOST> name, gsl::basic_zstring<char, NI_MAXSERV> serv,
int32_t flags = NI_NUMERICHOST | NI_NUMERICSERV) noexcept;
/**
@@ -392,7 +392,7 @@ uint32_t get_name(const sockaddr_in& addr, //
* @ingroup Network
*/
uint32_t get_name(const sockaddr_in6& addr, //
- gsl::zstring<NI_MAXHOST> name, gsl::zstring<NI_MAXSERV> serv,
+ gsl::basic_zstring<char, NI_MAXHOST> name, gsl::basic_zstring<char, NI_MAXSERV> serv,
int32_t flags = NI_NUMERICHOST | NI_NUMERICSERV) noexcept;
} // namespace coro
diff --git a/modules/net/resolver.cpp b/modules/net/resolver.cpp
index 21a9800..5328939 100644
--- a/modules/net/resolver.cpp
+++ b/modules/net/resolver.cpp
@@ -9,7 +9,7 @@ namespace coro {
GSL_SUPPRESS(type .1)
uint32_t get_name(const sockaddr_in& addr, //
- gsl::zstring<NI_MAXHOST> name, gsl::zstring<NI_MAXSERV> serv,
+ gsl::basic_zstring<char, NI_MAXHOST> name, gsl::basic_zstring<char, NI_MAXSERV> serv,
int32_t flags) noexcept {
const auto* ptr = reinterpret_cast<const sockaddr*>(addressof(addr));
return ::getnameinfo(ptr, sizeof(sockaddr_in), //
@@ -20,7 +20,7 @@ uint32_t get_name(const sockaddr_in& addr, //
GSL_SUPPRESS(type .1)
uint32_t get_name(const sockaddr_in6& addr, //
- gsl::zstring<NI_MAXHOST> name, gsl::zstring<NI_MAXSERV> serv,
+ gsl::basic_zstring<char, NI_MAXHOST> name, gsl::basic_zstring<char, NI_MAXSERV> serv,
int32_t flags) noexcept {
const auto* ptr = reinterpret_cast<const sockaddr*>(addressof(addr));
return ::getnameinfo(ptr, sizeof(sockaddr_in6), //
@@ -58,7 +58,7 @@ auto get_address(addrinfo* list, sockaddr_in6 addr) noexcept
}
uint32_t get_address(const addrinfo& hint, //
- gsl::czstring<> host, gsl::czstring<> serv,
+ gsl::czstring host, gsl::czstring serv,
gsl::span<sockaddr_in> output) noexcept {
addrinfo* list = nullptr;
if (const auto ec = ::getaddrinfo(host, serv, //
@@ -74,7 +74,7 @@ uint32_t get_address(const addrinfo& hint, //
}
uint32_t get_address(const addrinfo& hint, //
- gsl::czstring<> host, gsl::czstring<> serv,
+ gsl::czstring host, gsl::czstring serv,
gsl::span<sockaddr_in6> output) noexcept {
addrinfo* list = nullptr;
if (const auto ec = ::getaddrinfo(host, serv, //

View File

@ -11,6 +11,7 @@ vcpkg_from_github(
PATCHES
fix-errorC7651.patch
add-noexcept-to-frame.patch
gsl-4_0_0.patch
)
vcpkg_configure_cmake(

View File

@ -1,7 +1,7 @@
{
"name": "coroutine",
"version": "1.5.0",
"port-version": 3,
"port-version": 4,
"description": "C++ 20 Coroutines helper/example library",
"homepage": "https://github.com/luncliff/coroutine",
"supports": "!uwp",

View File

@ -2,23 +2,22 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/GSL
REF 0f6dbc9e2915ef5c16830f3fa3565738de2a9230
SHA512 f72d7d9a18b8055401feb99d99f17c70c0c2015b1a2112ae13fedd27949ff7f9b30718b6afd0b5730ed5573390cb1cc987cd45b7e7fbb92f4134f11d1637ddb7
HEAD_REF master
REF a3534567187d2edc428efd3f13466ff75fe5805c
SHA512 5bd6aad37fee3b56a2ee2fed10d6ef02fdcf37a1f40b3fb1bbec8146a573e235169b315405d010ab75175674ed82658c8202f40b128a849c5250b4a1b8b0a1b3
HEAD_REF main
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DGSL_TEST=OFF
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(
vcpkg_cmake_config_fixup(
PACKAGE_NAME Microsoft.GSL
CONFIG_PATH share/cmake/Microsoft.GSL
TARGET_PATH share/Microsoft.GSL
)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

View File

@ -1,7 +1,16 @@
{
"name": "ms-gsl",
"version-string": "3.1.0",
"port-version": 1,
"version": "4.0.0",
"description": "Microsoft implementation of the Guidelines Support Library",
"homepage": "https://github.com/Microsoft/GSL"
"homepage": "https://github.com/Microsoft/GSL",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

13
ports/seal/gsl.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0039517..4cc8a01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ if(SEAL_USE_MSGSL)
message(STATUS "Microsoft GSL: download ...")
seal_fetch_thirdparty_content(ExternalMSGSL)
else()
- find_package(Microsoft.GSL 3 CONFIG)
+ find_package(Microsoft.GSL 4 CONFIG)
if(NOT Microsoft.GSL_FOUND)
message(FATAL_ERROR "Microsoft GSL: not found")
else()

View File

@ -6,6 +6,8 @@ vcpkg_from_github(
REF 79234726053c45eede688400aa219fdec0810bd8
SHA512 634ad75d70f04cce220bfa9f6d13e8ddb293e8403ebd195e2c8b522b751a1a268021feea7843038037ed6d1b354b2e470ad565966a117613cf5371073afda9a4
HEAD_REF main
PATCHES
gsl.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -1,6 +1,7 @@
{
"name": "seal",
"version-semver": "3.7.2",
"port-version": 1,
"description": "Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.",
"homepage": "https://github.com/microsoft/SEAL",
"supports": "!windows | (windows & static)",

View File

@ -1510,7 +1510,7 @@
},
"coroutine": {
"baseline": "1.5.0",
"port-version": 3
"port-version": 4
},
"corrade": {
"baseline": "2020.06",
@ -4577,8 +4577,8 @@
"port-version": 1
},
"ms-gsl": {
"baseline": "3.1.0",
"port-version": 1
"baseline": "4.0.0",
"port-version": 0
},
"ms-quic": {
"baseline": "1.2.0",
@ -6290,7 +6290,7 @@
},
"seal": {
"baseline": "3.7.2",
"port-version": 0
"port-version": 1
},
"secp256k1": {
"baseline": "2017-19-10",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c1ce0f42bbf3898d3421a3c7b6494f69853385f5",
"version": "1.5.0",
"port-version": 4
},
{
"git-tree": "d6cef429d17c011260cd718a2738ec7282098866",
"version": "1.5.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9d8d320f8c5db1a6b0c7517d110b854bc4b551e5",
"version": "4.0.0",
"port-version": 0
},
{
"git-tree": "d51947d40835a72b1728c68ca8587e04e3f8e1e2",
"version-string": "3.1.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "11dc6c4e8b720416ff6ce195e48287982a6131ec",
"version-semver": "3.7.2",
"port-version": 1
},
{
"git-tree": "f60c9b8a5bafea149666d032b375f1b3980dd3ca",
"version-semver": "3.7.2",