[ada-idna] add new port (#44459)

This commit is contained in:
toge 2025-04-03 16:44:32 +09:00 committed by GitHub
parent d9f0fa32ba
commit 09f6a4ef2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1eda0c..af4079e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,8 +51,6 @@ else()
endif()
endif(BUILD_TESTING)
-add_subdirectory(singleheader)
-
add_library(ada-idna::ada-idna ALIAS ada-idna)
set_target_properties(
@@ -83,3 +81,8 @@ install(
ARCHIVE COMPONENT ada-idna_development
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
+
+install(EXPORT ada-idna_targets
+ FILE unofficial-ada-idna-config.cmake
+ NAMESPACE unofficial::ada-idna::
+ DESTINATION share/unofficial-ada-idna)

View File

@ -0,0 +1,28 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ada-url/idna
REF "${VERSION}"
SHA512 d0176445c0f98f6adc399c4a853248bd4b34cae9d151baf85ee60d285ec0fab59adeb4b3997fca0e9554bc6781bb7b6ac9ce74e8e3f1f04e863ea15c6b61845e
HEAD_REF main
PATCHES
install.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DADA_IDNA_BENCHMARKS=OFF
-DBUILD_TESTING=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-ada-idna)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(
COMMENT "ada-idna is dual licensed under Apache-2.0 and MIT"
FILE_LIST
"${SOURCE_PATH}/LICENSE-APACHE"
"${SOURCE_PATH}/LICENSE-MIT"
)

17
ports/ada-idna/vcpkg.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "ada-idna",
"version": "0.3.2",
"description": "C++ library implementing the to_ascii and to_unicode functions from the Unicode Technical Standard.",
"homepage": "https://github.com/ada-url/idna",
"license": "Apache-2.0 AND MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "08833326cf37f9782d88c2918e55ea31570647a1",
"version": "0.3.2",
"port-version": 0
}
]
}

View File

@ -36,6 +36,10 @@
"baseline": "3.9.5",
"port-version": 17
},
"ada-idna": {
"baseline": "0.3.2",
"port-version": 0
},
"ada-url": {
"baseline": "3.2.2",
"port-version": 0