From ec5dd004963fbbbce0a80fa56ca2accac3652f30 Mon Sep 17 00:00:00 2001 From: Rostyslav Skrypnyk Date: Fri, 7 Jun 2024 11:09:58 +0200 Subject: [PATCH] [astr] New port (#38734) --------- Co-authored-by: Rostyslav Skrypnyk Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> Co-authored-by: Monica --- ports/astr/portfile.cmake | 25 +++++++++++++++++++++++++ ports/astr/usage | 4 ++++ ports/astr/vcpkg.json | 17 +++++++++++++++++ versions/a-/astr.json | 9 +++++++++ versions/baseline.json | 4 ++++ 5 files changed, 59 insertions(+) create mode 100644 ports/astr/portfile.cmake create mode 100644 ports/astr/usage create mode 100644 ports/astr/vcpkg.json create mode 100644 versions/a-/astr.json diff --git a/ports/astr/portfile.cmake b/ports/astr/portfile.cmake new file mode 100644 index 0000000000..f50b630453 --- /dev/null +++ b/ports/astr/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO a4z/astr + REF "${VERSION}" + SHA512 4b730674d992efa94c3b4d290aeafc0b076fc6ca6033cc2aed90b92d77ff19498fb5af9fa83fa7b136d428e762518d9fb28bacf3965a9f4030f39e73aca89630 + HEAD_REF main +) + +set(VCPKG_BUILD_TYPE release) # header-only + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/astr/usage b/ports/astr/usage new file mode 100644 index 0000000000..d6f087444f --- /dev/null +++ b/ports/astr/usage @@ -0,0 +1,4 @@ +astr provides CMake targets: + + find_package(astr CONFIG REQUIRED) + target_link_libraries(main PRIVATE a4z::astr) diff --git a/ports/astr/vcpkg.json b/ports/astr/vcpkg.json new file mode 100644 index 0000000000..9bfd3833d2 --- /dev/null +++ b/ports/astr/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "astr", + "version": "0.2.1", + "description": "Compile-time array string header-only library.", + "homepage": "https://github.com/a4z/astr", + "license": "MPL-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/a-/astr.json b/versions/a-/astr.json new file mode 100644 index 0000000000..7386923504 --- /dev/null +++ b/versions/a-/astr.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "a1f0a0fddb4d32a4b31a61a3ba5fb4ce21ef998f", + "version": "0.2.1", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 7a5a383287..4c013144c7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -280,6 +280,10 @@ "baseline": "5.4.0", "port-version": 0 }, + "astr": { + "baseline": "0.2.1", + "port-version": 0 + }, "async-mqtt": { "baseline": "5.1.1", "port-version": 0