[curl] General LDAP support, test port (#37152)

This commit is contained in:
Kai Pastor 2024-03-13 23:48:53 +01:00 committed by GitHub
parent ad8f678064
commit d5551b8e6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 109 additions and 29 deletions

View File

@ -1,15 +0,0 @@
diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt
index 52787f5..aa3687d 100644
--- a/cpr/CMakeLists.txt
+++ b/cpr/CMakeLists.txt
@@ -46,6 +46,10 @@ set_target_properties(cpr
VERSION ${${PROJECT_NAME}_VERSION}
SOVERSION ${${PROJECT_NAME}_VERSION_MAJOR})
+if (NOT DISABLE_INSTALL_HEADERS)
+ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../include/cpr DESTINATION include)
+endif()
+
# Import GNU common install directory variables
include(GNUInstallDirs)

View File

@ -7,7 +7,6 @@ vcpkg_from_github(
SHA512 5e2fe69d5b4dfaa67f636098c8da904b43a22b21cc78bc52446e572ea47f492ce1de0f47fdc2cf34207729ccf007449278f218d8cdeef21f0b98356bca2e5e49
HEAD_REF master
PATCHES
001-cpr-config.patch
disable_werror.patch
)
@ -20,10 +19,14 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCPR_BUILD_TESTS=OFF
-DCPR_FORCE_USE_SYSTEM_CURL=ON
-DCPR_USE_SYSTEM_CURL=ON
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DDISABLE_INSTALL_HEADERS=ON
# skip test for unused sanitizer flags
-DTHREAD_SANITIZER_AVAILABLE=OFF
-DADDRESS_SANITIZER_AVAILABLE=OFF
-DLEAK_SANITIZER_AVAILABLE=OFF
-DUNDEFINED_BEHAVIOUR_SANITIZER_AVAILABLE=OFF
-DALL_SANITIZERS_AVAILABLE=OFF
)
vcpkg_cmake_install()

View File

