diff --git a/ports/unicode-ranges/portfile.cmake b/ports/unicode-ranges/portfile.cmake new file mode 100644 index 0000000000..a5ea262287 --- /dev/null +++ b/ports/unicode-ranges/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cristi1990an/unicode_ranges + REF "v${VERSION}" + SHA512 85c9d03c45347e8cba8c01f94d016fc107cdf39acae048e746b91d0679a6be787903e1398a9c7b9b448de49aecc465efb6bcd9940fce8009b1387dc0a4620385 + HEAD_REF main +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + icu UTF8_RANGES_ENABLE_ICU +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DUTF8_RANGES_BUILD_TESTS=OFF + -DUTF8_RANGES_BUILD_BENCHMARKS=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup( + PACKAGE_NAME unicode_ranges + CONFIG_PATH lib/cmake/unicode_ranges +) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +file(INSTALL + "${CMAKE_CURRENT_LIST_DIR}/usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" +) + +vcpkg_install_copyright( + FILE_LIST + "${SOURCE_PATH}/LICENSE" + "${SOURCE_PATH}/LICENSE-MIT" + "${SOURCE_PATH}/LICENSE-APACHE" + "${SOURCE_PATH}/THIRD_PARTY_NOTICES.md" +) diff --git a/ports/unicode-ranges/usage b/ports/unicode-ranges/usage new file mode 100644 index 0000000000..de82c66620 --- /dev/null +++ b/ports/unicode-ranges/usage @@ -0,0 +1,8 @@ +unicode-ranges provides the CMake target: + + find_package(unicode_ranges CONFIG REQUIRED) + target_link_libraries(main PRIVATE unicode_ranges::unicode_ranges) + +Enable ICU-backed locale-aware casing with the `icu` feature: + + vcpkg install unicode-ranges[icu] diff --git a/ports/unicode-ranges/vcpkg.json b/ports/unicode-ranges/vcpkg.json new file mode 100644 index 0000000000..ebae53ab76 --- /dev/null +++ b/ports/unicode-ranges/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "unicode-ranges", + "version-semver": "0.1.0", + "description": "C++23 validated UTF-8, UTF-16, and UTF-32 text types and algorithms", + "homepage": "https://github.com/cristi1990an/unicode_ranges", + "license": "MIT OR Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "icu": { + "description": "Enable ICU-backed locale-aware casing", + "dependencies": [ + "icu" + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 62608c93b8..ffdc5f545b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -10504,6 +10504,10 @@ "baseline": "1.2.0", "port-version": 0 }, + "unicode-ranges": { + "baseline": "0.1.0", + "port-version": 0 + }, "unicorn": { "baseline": "2.1.4", "port-version": 0 diff --git a/versions/u-/unicode-ranges.json b/versions/u-/unicode-ranges.json new file mode 100644 index 0000000000..7cbc835f9c --- /dev/null +++ b/versions/u-/unicode-ranges.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "86d41bd8be8e36ba27292e8cb30d1c2a5af2d631", + "version-semver": "0.1.0", + "port-version": 0 + } + ] +}