[libcoro] New Port (#30623)

* Add libcoro 0.7

* Update CI baseline

* Add "supports": "!windows"

* Update CI baseline

* Remove unneeded vcpkg-cmake-config dependency

* Update CI baseline

* Disable x64-linux and x64-osx in ci.baseline.txt

* Apply code review suggestions

* Update CI baseline

* Add patch to disable git config

* Update CI baseline

* Fix patch

* Update CI baseline

* Allow shared library builds

* Update CI baseline

* Update libcoro to version 0.8

* Update CI baseline

* Update CI baseline

* Fix line endings

* Update CI baseline

* Fix hash

* Update CI baseline

* Update version database

* Force rerun of CI pipeline

* Update to libcoro 0.9

* Update CI baseline

* Replace manual dependency check with manifest-based one

* Remove v0.8 version

* Update CI baseline

---------

Co-authored-by: chausner <chausner@users.noreply.github.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
chausner 2023-10-02 18:47:20 +02:00 committed by GitHub
parent c6d6efed3e
commit 38dd6b15ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 122 additions and 0 deletions

View File

@ -0,0 +1,9 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,4 +92,4 @@
endif()
-add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES})
+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "")

View File

@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,9 +7,9 @@
# Set the githooks directory to auto format and update the readme.
-message("${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} -> git config --local core.hooksPath .githooks")
-execute_process(
- COMMAND git config --local core.hooksPath .githooks
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
+#message("${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} -> git config --local core.hooksPath .githooks")
+#execute_process(
+# COMMAND git config --local core.hooksPath .githooks
+# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+#)
option(LIBCORO_EXTERNAL_DEPENDENCIES "Use Cmake find_package to resolve dependencies instead of embedded libraries, Default=OFF." OFF)

View File

@ -0,0 +1,34 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jbaldwin/libcoro
REF "v${VERSION}"
SHA512 9554fcaf721188e2475933fb8fe6b35f879479af9acb8b011545d66e588a98811f69100a4392e62c3c8bf05e8177760778c44ed4357d40d0a6349833a93fb8e8
HEAD_REF master
PATCHES
0001-allow-shared-lib.patch
0002-disable-git-config.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
networking LIBCORO_FEATURE_NETWORKING
ssl LIBCORO_FEATURE_SSL
threading LIBCORO_FEATURE_THREADING
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DLIBCORO_EXTERNAL_DEPENDENCIES=ON
-DLIBCORO_BUILD_TESTS=OFF
-DLIBCORO_BUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
vcpkg_fixup_pkgconfig()

44
ports/libcoro/vcpkg.json Normal file
View File

@ -0,0 +1,44 @@
{
"name": "libcoro",
"version": "0.9",
"description": "C++20 coroutine library",
"homepage": "https://github.com/jbaldwin/libcoro",
"license": "Apache-2.0",
"supports": "!windows",
"dependencies": [
"tl-expected",
{
"name": "vcpkg-cmake",
"host": true
}
],
"default-features": [
"networking",
"ssl",
"threading"
],
"features": {
"networking": {
"description": "Include networking features.",
"dependencies": [
"c-ares"
]
},
"ssl": {
"description": "Include SSL features.",
"dependencies": [
{
"name": "libcoro",
"default-features": false,
"features": [
"networking"
]
},
"openssl"
]
},
"threading": {
"description": "Include multithreading features."
}
}
}

View File

@ -543,6 +543,10 @@ libcanberra:arm-neon-android=fail
libcanberra:arm64-android=fail
libcanberra:x64-android=fail
libcerf:x64-windows-static-md=fail
libcoro:arm-neon-android=fail
libcoro:arm64-android=fail
libcoro:x64-android=fail
libcoro:x64-osx=fail
libcpplocate:arm-neon-android=fail
libcpplocate:arm64-android=fail
libcpplocate:x64-android=fail

View File

@ -4016,6 +4016,10 @@
"baseline": "2.2.0",
"port-version": 0
},
"libcoro": {
"baseline": "0.9",
"port-version": 0
},
"libcorrect": {
"baseline": "2018-10-11",
"port-version": 0

9
versions/l-/libcoro.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "36f9c61aa64e8be9670199b9efad6cec4e83b805",
"version": "0.9",
"port-version": 0
}
]
}