Add unicode-ranges port

This commit is contained in:
Cornea Cristian 2026-09-02 00:47:49 +03:00
parent 30ef65cad9
commit 4fbfc8b95d
5 changed files with 94 additions and 0 deletions

View File

@ -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"
)

View File

@ -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]

View File

@ -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"
]
}
}
}

View File

@ -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

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "86d41bd8be8e36ba27292e8cb30d1c2a5af2d631",
"version-semver": "0.1.0",
"port-version": 0
}
]
}