diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index d9cb0b695b150..13ed9121a27f6 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.2": + url: "https://github.com/stephenberry/glaze/archive/v0.3.2.tar.gz" + sha256: "41f19b1b4872a637ecb63bccb07578255f54c8842faf1bab78779e6342b2fa7e" "0.2.2": url: "https://github.com/stephenberry/glaze/archive/v0.2.2.tar.gz" sha256: "d0d2edcc546b0ebb4bedaeedfb4a54aa678a6fdffa6b20dd6b252ef6325a9e75" @@ -20,3 +23,17 @@ sources: "0.0.7": url: "https://github.com/stephenberry/glaze/archive/refs/tags/v0.0.7.tar.gz" sha256: "124f7e8fea58c012b548ba1b643684fe428c7dbfeb8d8a5f701eb7db4356a759" + +patches: + "0.2.2": + - patch_file: "patches/0.2.0-0001-use-cci-frozen.patch" + patch_description: "use cci's frozen" + patch_type: "conan" + "0.2.1": + - patch_file: "patches/0.2.0-0001-use-cci-frozen.patch" + patch_description: "use cci's frozen" + patch_type: "conan" + "0.2.0": + - patch_file: "patches/0.2.0-0001-use-cci-frozen.patch" + patch_description: "use cci's frozen" + patch_type: "conan" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index 0b0ed09d3669b..3e8a27a848675 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy +from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -16,7 +16,6 @@ class GlazeConan(ConanFile): homepage = "https://github.com/stephenberry/glaze" topics = ("json", "memory", "header-only") settings = "os", "arch", "compiler", "build_type" - no_copy_source = True @property def _minimum_cpp_standard(self): @@ -27,20 +26,25 @@ def _compilers_minimum_version(self): return { "Visual Studio": "16", "msvc": "192", - "gcc": "11", - "clang": "12", + "gcc": "11" if Version(self.version) < "0.2.4" else "12", + "clang": "12" if Version(self.version) < "0.2.4" else "13", "apple-clang": "13.1", } + def export_sources(self): + export_conandata_patches(self) + def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/9.1.0") - self.requires("fast_float/3.8.1") - self.requires("frozen/1.1.1") - self.requires("nanorange/20200505") - if Version(self.version) >= "0.1.5": + if Version(self.version) < "0.2.4": + self.requires("fmt/9.1.0") + self.requires("frozen/1.1.1") + self.requires("nanorange/20200505") + if Version(self.version) < "0.2.3": + self.requires("fast_float/3.8.1") + if "0.1.5" <= Version(self.version) < "0.2.3": self.requires("dragonbox/1.1.3") def package_id(self): @@ -66,13 +70,14 @@ def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) def build(self): - pass + apply_conandata_patches(self) def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( self, pattern="*.hpp", + excludes="glaze/frozen/*.hpp" if Version(self.version) < "0.2.4" else "", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include"), ) diff --git a/recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch b/recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch new file mode 100644 index 0000000000000..01b0c786fa02b --- /dev/null +++ b/recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch @@ -0,0 +1,28 @@ +diff --git a/include/glaze/core/common.hpp b/include/glaze/core/common.hpp +index aed6ce6..6cf4ace 100644 +--- a/include/glaze/core/common.hpp ++++ b/include/glaze/core/common.hpp +@@ -12,8 +12,8 @@ + #include + #include + +-#include "glaze/frozen/string.hpp" +-#include "glaze/frozen/unordered_map.hpp" ++#include "frozen/string.h" ++#include "frozen/unordered_map.h" + + #include "glaze/core/context.hpp" + #include "glaze/core/meta.hpp" +diff --git a/include/glaze/util/hash_map.hpp b/include/glaze/util/hash_map.hpp +index eaaec57..ae75ee2 100644 +--- a/include/glaze/util/hash_map.hpp ++++ b/include/glaze/util/hash_map.hpp +@@ -4,7 +4,7 @@ + #include + #include + +-#include "glaze/frozen/random.hpp" ++#include "frozen/random.h" + #include "glaze/util/string_cmp.hpp" + + namespace glz diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index a951e691f29d8..40144e9c79855 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.2": + folder: all "0.2.2": folder: all "0.2.1":