diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/utf8proc | |
Diffstat (limited to 'vcpkg/ports/utf8proc')
| -rw-r--r-- | vcpkg/ports/utf8proc/portfile.cmake | 38 | ||||
| -rw-r--r-- | vcpkg/ports/utf8proc/unofficial-utf8proc-config.cmake | 11 | ||||
| -rw-r--r-- | vcpkg/ports/utf8proc/vcpkg.json | 17 |
3 files changed, 66 insertions, 0 deletions
diff --git a/vcpkg/ports/utf8proc/portfile.cmake b/vcpkg/ports/utf8proc/portfile.cmake new file mode 100644 index 0000000..f7cbc20 --- /dev/null +++ b/vcpkg/ports/utf8proc/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO JuliaLang/utf8proc + REF v${VERSION} + SHA512 bf9bfb20036e8b709449ee4a11592becf99e61f4c82d03519ab9de1a93ca47d6f8ed4b0bb471f7ca3ae06293275a391a9102ae810a9e07e914789d05ddbd25ab +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DUTF8PROC_ENABLE_TESTING=OFF + -DUTF8PROC_INSTALL=ON +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/utf8proc) +vcpkg_fixup_pkgconfig() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/utf8proc.h" "#ifdef UTF8PROC_STATIC" "#if 1 /* UTF8PROC_STATIC */") + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/utf8proc_static.lib") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libutf8proc.pc" " -lutf8proc" " -lutf8proc_static") + if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libutf8proc.pc" " -lutf8proc" " -lutf8proc_static") + endif() + endif() +endif() + +# Legacy +file(INSTALL "${CURRENT_PORT_DIR}/unofficial-utf8proc-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-utf8proc") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") diff --git a/vcpkg/ports/utf8proc/unofficial-utf8proc-config.cmake b/vcpkg/ports/utf8proc/unofficial-utf8proc-config.cmake new file mode 100644 index 0000000..be4541f --- /dev/null +++ b/vcpkg/ports/utf8proc/unofficial-utf8proc-config.cmake @@ -0,0 +1,11 @@ +message(WARNING "find_package(unofficial-utf8proc) is deprecated. +utf8proc provides CMake targets: + + find_package(utf8proc) + target_link_libraries(main PRIVATE utf8proc::utf8proc) +") +include(CMakeFindDependencyMacro) +find_dependency(utf8proc CONFIG) +if(NOT TARGET utf8proc) + add_library(utf8proc ALIAS utf8proc::utf8proc) +endif() diff --git a/vcpkg/ports/utf8proc/vcpkg.json b/vcpkg/ports/utf8proc/vcpkg.json new file mode 100644 index 0000000..ad61f74 --- /dev/null +++ b/vcpkg/ports/utf8proc/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "utf8proc", + "version": "2.11.0", + "description": "Clean C library for processing UTF-8 Unicode data.", + "homepage": "https://github.com/JuliaLang/utf8proc", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |