diff --git a/ports/libcoro/0001-allow-shared-lib.patch b/ports/libcoro/0001-allow-shared-lib.patch new file mode 100644 index 00000000000000..47de8119bc6873 --- /dev/null +++ b/ports/libcoro/0001-allow-shared-lib.patch @@ -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 "") diff --git a/ports/libcoro/0002-disable-git-config.patch b/ports/libcoro/0002-disable-git-config.patch new file mode 100644 index 00000000000000..f25833ae0427c7 --- /dev/null +++ b/ports/libcoro/0002-disable-git-config.patch @@ -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) diff --git a/ports/libcoro/portfile.cmake b/ports/libcoro/portfile.cmake new file mode 100644 index 00000000000000..e48f240e97b6b0 --- /dev/null +++ b/ports/libcoro/portfile.cmake @@ -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() diff --git a/ports/libcoro/vcpkg.json b/ports/libcoro/vcpkg.json new file mode 100644 index 00000000000000..e6a9891b064e4d --- /dev/null +++ b/ports/libcoro/vcpkg.json @@ -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." + } + } +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 60551c8a95c41e..ec3f2591e0e5ee 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -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 diff --git a/versions/baseline.json b/versions/baseline.json index 928f7d9ffd4589..d1f8339b9e290b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/l-/libcoro.json b/versions/l-/libcoro.json new file mode 100644 index 00000000000000..12ad22eb9c352a --- /dev/null +++ b/versions/l-/libcoro.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "36f9c61aa64e8be9670199b9efad6cec4e83b805", + "version": "0.9", + "port-version": 0 + } + ] +}