aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/ada-url
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/ada-url
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/ada-url')
-rw-r--r--vcpkg/ports/ada-url/no-cpm.patch31
-rw-r--r--vcpkg/ports/ada-url/portfile.cmake45
-rw-r--r--vcpkg/ports/ada-url/vcpkg.json27
3 files changed, 103 insertions, 0 deletions
diff --git a/vcpkg/ports/ada-url/no-cpm.patch b/vcpkg/ports/ada-url/no-cpm.patch
new file mode 100644
index 0000000..8b00cca
--- /dev/null
+++ b/vcpkg/ports/ada-url/no-cpm.patch
@@ -0,0 +1,31 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1b55e39..23ce61f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,7 +22,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake)
+ # errors due to CPM, so this is here to support disabling all the testing
+ # and tooling for ada if one only wishes to use the ada library.
+ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
+- include(cmake/CPM.cmake)
+ # CPM requires git as an implicit dependency
+ # We use googletest in the tests
+ if(ADA_TESTING)
+diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt
+index 397b428..4b49928 100644
+--- a/tools/cli/CMakeLists.txt
++++ b/tools/cli/CMakeLists.txt
+@@ -8,12 +8,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
+ "$<TARGET_FILE:ada>" # <--this is in-file
+ "$<TARGET_FILE_DIR:adaparse>") # <--this is out-file path
+ endif()
+-CPMAddPackage("gh:fmtlib/fmt#11.0.2")
+-CPMAddPackage(
+- GITHUB_REPOSITORY jarro2783/cxxopts
+- VERSION 3.2.0
+- OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
+-)
++find_package(cxxopts CONFIG REQUIRED)
++find_package(fmt CONFIG REQUIRED)
+ target_link_libraries(adaparse PRIVATE cxxopts::cxxopts fmt::fmt)
+
+ if(MSVC OR MINGW)
diff --git a/vcpkg/ports/ada-url/portfile.cmake b/vcpkg/ports/ada-url/portfile.cmake
new file mode 100644
index 0000000..43d8ebd
--- /dev/null
+++ b/vcpkg/ports/ada-url/portfile.cmake
@@ -0,0 +1,45 @@
+if(VCPKG_TARGET_IS_LINUX)
+ message(WARNING "Building ${PORT} requires a C++20 compliant compiler. GCC 12 and Clang 15 are known to work.")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ada-url/ada
+ REF "v${VERSION}"
+ SHA512 728bf278fcac51a8ffdf5571cb486e789cd49511674c61e354c802bbfaeea64598fb22cd28ef4b02eacdd42c1c3437f40666ca8dba8097e0ecebbae1095de77f
+ HEAD_REF main
+ PATCHES
+ no-cpm.patch
+)
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ tools ADA_TOOLS
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DADA_BENCHMARKS=OFF
+ -DADA_TESTING=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON
+ ${FEATURE_OPTIONS}
+ OPTIONS_DEBUG
+ -DADA_TOOLS=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME ada CONFIG_PATH "lib/cmake/ada")
+vcpkg_fixup_pkgconfig()
+
+if("tools" IN_LIST FEATURES)
+ vcpkg_copy_tools(TOOL_NAMES adaparse AUTO_CLEAN)
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE-APACHE" "${SOURCE_PATH}/LICENSE-MIT")
diff --git a/vcpkg/ports/ada-url/vcpkg.json b/vcpkg/ports/ada-url/vcpkg.json
new file mode 100644
index 0000000..f7fed21
--- /dev/null
+++ b/vcpkg/ports/ada-url/vcpkg.json
@@ -0,0 +1,27 @@
+{
+ "name": "ada-url",
+ "version": "3.3.0",
+ "description": "WHATWG-compliant and fast URL parser written in modern C++",
+ "homepage": "https://ada-url.com/",
+ "license": "MIT OR Apache-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "tools": {
+ "description": "Build CLI tools (adaparse)",
+ "supports": "!uwp",
+ "dependencies": [
+ "cxxopts",
+ "fmt"
+ ]
+ }
+ }
+}