[dyno] add new port (#34684)

* [dyno] add new port

* [dyno] add new port
This commit is contained in:
Jia Yue Hua 2023-10-29 09:01:42 +08:00 committed by GitHub
parent ff9b47f7c7
commit 06c79a9afa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 91 additions and 0 deletions

30
ports/dyno/fix-deps.patch Normal file
View File

@ -0,0 +1,30 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c7c421..1b8b2bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,9 +14,8 @@ add_library(dyno INTERFACE)
add_library(Dyno::dyno ALIAS dyno)
target_compile_features(dyno INTERFACE cxx_std_17)
target_include_directories(dyno INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
-find_package(Hana REQUIRED)
-find_package(CallableTraits REQUIRED)
-target_link_libraries(dyno INTERFACE hana callable_traits)
+find_package(Boost REQUIRED)
+target_link_libraries(dyno INTERFACE Boost::boost)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-Wno-gnu-string-literal-operator-template" DYNO_HAS_WNO_GNU_STRING_UDL)
diff --git a/cmake/dyno-config.cmake b/cmake/dyno-config.cmake
index 8a1845b..57aa7a1 100644
--- a/cmake/dyno-config.cmake
+++ b/cmake/dyno-config.cmake
@@ -3,8 +3,7 @@
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
include(CMakeFindDependencyMacro)
-find_dependency(Hana REQUIRED)
-find_dependency(CallableTraits REQUIRED)
+find_dependency(Boost)
if(NOT TARGET Dyno::dyno)
include("${CMAKE_CURRENT_LIST_DIR}/dyno-targets.cmake")

24
ports/dyno/portfile.cmake Normal file
View File

@ -0,0 +1,24 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ldionne/dyno
REF 56ced251f5751ef4e3fe66d4f28ccbc75b902d70
SHA512 c3f34679d1e2f3cec3757f69662d4f5db602b9028a927ad9070e70813caf18bb2a512f148e69f14aaac35a3e13abb57e1aa8e4f369993e7a01d048d70050daa6
HEAD_REF master
PATCHES fix-deps.patch
)
set(VCPKG_BUILD_TYPE release) #header-only library
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME dyno CONFIG_PATH "lib/cmake/dyno")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

5
ports/dyno/usage Normal file
View File

@ -0,0 +1,5 @@
The package dyno provides CMake targets:
find_package(dyno CONFIG REQUIRED)
target_link_libraries(main PRIVATE Dyno::dyno)

19
ports/dyno/vcpkg.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "dyno",
"version-date": "2019-11-13",
"description": "Runtime polymorphism done right",
"homepage": "https://github.com/ldionne/dyno/",
"license": "BSL-1.0",
"dependencies": [
"boost-callable-traits",
"boost-hana",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -2308,6 +2308,10 @@
"baseline": "2.2.1",
"port-version": 0
},
"dyno": {
"baseline": "2019-11-13",
"port-version": 0
},
"eabase": {
"baseline": "2.09.12",
"port-version": 3

9
versions/d-/dyno.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "3af5237e2f59d877c47c333a5c006eae66f9d00c",
"version-date": "2019-11-13",
"port-version": 0
}
]
}