Skip to content

Commit ed76d12

Browse files
authored
(#13713) civetweb: update zlib and use export_conandata_patches
* civetweb: update zlib and use export_conandata_patches * remove skip-file
1 parent ac2e523 commit ed76d12

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

recipes/civetweb/all/conanfile.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from conan import ConanFile
22
from conan.errors import ConanInvalidConfiguration
3-
from conan.tools.files import apply_conandata_patches, copy, get, rmdir
3+
from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get, rmdir
44
from conan.tools.scm import Version
55
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
66
import os
77

8-
required_conan_version = ">=1.50.2 <1.51.0 || >=1.51.2"
8+
required_conan_version = ">=1.52.0"
99

1010

1111
class CivetwebConan(ConanFile):
@@ -14,7 +14,7 @@ class CivetwebConan(ConanFile):
1414
homepage = "https://github.com/civetweb/civetweb"
1515
url = "https://github.com/conan-io/conan-center-index"
1616
description = "Embedded C/C++ web server"
17-
topics = ("civetweb", "web-server", "embedded")
17+
topics = ("web-server", "embedded")
1818

1919
settings = "os", "arch", "compiler", "build_type"
2020
options = {
@@ -59,8 +59,7 @@ def _has_zlib_option(self):
5959
return Version(self.version) >= "1.15"
6060

6161
def export_sources(self):
62-
for patch in self.conan_data.get("patches", {}).get(self.version, []):
63-
copy(self, patch["patch_file"], self.recipe_folder, self.export_sources_folder)
62+
export_conandata_patches(self)
6463

6564
def config_options(self):
6665
if self.settings.os == "Windows":
@@ -70,18 +69,27 @@ def config_options(self):
7069

7170
def configure(self):
7271
if self.options.shared:
73-
del self.options.fPIC
72+
try:
73+
del self.options.fPIC
74+
except Exception:
75+
pass
7476
if not self.options.with_cxx:
75-
del self.settings.compiler.cppstd
76-
del self.settings.compiler.libcxx
77+
try:
78+
del self.settings.compiler.libcxx
79+
except Exception:
80+
pass
81+
try:
82+
del self.settings.compiler.cppstd
83+
except Exception:
84+
pass
7785
if not self.options.with_ssl:
7886
del self.options.ssl_dynamic_loading
7987

8088
def requirements(self):
8189
if self.options.with_ssl:
8290
self.requires("openssl/1.1.1q")
8391
if self.options.get_safe("with_zlib"):
84-
self.requires("zlib/1.2.12")
92+
self.requires("zlib/1.2.13")
8593

8694
def validate(self):
8795
if self.options.get_safe("ssl_dynamic_loading") and not self.options["openssl"].shared:

recipes/civetweb/all/test_v1_package/conanfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pylint: skip-file
21
import os
32
from conans import ConanFile, tools, CMake
43

0 commit comments

Comments
 (0)