Skip to content

Commit

Permalink
libcurl: add version 8.11.1 (#25880)
Browse files Browse the repository at this point in the history
* libcurl: add version 8.11.0

---------

Co-authored-by: PerseoGI <perseog@jfrog.com>
Co-authored-by: czoido <mrgalleta@gmail.com>
  • Loading branch information
3 people authored Jan 2, 2025
1 parent df43c18 commit 3ebeb56
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 63 deletions.
5 changes: 5 additions & 0 deletions recipes/libcurl/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
sources:
"8.11.1":
url:
- "https://curl.se/download/curl-8.11.1.tar.xz"
- "https://github.com/curl/curl/releases/download/curl-8_11_1/curl-8.11.1.tar.xz"
sha256: "c7ca7db48b0909743eaef34250da02c19bc61d4f1dcedd6603f109409536ab56"
"8.10.1":
url:
- "https://curl.se/download/curl-8.10.1.tar.xz"
Expand Down
39 changes: 28 additions & 11 deletions recipes/libcurl/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from conan.tools.build import cross_building
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
from conan.tools.env import VirtualBuildEnv, VirtualRunEnv
from conan.tools.files import apply_conandata_patches, copy, download, export_conandata_patches, get, load, replace_in_file, rm, rmdir, save
from conan.tools.files import copy, download, get, load, replace_in_file, rm, rmdir, save
from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps, PkgConfigDeps
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, unix_path
Expand All @@ -13,7 +13,7 @@
import os
import re

required_conan_version = ">=1.54.0"
required_conan_version = ">=2.1.0"


class LibcurlConan(ConanFile):
Expand Down Expand Up @@ -72,6 +72,8 @@ class LibcurlConan(ConanFile):
"with_ca_bundle": [False, "auto", "ANY"],
"with_ca_path": [False, "auto", "ANY"],
"with_ca_fallback": [True, False],
"with_form_api": [True, False],
"with_websockets": [True, False],
}
default_options = {
"shared": False,
Expand Down Expand Up @@ -118,6 +120,8 @@ class LibcurlConan(ConanFile):
"with_ca_bundle": "auto",
"with_ca_path": "auto",
"with_ca_fallback": False,
"with_form_api": True,
"with_websockets": True,
}

@property
Expand All @@ -138,16 +142,19 @@ def _is_using_cmake_build(self):

def export_sources(self):
copy(self, "lib_Makefile_add.am", self.recipe_folder, self.export_sources_folder)
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if self._is_using_cmake_build:
del self.options.with_libgsasl

if Version(self.version) < "8.3.0":
del self.options.with_form_api
if Version(self.version) < "8.7.0":
del self.options.with_misc_docs
if Version(self.version) < "8.11.0":
del self.options.with_websockets

# Default options
self.options.with_ssl = "darwinssl" if is_apple_os(self) else "openssl"
Expand Down Expand Up @@ -194,9 +201,9 @@ def validate(self):
if self.options.with_ssl == "openssl":
openssl = self.dependencies["openssl"]
if self.options.with_ntlm and openssl.options.no_des:
raise ConanInvalidConfiguration("option with_ntlm=True requires openssl:no_des=False")
raise ConanInvalidConfiguration("option with_ntlm=True requires openssl/*:no_des=False")
if self.options.with_ssl == "wolfssl" and not self.dependencies["wolfssl"].options.with_curl:
raise ConanInvalidConfiguration("option with_ssl=wolfssl requires wolfssl:with_curl=True")
raise ConanInvalidConfiguration("option with_ssl=wolfssl requires wolfssl/*:with_curl=True")

def build_requirements(self):
if self._is_using_cmake_build:
Expand Down Expand Up @@ -254,7 +261,6 @@ def _patch_autoreconf(self):
copy(self, os.path.basename(gnu_config), src=os.path.dirname(gnu_config), dst=self.source_folder)

def _patch_sources(self):
apply_conandata_patches(self)
self._patch_misc_files()
self._patch_autotools()
self._patch_cmake()
Expand Down Expand Up @@ -519,6 +525,16 @@ def _generate_with_autotools(self):
tc.configure_args.append("--enable-docs")
else:
tc.configure_args.append("--disable-docs")
if "with_form_api" in self.options:
if self.options.with_form_api:
tc.configure_args.append("--enable-form-api")
else:
tc.configure_args.append("--disable-form-api")
if "with_websockets" in self.options:
if self.options.with_websockets:
tc.configure_args.append("--enable-websockets")
else:
tc.configure_args.append("--disable-websockets")

# Cross building flags
if cross_building(self):
Expand Down Expand Up @@ -607,6 +623,10 @@ def _generate_with_cmake(self):
tc.variables["CURL_DISABLE_RTSP"] = not self.options.with_rtsp
tc.variables["CURL_DISABLE_CRYPTO_AUTH"] = not self.options.with_crypto_auth
tc.variables["CURL_DISABLE_VERBOSE_STRINGS"] = not self.options.with_verbose_strings
if "with_form_api" in self.options:
tc.variables["CURL_DISABLE_FORM_API"] = not self.options.with_form_api
if "with_websockets" in self.options:
tc.variables["CURL_DISABLE_WEBSOCKETS"] = not self.options.with_websockets

# Also disables NTLM_WB if set to false
if not self.options.with_ntlm:
Expand Down Expand Up @@ -635,6 +655,8 @@ def _generate_with_cmake(self):
tc.generate()

deps = CMakeDeps(self)
deps.set_property("wolfssl", "cmake_additional_variables_prefixes", ["WolfSSL", "WOLFSSL"])
deps.set_property("wolfssl", "cmake_file_name", "WolfSSL")
deps.generate()

def package(self):
Expand Down Expand Up @@ -722,10 +744,5 @@ def package_info(self):
if self.options.get_safe("with_libpsl"):
self.cpp_info.components["curl"].requires.append("libpsl::libpsl")

# TODO: to remove in conan v2 once cmake_find_package* generators removed
self.cpp_info.names["cmake_find_package"] = "CURL"
self.cpp_info.names["cmake_find_package_multi"] = "CURL"
self.cpp_info.components["curl"].names["cmake_find_package"] = "libcurl"
self.cpp_info.components["curl"].names["cmake_find_package_multi"] = "libcurl"
self.cpp_info.components["curl"].set_property("cmake_target_name", "CURL::libcurl")
self.cpp_info.components["curl"].set_property("pkg_config_name", "libcurl")
9 changes: 0 additions & 9 deletions recipes/libcurl/all/test_v1_package/CMakeLists.txt

This file was deleted.

43 changes: 0 additions & 43 deletions recipes/libcurl/all/test_v1_package/conanfile.py

This file was deleted.

2 changes: 2 additions & 0 deletions recipes/libcurl/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"8.11.1":
folder: all
"8.10.1":
folder: all
"8.10.0":
Expand Down

0 comments on commit 3ebeb56

Please sign in to comment.