@ -1,7 +1,7 @@
{
"name": "cpr",
"version-semver": "1.10.5",
"port-version": 1,
"port-version": 2,
"description": "C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.",
"homepage": "https://github.com/libcpr/cpr",
"license": "MIT",

View File

@ -67,6 +67,8 @@ function(vcpkg_curl_flatten input output)
set(lib -l${CMAKE_MATCH_1})
elseif(lib MATCHES ".*/${CMAKE_STATIC_LIBRARY_PREFIX}([^/]*)${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(lib -l${CMAKE_MATCH_1})
elseif(lib MATCHES ".*/${CMAKE_SHARED_LIBRARY_PREFIX}([^/]*)${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(lib -l${CMAKE_MATCH_1})
endif()
if(NOT "${lib}" IN_LIST output_libs)
list(PREPEND output_libs "${lib}")
@ -79,3 +81,14 @@ if(USE_LIBIDN2)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBIDN2 REQUIRED libidn2)
endif()
if(NOT CURL_DISABLE_LDAP AND NOT WIN32)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LDAP REQUIRED ldap)
set(HAVE_LIBLDAP 1)
set(CMAKE_LDAP_INCLUDE_DIR "${LDAP_INCLUDE_DIRS}")
set(CMAKE_LDAP_LIB "${LDAP_LINK_LIBRARIES}" CACHE STRING "")
pkg_check_modules(LBER REQUIRED lber)
set(HAVE_LIBLBER 1)
set(CMAKE_LBER_LIB "${LBER_LINK_LIBRARIES}" CACHE STRING "")
endif()

View File

@ -33,16 +33,16 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
sectransp CURL_USE_SECTRANSP
idn2 USE_LIBIDN2
winidn USE_WIN32_IDN
winldap USE_WIN32_LDAP
websockets ENABLE_WEBSOCKETS
zstd CURL_ZSTD
INVERTED_FEATURES
ldap CURL_DISABLE_LDAP
ldap CURL_DISABLE_LDAPS
non-http HTTP_ONLY
winldap CURL_DISABLE_LDAP # Only WinLDAP support ATM
)
set(OPTIONS "")
if("idn2" IN_LIST FEATURES)
if("idn2" IN_LIST FEATURES OR ("ldap" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS))
vcpkg_find_acquire_program(PKGCONFIG)
list(APPEND OPTIONS "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}")
endif()
@ -71,7 +71,7 @@ vcpkg_cmake_configure(
${FEATURE_OPTIONS}
${OPTIONS}
-DBUILD_TESTING=OFF
-DENABLE_MANUAL=OFF
-DENABLE_CURL_MANUAL=OFF
-DCURL_CA_FALLBACK=ON
-DCURL_USE_LIBPSL=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON

View File

@ -1,6 +1,7 @@
{
"name": "curl",
"version": "8.6.0",
"port-version": 1,
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": "curl AND ISC AND BSD-3-Clause",
@ -72,6 +73,23 @@
"libidn2"
]
},
"ldap": {
"description": "LDAP support",
"supports": "!uwp",
"dependencies": [
{
"name": "curl",
"default-features": false,
"features": [
"non-http"
]
},
{
"name": "openldap",
"platform": "!windows"
}
]
},
"mbedtls": {
"description": "SSL support (mbedTLS)",
"dependencies": [
@ -169,14 +187,13 @@
"supports": "windows"
},
"winldap": {
"description": "LDAP support (WinLDAP). This feature does not include LDAPS support.",
"supports": "windows & !uwp",
"description": "Obsolete. Use feature 'ldap' instead.",
"dependencies": [
{
"name": "curl",
"default-features": false,
"features": [
"non-http"
"ldap"
]
}
]

View File

@ -1260,6 +1260,17 @@ vcpkg-ci-boost:x64-windows-static-md=pass
vcpkg-ci-boost:x64-windows-static=pass
vcpkg-ci-boost:x64-windows=pass
vcpkg-ci-boost:x86-windows=pass
vcpkg-ci-curl:arm-neon-android=pass
vcpkg-ci-curl:arm64-android=pass
vcpkg-ci-curl:x64-android=pass
vcpkg-ci-curl:x64-linux=pass
vcpkg-ci-curl:arm64-osx=pass
vcpkg-ci-curl:x64-osx=pass
vcpkg-ci-curl:arm64-windows=pass
vcpkg-ci-curl:x64-windows-static-md=pass
vcpkg-ci-curl:x64-windows-static=pass
vcpkg-ci-curl:x64-windows=pass
vcpkg-ci-curl:x86-windows=pass
vcpkg-ci-ffmpeg:arm64-uwp=pass
vcpkg-ci-ffmpeg:arm64-windows=pass
vcpkg-ci-ffmpeg:x64-linux=pass

View File

@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View File

@ -0,0 +1,40 @@
{
"name": "vcpkg-ci-curl",
"version-date": "2024-03-05",
"description": "Port to force features of certain ports within CI",
"homepage": "https://github.com/microsoft/vcpkg",
"license": "MIT",
"dependencies": [
{
"name": "curl",
"features": [
"http2",
"zstd"
]
},
{
"$comment": "Known to break aws-sdk-cpp.",
"name": "curl",
"features": [
"brotli"
],
"platform": "!osx"
},
{
"$comment": "Known to be fixed by libidn2 update.",
"name": "curl",
"features": [
"idn"
],
"platform": "!android"
},
{
"name": "curl",
"features": [
"ldap",
"tool"
],
"platform": "!android & !uwp"
}
]
}

View File

@ -1950,7 +1950,7 @@
},
"cpr": {
"baseline": "1.10.5",
"port-version": 1
"port-version": 2
},
"cpu-features": {
"baseline": "0.9.0",
@ -2062,7 +2062,7 @@
},
"curl": {
"baseline": "8.6.0",
"port-version": 0
"port-version": 1
},
"curlpp": {
"baseline": "2018-06-15",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "25dbacaabb8b12e7032cbad5e03434c983732f2a",
"version-semver": "1.10.5",
"port-version": 2
},
{
"git-tree": "83379af62bd0d170537dd4ee3abba017d4a54659",
"version-semver": "1.10.5",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1e5908adb574672dfc7a65baa8523ae184f5c0b7",
"version": "8.6.0",
"port-version": 1
},
{
"git-tree": "dba7665cff5bd6f1a31ad0aa864fd83049eac93e",
"version": "8.6.0",