From 06c79a9afa6f99f02f44d20df9e0848b2a56bf1b Mon Sep 17 00:00:00 2001 From: Jia Yue Hua <3423893+jiayuehua@users.noreply.github.com> Date: Sun, 29 Oct 2023 09:01:42 +0800 Subject: [PATCH] [dyno] add new port (#34684) * [dyno] add new port * [dyno] add new port --- ports/dyno/fix-deps.patch | 30 ++++++++++++++++++++++++++++++ ports/dyno/portfile.cmake | 24 ++++++++++++++++++++++++ ports/dyno/usage | 5 +++++ ports/dyno/vcpkg.json | 19 +++++++++++++++++++ versions/baseline.json | 4 ++++ versions/d-/dyno.json | 9 +++++++++ 6 files changed, 91 insertions(+) create mode 100644 ports/dyno/fix-deps.patch create mode 100644 ports/dyno/portfile.cmake create mode 100644 ports/dyno/usage create mode 100644 ports/dyno/vcpkg.json create mode 100644 versions/d-/dyno.json diff --git a/ports/dyno/fix-deps.patch b/ports/dyno/fix-deps.patch new file mode 100644 index 0000000000..50368545fc --- /dev/null +++ b/ports/dyno/fix-deps.patch @@ -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 "$") +-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") diff --git a/ports/dyno/portfile.cmake b/ports/dyno/portfile.cmake new file mode 100644 index 0000000000..f4ddf6c845 --- /dev/null +++ b/ports/dyno/portfile.cmake @@ -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}") diff --git a/ports/dyno/usage b/ports/dyno/usage new file mode 100644 index 0000000000..9057f2a2ee --- /dev/null +++ b/ports/dyno/usage @@ -0,0 +1,5 @@ +The package dyno provides CMake targets: + + find_package(dyno CONFIG REQUIRED) + target_link_libraries(main PRIVATE Dyno::dyno) + diff --git a/ports/dyno/vcpkg.json b/ports/dyno/vcpkg.json new file mode 100644 index 0000000000..e545451e8d --- /dev/null +++ b/ports/dyno/vcpkg.json @@ -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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index f7e35427b1..ec0699888e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/d-/dyno.json b/versions/d-/dyno.json new file mode 100644 index 0000000000..a305f30d7f --- /dev/null +++ b/versions/d-/dyno.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "3af5237e2f59d877c47c333a5c006eae66f9d00c", + "version-date": "2019-11-13", + "port-version": 0 + } + ] +}