Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
libcurl: cleanup
Browse files Browse the repository at this point in the history
remove dead code after bed40ca
also, bump deps

identified in conan-io#21146 and conan-io#21163
  • Loading branch information
ericLemanissier authored Nov 17, 2023
1 parent 042b4ce commit 2cf9fd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 43 deletions.
41 changes: 10 additions & 31 deletions recipes/libcurl/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class LibcurlConan(ConanFile):
"with_libidn": [True, False],
"with_librtmp": [True, False],
"with_libgsasl": [True, False],
"with_libmetalink": [True, False],
"with_libpsl": [True, False],
"with_largemaxwritesize": [True, False],
"with_nghttp2": [True, False],
Expand Down Expand Up @@ -95,7 +94,6 @@ class LibcurlConan(ConanFile):
"with_libidn": False,
"with_librtmp": False,
"with_libgsasl": False,
"with_libmetalink": False,
"with_libpsl": False,
"with_largemaxwritesize": False,
"with_nghttp2": False,
Expand Down Expand Up @@ -136,11 +134,6 @@ def _is_win_x_android(self):
def _is_using_cmake_build(self):
return is_msvc(self) or self._is_win_x_android

@property
def _has_metalink_option(self):
# Support for metalink was removed in version 7.78.0 https://github.com/curl/curl/pull/7176
return Version(self.version) < "7.78.0" and not self._is_using_cmake_build

@property
def _has_with_libpsl_option(self):
return not (self._is_using_cmake_build and Version(self.version) < "7.84.0")
Expand All @@ -152,8 +145,6 @@ def export_sources(self):
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if not self._has_metalink_option:
del self.options.with_libmetalink
if not self._has_with_libpsl_option:
del self.options.with_libpsl
if self._is_using_cmake_build:
Expand Down Expand Up @@ -185,7 +176,7 @@ def requirements(self):
elif self.options.with_ssl == "wolfssl":
self.requires("wolfssl/5.6.3")
if self.options.with_nghttp2:
self.requires("libnghttp2/1.56.0")
self.requires("libnghttp2/1.58.0")
if self.options.with_libssh2:
self.requires("libssh2/1.11.0")
if self.options.with_zlib:
Expand All @@ -195,7 +186,7 @@ def requirements(self):
if self.options.with_zstd:
self.requires("zstd/1.5.5")
if self.options.with_c_ares:
self.requires("c-ares/1.19.1")
self.requires("c-ares/1.22.0")
if self.options.get_safe("with_libpsl"):
self.requires("libpsl/0.21.1")

Expand All @@ -216,7 +207,7 @@ def build_requirements(self):
else:
self.tool_requires("libtool/2.4.7")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/2.0.2")
self.tool_requires("pkgconf/2.0.3")
if self.settings.os in [ "tvOS", "watchOS" ]:
self.tool_requires("gnu-config/cci.20210814")
if self._settings_build.os == "Windows":
Expand Down Expand Up @@ -436,15 +427,14 @@ def _generate_with_autotools(self):
])

# Since 7.77.0, disabling TLS must be explicitly requested otherwise it fails
if Version(self.version) >= "7.77.0" and not self.options.with_ssl:
if not self.options.with_ssl:
tc.configure_args.append("--without-ssl")

openssl_option = "ssl" if Version(self.version) < "7.77.0" else "openssl"
if self.options.with_ssl == "openssl":
path = unix_path(self, self.dependencies["openssl"].package_folder)
tc.configure_args.append(f"--with-{openssl_option}={path}")
tc.configure_args.append(f"--with-openssl={path}")
else:
tc.configure_args.append(f"--without-{openssl_option}")
tc.configure_args.append("--without-openssl")

if self.options.with_ssl == "wolfssl":
path = unix_path(self, self.dependencies["wolfssl"].package_folder)
Expand All @@ -470,9 +460,6 @@ def _generate_with_autotools(self):
else:
tc.configure_args.append("--without-zlib")

if self._has_metalink_option:
tc.configure_args.append(f"--with-libmetalink={self._yes_no(self.options.with_libmetalink)}")

if not self.options.with_proxy:
tc.configure_args.append("--disable-proxy")

Expand All @@ -484,10 +471,7 @@ def _generate_with_autotools(self):

# ntlm will default to enabled if any SSL options are enabled
if not self.options.with_ntlm:
if Version(self.version) <= "7.77.0":
tc.configure_args.append("--disable-crypto-auth")
else:
tc.configure_args.append("--disable-ntlm")
tc.configure_args.append("--disable-ntlm")

if not self.options.with_ntlm_wb:
tc.configure_args.append("--disable-ntlm-wb")
Expand Down Expand Up @@ -607,10 +591,7 @@ def _generate_with_cmake(self):

# Also disables NTLM_WB if set to false
if not self.options.with_ntlm:
if Version(self.version) <= "7.77.0":
tc.variables["CURL_DISABLE_CRYPTO_AUTH"] = True
else:
tc.variables["CURL_DISABLE_NTLM"] = True
tc.variables["CURL_DISABLE_NTLM"] = True
tc.variables["NTLM_WB_ENABLED"] = self.options.with_ntlm_wb

if self.options.with_ca_bundle:
Expand Down Expand Up @@ -684,10 +665,8 @@ def package_info(self):
if self.options.with_ssl == "schannel":
self.cpp_info.components["curl"].system_libs.append("crypt32")
elif is_apple_os(self):
if Version(self.version) >= "7.78.0" or self.options.with_ssl == "darwinssl":
self.cpp_info.components["curl"].frameworks.append("CoreFoundation")
if Version(self.version) >= "7.77.0":
self.cpp_info.components["curl"].frameworks.append("SystemConfiguration")
self.cpp_info.components["curl"].frameworks.append("CoreFoundation")
self.cpp_info.components["curl"].frameworks.append("SystemConfiguration")
if self.options.with_ldap:
self.cpp_info.components["curl"].system_libs.append("ldap")
if self.options.with_ssl == "darwinssl":
Expand Down
12 changes: 0 additions & 12 deletions recipes/libcurl/all/patches/004-no-checksrc.patch

This file was deleted.

0 comments on commit 2cf9fd4

Please sign in to comment.