Skip to content

Commit 108afb5

Browse files
authored
[curve-coco] add new port (#49137)
1 parent 193cc05 commit 108afb5

File tree

5 files changed

+86
-0
lines changed

5 files changed

+86
-0
lines changed

ports/curve-coco/portfile.cmake

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
set(VCPKG_BUILD_TYPE release) # Header-only library
2+
vcpkg_from_github(
3+
OUT_SOURCE_PATH SOURCE_PATH
4+
REPO Curve/coco
5+
REF "v${VERSION}"
6+
SHA512 7c011553834dba0030ad01d45fcdd3b092ca1b30ccb6f500bbc3e53ed5ee3c0eb57a581347f9879e5b3746cdc3e3214d41329a6ef04988c64c9f55350d8948a3
7+
HEAD_REF master
8+
PATCHES
9+
remove-cpm.patch
10+
)
11+
12+
# Replace CPM and download PackageProject directly to avoid issues with FETCHCONTENT_FULLY_DISCONNECTED
13+
vcpkg_from_github(
14+
OUT_SOURCE_PATH PACKAGE_PROJECT_PATH
15+
REPO TheLartians/PackageProject.cmake
16+
REF "v1.13.0"
17+
SHA512 3cf0523bddc213f206ed0ca57803550cb7db9e293392d3741138be47f49d9027ef517e1656235a349a62b492d35c3fc677714dc00afe59e2d36144a9689cfa8f
18+
HEAD_REF master
19+
)
20+
file(RENAME "${PACKAGE_PROJECT_PATH}" "${SOURCE_PATH}/cmake/packageproject.cmake")
21+
22+
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
23+
24+
vcpkg_cmake_install()
25+
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/coco-${VERSION}" PACKAGE_NAME "coco")
26+
27+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") # from CMake config
28+
29+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")

ports/curve-coco/remove-cpm.patch

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 3a2434c..ae2b342 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -13,7 +13,6 @@ option(coco_exceptions "Enable exception support (Respects -fno-exceptions even
6+
# +-------------------------------------------------------------------------------------------------------+
7+
8+
add_library(${PROJECT_NAME} STATIC "src/latch.cpp" "src/stray.cpp")
9+
-add_library(cr::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
10+
11+
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
12+
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20 CXX_EXTENSIONS OFF CXX_STANDARD_REQUIRED ON)
13+
@@ -50,13 +49,7 @@ endif()
14+
# | Package Config |
15+
# +-------------------------------------------------------------------------------------------------------+
16+
17+
-include("cmake/cpm.cmake")
18+
-
19+
-CPMFindPackage(
20+
- NAME PackageProject
21+
- VERSION 1.13.0
22+
- GIT_REPOSITORY "https://github.com/TheLartians/PackageProject.cmake"
23+
-)
24+
+add_subdirectory(cmake/packageproject.cmake)
25+
26+
packageProject(
27+
NAMESPACE cr

ports/curve-coco/vcpkg.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "curve-coco",
3+
"version": "4.3.0",
4+
"description": "a C++20 coroutine library that aims to be convenient and simple to use.",
5+
"homepage": "https://github.com/Curve/coco",
6+
"license": "MIT",
7+
"dependencies": [
8+
{
9+
"name": "vcpkg-cmake",
10+
"host": true
11+
},
12+
{
13+
"name": "vcpkg-cmake-config",
14+
"host": true
15+
}
16+
]
17+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,10 @@
22682268
"baseline": "2018-06-15",
22692269
"port-version": 11
22702270
},
2271+
"curve-coco": {
2272+
"baseline": "4.3.0",
2273+
"port-version": 0
2274+
},
22712275
"cute-headers": {
22722276
"baseline": "2019-09-20",
22732277
"port-version": 2

versions/c-/curve-coco.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "428adea8bb4f40ac5b13d1331ea8e5a6a7d9abb9",
5+
"version": "4.3.0",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)