1
1
from conan import ConanFile
2
2
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
4
4
from conan .tools .scm import Version
5
5
from conan .tools .cmake import CMake , CMakeDeps , CMakeToolchain , cmake_layout
6
6
import os
7
7
8
- required_conan_version = ">=1.50.2 <1.51.0 || >=1.51.2 "
8
+ required_conan_version = ">=1.52.0 "
9
9
10
10
11
11
class CivetwebConan (ConanFile ):
@@ -14,7 +14,7 @@ class CivetwebConan(ConanFile):
14
14
homepage = "https://github.com/civetweb/civetweb"
15
15
url = "https://github.com/conan-io/conan-center-index"
16
16
description = "Embedded C/C++ web server"
17
- topics = ("civetweb" , " web-server" , "embedded" )
17
+ topics = ("web-server" , "embedded" )
18
18
19
19
settings = "os" , "arch" , "compiler" , "build_type"
20
20
options = {
@@ -59,8 +59,7 @@ def _has_zlib_option(self):
59
59
return Version (self .version ) >= "1.15"
60
60
61
61
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 )
64
63
65
64
def config_options (self ):
66
65
if self .settings .os == "Windows" :
@@ -70,18 +69,27 @@ def config_options(self):
70
69
71
70
def configure (self ):
72
71
if self .options .shared :
73
- del self .options .fPIC
72
+ try :
73
+ del self .options .fPIC
74
+ except Exception :
75
+ pass
74
76
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
77
85
if not self .options .with_ssl :
78
86
del self .options .ssl_dynamic_loading
79
87
80
88
def requirements (self ):
81
89
if self .options .with_ssl :
82
90
self .requires ("openssl/1.1.1q" )
83
91
if self .options .get_safe ("with_zlib" ):
84
- self .requires ("zlib/1.2.12 " )
92
+ self .requires ("zlib/1.2.13 " )
85
93
86
94
def validate (self ):
87
95
if self .options .get_safe ("ssl_dynamic_loading" ) and not self .options ["openssl" ].shared :
0 commit comments