(#3714) add skyr-url/1.13.0 + fix static runtime

* skyr-url: add version 1.13.0

Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

* raise minimum compiler version for newer versions

* fix libs to enable shared + block new version when not msvc

* try patching upstream cmake

* Revert "try patching upstream cmake"

This reverts commit cd5d60b3fa.

* upstream does not allow dynamic

Co-authored-by: Quentin Chateau via Conan Center Bot <quentin.chateau@gmail.com>
This commit is contained in:
Chris Mc
2020-12-23 21:31:55 -05:00
committed by GitHub
parent ff5e24c110
commit eba72b610a
3 changed files with 20 additions and 12 deletions

View File

@@ -1,4 +1,7 @@
sources:
"1.13.0":
url: "https://github.com/cpp-netlib/url/archive/v1.13.0.tar.gz"
sha256: "0c9e594f09a9abda5815b07b548ac520b2fc1044fc74b589fc4c5bd18ea4330c"
"1.12.0":
url: https://github.com/cpp-netlib/url/archive/v1.12.0.tar.gz
sha256: 42ede3666a4c40828aa74e4b35bf43dfc79de9329e6463ff90f9bb727b3a06f0

View File

@@ -32,11 +32,11 @@ class SkyrUrlConan(ConanFile):
@property
def _minimum_compilers_version(self):
# https://github.com/cpp-netlib/url#requirements
# https://github.com/cpp-netlib/url/tree/v1.12.0#requirements
return {
"Visual Studio": "16",
"gcc": "7",
"clang": "6",
"clang": "6" if tools.Version(self.version) <= "1.12.0" else "8",
"apple-clang": "10",
}
@@ -47,8 +47,7 @@ class SkyrUrlConan(ConanFile):
def configure(self):
if self.settings.get_safe("compiler.cppstd"):
tools.check_min_cppstd(self, self._minimum_cpp_standard)
min_version = self._minimum_compilers_version.get(
str(self.settings.compiler))
min_version = self._minimum_compilers_version.get(str(self.settings.compiler))
if not min_version:
self.output.warn("{} recipe lacks information about the {} compiler support.".format(
self.name, self.settings.compiler))
@@ -56,12 +55,17 @@ class SkyrUrlConan(ConanFile):
if tools.Version(self.settings.compiler.version) < min_version:
raise ConanInvalidConfiguration("{} requires C++17 support. The current compiler {} {} does not support it.".format(
self.name, self.settings.compiler, self.settings.compiler.version))
if self.options.with_fs and str(self.settings.compiler) == "apple-clang":
raise ConanInvalidConfiguration("apple-clang 11 is currently not support with filesystem")
if self.options.with_fs and self.settings.compiler == "apple-clang":
raise ConanInvalidConfiguration("apple-clang currently does not support with filesystem")
if self.options.shared:
raise ConanInvalidConfiguration("shared is currently not supported")
# https://github.com/cpp-netlib/url/blob/dd345361ed86e4c1cabfe94743a8e769b346840c/src/CMakeLists.txt#L17
raise ConanInvalidConfiguration("shared is currently not supported by upstream")
if tools.Version(self.version) >= "1.13.0" and not self.settings.compiler == "Visual Studio":
# There's tedious compilation errors in C3i against ranges-v3
raise ConanInvalidConfiguration("{}/{} with {} is currently not supported".format(self.name, self.version, self.settings.compiler))
def requirements(self):
self.requires("tl-expected/1.0.0")
@@ -84,7 +88,7 @@ class SkyrUrlConan(ConanFile):
self._cmake.definitions["skyr_ENABLE_JSON_FUNCTIONS"] = self.options.with_json
self._cmake.definitions["skyr_ENABLE_FILESYSTEM_FUNCTIONS"] = self.options.with_fs
if self.settings.compiler == "Visual Studio":
self._cmake.definitions["skyr_USE_STATIC_CRT"] = False
self._cmake.definitions["skyr_USE_STATIC_CRT"] = "MT" in self.settings.compiler.runtime
self._cmake.configure(build_folder=self._build_subfolder)
return self._cmake
@@ -104,7 +108,7 @@ class SkyrUrlConan(ConanFile):
self.cpp_info.names["cmake_find_package"] = "skyr"
self.cpp_info.names["cmake_find_package_multi"] = "skyr"
self.cpp_info.components["url"].name = "skyr-url"
self.cpp_info.components["url"].libs = self.collect_libs()
self.cpp_info.components["url"].libs = tools.collect_libs(self)
self.cpp_info.components["url"].requires = ["tl-expected::tl-expected", "range-v3::range-v3" ]
if self.options.with_json:
self.cpp_info.components["url"].requires.append("nlohmann_json::nlohmann_json")

View File

@@ -1,4 +1,5 @@
---
versions:
"1.13.0":
folder: all
"1.12.0":
folder: all