From 423d9f01a7195a9fd13998500d57f532344eae38 Mon Sep 17 00:00:00 2001 From: Vito Gamberini Date: Wed, 23 Mar 2022 00:50:33 -0400 Subject: [PATCH] [ztd-text] Add port (#23662) * Add ztd-text port * [ztd-text] Add supports: !uwp * [ztd-text] Switch to version-date, update to latest --- ports/ztd-text/portfile.cmake | 37 +++++++++++++++++++++++++++++++++++ ports/ztd-text/usage | 4 ++++ ports/ztd-text/vcpkg.json | 14 +++++++++++++ versions/baseline.json | 4 ++++ versions/z-/ztd-text.json | 9 +++++++++ 5 files changed, 68 insertions(+) create mode 100644 ports/ztd-text/portfile.cmake create mode 100644 ports/ztd-text/usage create mode 100644 ports/ztd-text/vcpkg.json create mode 100644 versions/z-/ztd-text.json diff --git a/ports/ztd-text/portfile.cmake b/ports/ztd-text/portfile.cmake new file mode 100644 index 0000000000..377a475b06 --- /dev/null +++ b/ports/ztd-text/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH ZTD_CMAKE_PATH + REPO soasis/cmake + REF 4277edaf7bf237de07c4a9833f6546872ab9f151 + SHA512 f05143068a1f22bd46aa0d8c250afb04b29ffbc0f32d746093bfb61f274d0e212ff9786a5163608097ed989b5b212d73811179f311a37d2b2eedce89cc75ee94 + HEAD_REF main +) + +vcpkg_from_github( + OUT_SOURCE_PATH ZTD_IDK_PATH + REPO soasis/idk + REF 6173bb3d433a3dab65e8c356ef69441aa5a86275 + SHA512 083711e9fc9b03aac34c5a7e182691a9bc9ee2d7c2d9ed2f55093423e2655f7a3829bd3e3db82bc42a78721795ca2d21a7b64c71f05e3c03ea3198f6228eb6f2 + HEAD_REF main +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO soasis/text + REF d76205c12300234f815e099e5f8152f443515df5 + SHA512 836b6cb1a59cd1138bc4c00f9f511bced912d1d5dc36a4a7d757ef1cd7e31cf5046b5a32476ffa89ea9c0ca7834028774f9baa8c74bfc9287cc16ef3b4e987df + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_ZTD.CMAKE=${ZTD_CMAKE_PATH} + -DFETCHCONTENT_SOURCE_DIR_ZTD.IDK=${ZTD_IDK_PATH} +) +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ztd-text/usage b/ports/ztd-text/usage new file mode 100644 index 0000000000..86c8ef9fc2 --- /dev/null +++ b/ports/ztd-text/usage @@ -0,0 +1,4 @@ +The package ztd-text is header only and can be used from CMake via: + + find_path(ZTD_INCLUDE_DIRS ztd) + target_include_directories(main PRIVATE ${ZTD_INCLUDE_DIRS}) diff --git a/ports/ztd-text/vcpkg.json b/ports/ztd-text/vcpkg.json new file mode 100644 index 0000000000..1de4a13965 --- /dev/null +++ b/ports/ztd-text/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "ztd-text", + "version-date": "2022-03-21", + "description": "A spicy text library.", + "homepage": "https://github.com/soasis/text", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index ea16f432c9..8334322aac 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7660,6 +7660,10 @@ "baseline": "1.0.4", "port-version": 2 }, + "ztd-text": { + "baseline": "2022-03-21", + "port-version": 0 + }, "zug": { "baseline": "2021-04-23", "port-version": 0 diff --git a/versions/z-/ztd-text.json b/versions/z-/ztd-text.json new file mode 100644 index 0000000000..11d2b3dc25 --- /dev/null +++ b/versions/z-/ztd-text.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "594b7d2a437b6576bfd4993e9763cac18621e903", + "version-date": "2022-03-21", + "port-version": 0 + } + ] +}