vcpkg/ports/curl/dependencies.patch

152 lines
5.1 KiB
Diff
Raw Normal View History

diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in
2024-09-11 23:03:28 +02:00
index 7dc1f99..e83617e 100644
--- a/CMake/curl-config.cmake.in
+++ b/CMake/curl-config.cmake.in
2024-09-11 23:03:28 +02:00
@@ -39,6 +39,19 @@ if(@USE_ZLIB@)
find_dependency(ZLIB @ZLIB_VERSION_MAJOR@)
endif()
2023-07-21 08:46:53 -07:00
+if("@USE_ARES@")
+ find_dependency(c-ares CONFIG)
+endif()
+if("@USE_LIBSSH2@")
+ find_dependency(Libssh2 CONFIG)
+endif()
+if("@HAVE_BROTLI@")
+ find_dependency(unofficial-brotli CONFIG)
+endif()
+if("@HAVE_ZSTD@")
+ find_dependency(zstd CONFIG)
+endif()
2023-07-21 08:46:53 -07:00
+
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")
diff --git a/CMakeLists.txt b/CMakeLists.txt
2024-09-11 23:03:28 +02:00
index dbb0bf4..f1a18d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2024-09-11 23:03:28 +02:00
@@ -234,7 +234,9 @@ set(LIBCURL_PC_REQUIRES_PRIVATE "")
if(ENABLE_ARES)
set(USE_ARES 1)
2024-09-11 23:03:28 +02:00
- find_package(Cares REQUIRED)
+ find_package(CARES NAMES c-ares REQUIRED)
+ set(CARES_INCLUDE_DIRS "")
+ set(CARES_LIBRARIES c-ares::cares)
list(APPEND CURL_LIBS ${CARES_LIBRARIES})
2024-07-31 02:42:29 +02:00
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libcares")
2024-09-11 23:03:28 +02:00
add_definitions("-DCARES_NO_DEPRECATED") # Ignore c-ares deprecation warnings
@@ -611,17 +613,11 @@ if(CURL_USE_WOLFSSL)
endif()
2024-09-11 23:03:28 +02:00
if(CURL_USE_GNUTLS)
- if(CURL_USE_PKGCONFIG)
- find_package(PkgConfig QUIET)
- pkg_check_modules(GNUTLS "gnutls")
- if(GNUTLS_FOUND)
- set(GNUTLS_LIBRARIES ${GNUTLS_LINK_LIBRARIES})
- endif()
- endif()
- if(NOT GNUTLS_FOUND)
- find_package(GnuTLS REQUIRED)
- endif()
- find_package(Nettle REQUIRED)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(GNUTLS REQUIRED gnutls)
+ set(GNUTLS_LIBRARIES "${GNUTLS_LINK_LIBRARIES}")
+ pkg_check_modules(NETTLE REQUIRED nettle)
+ set(NETTLE_LIBRARIES "${NETTLE_LINK_LIBRARIES}")
set(_ssl_enabled ON)
set(USE_GNUTLS ON)
list(APPEND CURL_LIBS ${GNUTLS_LIBRARIES} ${NETTLE_LIBRARIES})
@@ -685,7 +681,9 @@ endif()
option(CURL_BROTLI "Use brotli" OFF)
set(HAVE_BROTLI OFF)
if(CURL_BROTLI)
2023-07-21 08:46:53 -07:00
- find_package(Brotli REQUIRED)
+ find_package(BROTLI NAMES unofficial-brotli REQUIRED)
+ set(BROTLI_INCLUDE_DIRS "")
+ set(BROTLI_LIBRARIES "unofficial::brotli::brotlidec")
if(BROTLI_FOUND)
set(HAVE_BROTLI ON)
list(APPEND CURL_LIBS ${BROTLI_LIBRARIES})
2024-09-11 23:03:28 +02:00
@@ -698,7 +696,9 @@ endif()
option(CURL_ZSTD "Use zstd" OFF)
set(HAVE_ZSTD OFF)
if(CURL_ZSTD)
- find_package(Zstd REQUIRED)
2024-09-11 23:03:28 +02:00
+ find_package(ZSTD NAMES zstd REQUIRED)
+ set(ZSTD_INCLUDE_DIRS "")
+ set(ZSTD_LIBRARIES zstd::libzstd)
if(ZSTD_FOUND AND NOT ZSTD_VERSION VERSION_LESS 1.0.0)
set(HAVE_ZSTD ON)
2024-09-11 23:03:28 +02:00
list(APPEND CURL_LIBS ${ZSTD_LIBRARIES})
@@ -1033,7 +1033,9 @@ option(USE_LIBIDN2 "Use libidn2 for IDN support" ON)
set(HAVE_IDN2_H OFF)
set(HAVE_LIBIDN2 OFF)
if(USE_LIBIDN2 AND NOT USE_APPLE_IDN AND NOT USE_WIN32_IDN)
- find_package(Libidn2)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(LIBIDN2 REQUIRED libidn2)
2024-09-11 23:03:28 +02:00
+ set(LIBIDN2_LIBRARIES "${LIBIDN2_LINK_LIBRARIES}")
if(LIBIDN2_FOUND)
set(CURL_LIBS "${LIBIDN2_LIBRARIES};${CURL_LIBS}")
list(APPEND CURL_LIBDIRS ${LIBIDN2_LIBRARY_DIRS})
@@ -1054,7 +1056,17 @@ mark_as_advanced(CURL_USE_LIBPSL)
[curl] add psl feature (#38345) <!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. <!-- If this PR adds a new port, please uncomment and fill out this checklist: - [ ] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [ ] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [ ] The versioning scheme in `vcpkg.json` matches what upstream says. - [ ] The license declaration in `vcpkg.json` matches what upstream says. - [ ] The installed as the "copyright" file matches what upstream says. - [ ] The source code of the component installed comes from an authoritative source. - [ ] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [ ] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [ ] Only one version is in the new port's versions file. - [ ] Only one version is added to each modified port's versions file. END OF NEW PORT CHECKLIST (delete this line) -->
2024-04-24 17:57:12 +03:00
set(USE_LIBPSL OFF)
if(CURL_USE_LIBPSL)
2024-09-11 23:03:28 +02:00
- find_package(Libpsl) # TODO: add REQUIRED to match autotools
[curl] add psl feature (#38345) <!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. <!-- If this PR adds a new port, please uncomment and fill out this checklist: - [ ] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [ ] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [ ] The versioning scheme in `vcpkg.json` matches what upstream says. - [ ] The license declaration in `vcpkg.json` matches what upstream says. - [ ] The installed as the "copyright" file matches what upstream says. - [ ] The source code of the component installed comes from an authoritative source. - [ ] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [ ] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [ ] Only one version is in the new port's versions file. - [ ] Only one version is added to each modified port's versions file. END OF NEW PORT CHECKLIST (delete this line) -->
2024-04-24 17:57:12 +03:00
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(LIBPSL REQUIRED libpsl)
2024-09-11 23:03:28 +02:00
+ # Remove standard win32 libs pulled in transitively from icu
+ string(REPLACE " " "|" win32_standard_libraries "/(${CMAKE_C_STANDARD_LIBRARIES})[.]lib\$")
+ foreach(lib IN LISTS LIBPSL_LINK_LIBRARIES)
+ string(TOLOWER "${lib}" lib_lower)
+ if(lib_lower MATCHES win32_standard_libraries)
+ list(REMOVE_ITEM LIBPSL_LINK_LIBRARIES "${lib}")
+ endif()
+ endforeach()
+ set(LIBPSL_LIBRARIES "${LIBPSL_LINK_LIBRARIES}")
[curl] add psl feature (#38345) <!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. <!-- If this PR adds a new port, please uncomment and fill out this checklist: - [ ] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [ ] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [ ] The versioning scheme in `vcpkg.json` matches what upstream says. - [ ] The license declaration in `vcpkg.json` matches what upstream says. - [ ] The installed as the "copyright" file matches what upstream says. - [ ] The source code of the component installed comes from an authoritative source. - [ ] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [ ] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [ ] Only one version is in the new port's versions file. - [ ] Only one version is added to each modified port's versions file. END OF NEW PORT CHECKLIST (delete this line) -->
2024-04-24 17:57:12 +03:00
if(LIBPSL_FOUND)
2024-09-11 23:03:28 +02:00
list(APPEND CURL_LIBS ${LIBPSL_LIBRARIES})
2024-07-31 02:42:29 +02:00
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl")
2024-09-11 23:03:28 +02:00
@@ -1072,7 +1084,13 @@ mark_as_advanced(CURL_USE_LIBSSH2)
set(USE_LIBSSH2 OFF)
if(CURL_USE_LIBSSH2)
2024-09-11 23:03:28 +02:00
- find_package(Libssh2)
+ find_package(LIBSSH2 NAMES Libssh2 REQUIRED)
+ if(TARGET Libssh2::libssh2_shared)
2024-09-11 23:03:28 +02:00
+ set(LIBSSH2_LIBRARIES Libssh2::libssh2_shared)
+ else()
2024-09-11 23:03:28 +02:00
+ set(LIBSSH2_LIBRARIES Libssh2::libssh2_static)
+ endif()
2024-09-11 23:03:28 +02:00
+ get_target_property(LIBSSH2_INCLUDE_DIRS "${LIBSSH2_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES)
if(LIBSSH2_FOUND)
2024-09-11 23:03:28 +02:00
list(APPEND CURL_LIBS ${LIBSSH2_LIBRARIES})
2024-07-31 02:42:29 +02:00
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libssh2")
2024-09-11 23:03:28 +02:00
@@ -1121,7 +1139,8 @@ endif()
option(CURL_USE_GSASL "Use libgsasl" OFF)
mark_as_advanced(CURL_USE_GSASL)
if(CURL_USE_GSASL)
- find_package(Libgsasl REQUIRED)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(GSASL REQUIRED libgsasl)
2024-09-11 23:03:28 +02:00
if(LIBGSASL_FOUND)
list(APPEND CURL_LIBS ${LIBGSASL_LIBRARIES})
list(APPEND CURL_LIBDIRS ${LIBGSASL_LIBRARY_DIRS})
@@ -1139,7 +1158,10 @@ option(CURL_USE_GSSAPI "Use GSSAPI implementation" OFF)
[krb5, curl] Add new port, and add new feature curl[gssapi] (#38402) - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [x] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [x] The versioning scheme in `vcpkg.json` matches what upstream says. - [x] The license declaration in `vcpkg.json` matches what upstream says. - [x] The installed as the "copyright" file matches what upstream says. - [x] The source code of the component installed comes from an authoritative source. - [x] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is in the new port's versions file. - [x] Only one version is added to each modified port's versions file. krb5 have an issue of absolute paths that I am not sure how to fix, also I didn't succeeded to compile it on windows, but this PR is a good start. ``` warning: There should be no absolute paths, such as the following, in an installed package: /home/tal/vcpkg/packages/krb5_x64-linux /home/tal/vcpkg/installed /home/tal/vcpkg/buildtrees/krb5 /home/tal/vcpkg/downloads Absolute paths were found in the following files: /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/krb5-config /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/krb5-config error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: /home/tal/vcpkg/ports/krb5/portfile.cmake ```
2024-05-06 22:59:50 +03:00
mark_as_advanced(CURL_USE_GSSAPI)
if(CURL_USE_GSSAPI)
- find_package(GSS)
[krb5, curl] Add new port, and add new feature curl[gssapi] (#38402) - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [x] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [x] The versioning scheme in `vcpkg.json` matches what upstream says. - [x] The license declaration in `vcpkg.json` matches what upstream says. - [x] The installed as the "copyright" file matches what upstream says. - [x] The source code of the component installed comes from an authoritative source. - [x] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is in the new port's versions file. - [x] Only one version is added to each modified port's versions file. krb5 have an issue of absolute paths that I am not sure how to fix, also I didn't succeeded to compile it on windows, but this PR is a good start. ``` warning: There should be no absolute paths, such as the following, in an installed package: /home/tal/vcpkg/packages/krb5_x64-linux /home/tal/vcpkg/installed /home/tal/vcpkg/buildtrees/krb5 /home/tal/vcpkg/downloads Absolute paths were found in the following files: /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/krb5-config /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/krb5-config error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: /home/tal/vcpkg/ports/krb5/portfile.cmake ```
2024-05-06 22:59:50 +03:00
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(GSS REQUIRED krb5-gssapi)
+ pkg_get_variable(GSS_FLAVOUR krb5-gssapi vendor)
2024-09-11 23:03:28 +02:00
+ list(APPEND GSS_LINK_LIBRARIES resolv) # Fixme: move to krb5 pc files
[krb5, curl] Add new port, and add new feature curl[gssapi] (#38402) - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [x] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [x] The versioning scheme in `vcpkg.json` matches what upstream says. - [x] The license declaration in `vcpkg.json` matches what upstream says. - [x] The installed as the "copyright" file matches what upstream says. - [x] The source code of the component installed comes from an authoritative source. - [x] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is in the new port's versions file. - [x] Only one version is added to each modified port's versions file. krb5 have an issue of absolute paths that I am not sure how to fix, also I didn't succeeded to compile it on windows, but this PR is a good start. ``` warning: There should be no absolute paths, such as the following, in an installed package: /home/tal/vcpkg/packages/krb5_x64-linux /home/tal/vcpkg/installed /home/tal/vcpkg/buildtrees/krb5 /home/tal/vcpkg/downloads Absolute paths were found in the following files: /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/krb5-config /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/krb5-config error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: /home/tal/vcpkg/ports/krb5/portfile.cmake ```
2024-05-06 22:59:50 +03:00
set(HAVE_GSSAPI ${GSS_FOUND})
if(GSS_FOUND)