Skip to content

Commit 7d4b7e2

Browse files
basiliscosjcar87
andauthored
rotor: add version v0.33 (conan-io#26470)
* add rotor v0.33 * Feedback * lighten version load, trivial changes --------- Co-authored-by: Luis Caro Campos <[email protected]>
1 parent 03d908e commit 7d4b7e2

File tree

3 files changed

+14
-58
lines changed

3 files changed

+14
-58
lines changed

recipes/rotor/all/conandata.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
sources:
2+
"0.33":
3+
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.33.tar.gz"
4+
sha256: "0a57af1018e2ca89c9cd95ae134c4b2af2c8e803c81ebee5433495776830eea6"
25
"0.32":
36
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.32.tar.gz"
47
sha256: "b0b7a294704f1ab779b95ab433eb5f4a2859db3539108a0e08709fc97f6bccee"
@@ -11,18 +14,3 @@ sources:
1114
"0.29":
1215
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.29.tar.gz"
1316
sha256: "e17e25f2d6402389e8fde07a158ca952b815666f0a2b5e07748dfc062834c522"
14-
"0.28":
15-
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.28.tar.gz"
16-
sha256: "9fc7d1721379adca228ca45d0240b5a0060c993de984f0288c9e4b9cf667b971"
17-
"0.25":
18-
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.25.tar.gz"
19-
sha256: "b1de95937adb8d7a9beb93bc4956d8e28ff64a6c0a898e7ce12b22a224bb8f6f"
20-
"0.24":
21-
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.24.tar.gz"
22-
sha256: "3a360d6ce7c743b740b9c6c4063493f67298690fc51e29efa19811bb3d11fa86"
23-
"0.23":
24-
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.23.tar.gz"
25-
sha256: "8f89f9d0a561ab7cc90253cc761d8b5a78887c99ef488e75ae4c49abb44ddac4"
26-
"0.21":
27-
url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.21.tar.gz"
28-
sha256: "1a5bc1919fe1052c8ad148707708b19fad903ff3db33015710cfb4f89baab8fa"

recipes/rotor/all/conanfile.py

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
from conan import ConanFile
3-
from conan.errors import ConanInvalidConfiguration
43
from conan.tools.build import check_min_cppstd
54
from conan.tools.scm import Version
65
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rmdir, copy
@@ -36,28 +35,12 @@ class RotorConan(ConanFile):
3635
"enable_fltk": False,
3736
}
3837

39-
@property
40-
def _min_cppstd(self):
41-
return 17
42-
43-
@property
44-
def _compilers_minimum_version(self):
45-
return {
46-
"Visual Studio": "16",
47-
"msvc": "192",
48-
"gcc": "8",
49-
"clang": "7",
50-
"apple-clang": "12",
51-
}
52-
5338
def export_sources(self):
5439
export_conandata_patches(self)
5540

5641
def config_options(self):
5742
if self.settings.os == "Windows":
5843
del self.options.fPIC
59-
if Version(self.version) < "0.26":
60-
del self.options.enable_ev
6144
if Version(self.version) < "0.30":
6245
del self.options.enable_fltk
6346

@@ -77,28 +60,19 @@ def layout(self):
7760

7861
def generate(self):
7962
tc = CMakeToolchain(self)
80-
tc.variables["BUILD_BOOST_ASIO"] = self.options.enable_asio
81-
tc.variables["BUILD_THREAD"] = self.options.enable_thread
82-
tc.variables["BUILD_THREAD_UNSAFE"] = not self.options.multithreading
83-
tc.variables["BUILD_TESTING"] = False
84-
if Version(self.version) >= "0.26":
85-
tc.variables["BUILD_EV"] = self.options.enable_ev
63+
tc.cache_variables["BUILD_BOOST_ASIO"] = self.options.enable_asio
64+
tc.cache_variables["BUILD_THREAD"] = self.options.enable_thread
65+
tc.cache_variables["BUILD_THREAD_UNSAFE"] = not self.options.multithreading
66+
tc.cache_variables["BUILD_TESTING"] = False
67+
tc.cache_variables["BUILD_EV"] = self.options.enable_ev
8668
if Version(self.version) >= "0.30":
87-
tc.variables["BUILD_FLTK"] = self.options.enable_fltk
69+
tc.cache_variables["BUILD_FLTK"] = self.options.enable_fltk
8870
tc.generate()
8971
tc = CMakeDeps(self)
9072
tc.generate()
9173

9274
def validate(self):
93-
if self.settings.compiler.cppstd:
94-
check_min_cppstd(self, self._min_cppstd)
95-
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
96-
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
97-
raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.")
98-
99-
if self.options.shared and Version(self.version) < "0.23":
100-
raise ConanInvalidConfiguration("shared option is available from v0.23")
101-
75+
check_min_cppstd(self, 17)
10276

10377
def build(self):
10478
apply_conandata_patches(self)
@@ -126,6 +100,8 @@ def package_info(self):
126100
if self.options.enable_asio:
127101
self.cpp_info.components["asio"].libs = ["rotor_asio"]
128102
self.cpp_info.components["asio"].requires = ["core"]
103+
if self.settings.os == "Windows":
104+
self.cpp_info.components["asio"].system_libs = ["ws2_32"]
129105

130106
if self.options.enable_thread:
131107
self.cpp_info.components["thread"].libs = ["rotor_thread"]

recipes/rotor/config.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
versions:
2+
"0.33":
3+
folder: all
24
"0.32":
35
folder: all
46
"0.31":
@@ -7,13 +9,3 @@ versions:
79
folder: all
810
"0.29":
911
folder: all
10-
"0.28":
11-
folder: all
12-
"0.25":
13-
folder: all
14-
"0.24":
15-
folder: all
16-
"0.23":
17-
folder: all
18-
"0.21":
19-
folder: all

0 commit comments

Comments
 (0)