Skip to content

glaze: add version 0.3.2 #14857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions recipes/glaze/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.2.8":
url: "https://github.com/stephenberry/glaze/archive/v0.2.8.tar.gz"
sha256: "c6a30d647d7f3db47bd222f432ceba006ea5d24055981ccd89abd193ccb86cd5"
"0.2.2":
url: "https://github.com/stephenberry/glaze/archive/v0.2.2.tar.gz"
sha256: "d0d2edcc546b0ebb4bedaeedfb4a54aa678a6fdffa6b20dd6b252ef6325a9e75"
Expand All @@ -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"
25 changes: 15 additions & 10 deletions recipes/glaze/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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"),
)
Expand Down
28 changes: 28 additions & 0 deletions recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch
Original file line number Diff line number Diff line change
@@ -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 <filesystem>
#include <fstream>

-#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 <span>
#include <vector>

-#include "glaze/frozen/random.hpp"
+#include "frozen/random.h"
#include "glaze/util/string_cmp.hpp"

namespace glz
2 changes: 2 additions & 0 deletions recipes/glaze/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.2.8":
folder: all
"0.2.2":
folder: all
"0.2.1":
Expand Down