From fd5058aad6e5c6555827ca7f4e155cb96cbd07be Mon Sep 17 00:00:00 2001 From: mg152 <108856779+mg152@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:08:16 +0300 Subject: [PATCH] [uni-algo] Add new port (#29717) * [uni-algo] Add new port * [uni-algo] Update hash * [uni-algo] Remove header-only feature vcpkg maintainer-guide.md: Do not use features to implement alternatives Header-only/constexpr feature in v0.7.0 doesn't implement one system locale function so it violates this rule. * [uni-algo] Clean excessive comments vcpkg maintainer-guide.md: Avoid excessive comments in portfiles * [uni-algo] Format json * [uni-algo] Update baseline Run: vcpkg x-add-version uni-algo * [uni-algo] Remove vcpkg_minimum_required * [uni-algo] Update baseline * [uni-algo] Enable install always * [uni-algo] Rerun x-add-version --- ports/uni-algo/portfile.cmake | 27 +++++++++++++++++++++++++++ ports/uni-algo/usage | 4 ++++ ports/uni-algo/vcpkg.json | 17 +++++++++++++++++ versions/baseline.json | 4 ++++ versions/u-/uni-algo.json | 9 +++++++++ 5 files changed, 61 insertions(+) create mode 100644 ports/uni-algo/portfile.cmake create mode 100644 ports/uni-algo/usage create mode 100644 ports/uni-algo/vcpkg.json create mode 100644 versions/u-/uni-algo.json diff --git a/ports/uni-algo/portfile.cmake b/ports/uni-algo/portfile.cmake new file mode 100644 index 0000000000..8d31cf0e5b --- /dev/null +++ b/ports/uni-algo/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uni-algo/uni-algo + REF "v${VERSION}" + SHA512 031d6ec2a1a2c09972a68d7b9bf49a209441e69802d5d8d37b2a37d9b6e002427496d420629d2119dc1d0e80f38c7b220e253b0858db5f172789472447041799 + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DUNI_ALGO_INSTALL=ON +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(NO_PREFIX_CORRECTION) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +# Remove empty directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/uni_algo/impl/doc") + +# Install copyright and usage +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/uni-algo/usage b/ports/uni-algo/usage new file mode 100644 index 0000000000..c60950b1c5 --- /dev/null +++ b/ports/uni-algo/usage @@ -0,0 +1,4 @@ +The package uni-algo provides CMake targets: + + find_package(uni-algo CONFIG REQUIRED) + target_link_libraries(main PRIVATE uni-algo::uni-algo) diff --git a/ports/uni-algo/vcpkg.json b/ports/uni-algo/vcpkg.json new file mode 100644 index 0000000000..664bf99760 --- /dev/null +++ b/ports/uni-algo/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "uni-algo", + "version-semver": "0.7.0", + "description": "Unicode Algorithms Implementation", + "homepage": "https://github.com/uni-algo/uni-algo", + "license": "Unlicense OR MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 99db366608..94e9771b6e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7924,6 +7924,10 @@ "baseline": "2022-01-21", "port-version": 1 }, + "uni-algo": { + "baseline": "0.7.0", + "port-version": 0 + }, "unicorn": { "baseline": "1.0.3", "port-version": 0 diff --git a/versions/u-/uni-algo.json b/versions/u-/uni-algo.json new file mode 100644 index 0000000000..0800588a6a --- /dev/null +++ b/versions/u-/uni-algo.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "ae30ff42462d61d142eca81383fb9a7c9df3703a", + "version-semver": "0.7.0", + "port-version": 0 + } + ] +}