Skip to content

Commit

Permalink
(#19405) glaze: add version 1.4.0, remove older versions with patch file
Browse files Browse the repository at this point in the history
  • Loading branch information
toge authored Aug 31, 2023
1 parent 907b078 commit 71d7e4b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 65 deletions.
14 changes: 3 additions & 11 deletions recipes/glaze/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.4.0":
url: "https://github.com/stephenberry/glaze/archive/v1.4.0.tar.gz"
sha256: "301c831e2476529bfa1ea24d87011186da91644830bdf57e1ed99bc7f6326989"
"1.3.6":
url: "https://github.com/stephenberry/glaze/archive/v1.3.6.tar.gz"
sha256: "c339f036a96fef72f9b8542d6a1e2ecb4bd3fa5d3d09a206da5e844765d2b6c3"
Expand All @@ -23,14 +26,3 @@ sources:
"1.1.2":
url: "https://github.com/stephenberry/glaze/archive/v1.1.2.tar.gz"
sha256: "ee22d55b7f40d63f510a41f22765cb24e9e70d312978bad4eb9c94c7ba2fe58c"
"0.3.6":
url: "https://github.com/stephenberry/glaze/archive/v0.3.6.tar.gz"
sha256: "bc87d4fd458f0634a146d6f4c902a952b66c3f718c3e20f680b99066224b51a1"
"0.2.2":
url: "https://github.com/stephenberry/glaze/archive/v0.2.2.tar.gz"
sha256: "d0d2edcc546b0ebb4bedaeedfb4a54aa678a6fdffa6b20dd6b252ef6325a9e75"
patches:
"0.2.2":
- patch_file: "patches/0.2.0-0001-use-cci-frozen.patch"
patch_description: "use cci's frozen"
patch_type: "conan"
22 changes: 3 additions & 19 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, export_conandata_patches, apply_conandata_patches
from conan.tools.files import get, copy
from conan.tools.build import check_min_cppstd
from conan.tools.scm import Version
from conan.tools.layout import basic_layout
Expand All @@ -17,6 +17,7 @@ class GlazeConan(ConanFile):
topics = ("json", "memory", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

@property
def _min_cppstd(self):
Expand All @@ -28,26 +29,13 @@ def _compilers_minimum_version(self):
"Visual Studio": "17" if Version(self.version) >= "1.3.3" else "16",
"msvc": "193" if Version(self.version) >= "1.3.3" else "192",
"gcc": "12",
"clang": "12" if Version(self.version) > "1.0.0" else "13",
"clang": "12",
"apple-clang": "13.1",
}

def export_sources(self):
export_conandata_patches(self)

def layout(self):
basic_layout(self, src_folder="src")

def requirements(self):
if Version(self.version) < "0.2.4":
self.requires("fmt/10.0.0")
self.requires("frozen/1.1.1")
self.requires("nanorange/cci.20200706")
if Version(self.version) < "0.2.3":
self.requires("fast_float/5.2.0")
if "0.1.5" <= Version(self.version) < "0.2.3":
self.requires("dragonbox/1.1.3")

def package_id(self):
self.info.clear()

Expand All @@ -64,15 +52,11 @@ def validate(self):
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def build(self):
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: 0 additions & 28 deletions recipes/glaze/all/patches/0.2.0-0001-use-cci-frozen.patch

This file was deleted.

3 changes: 0 additions & 3 deletions recipes/glaze/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ find_package(glaze REQUIRED CONFIG)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
if(glaze_VERSION VERSION_LESS "1.0.0")
target_compile_definitions(${PROJECT_NAME} PRIVATE GLAZE_USE_EXCEPTION)
endif()
6 changes: 2 additions & 4 deletions recipes/glaze/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.4.0":
folder: all
"1.3.6":
folder: all
"1.3.5":
Expand All @@ -15,7 +17,3 @@ versions:
folder: all
"1.1.2":
folder: all
"0.3.6":
folder: all
"0.2.2":
folder: all

0 comments on commit 71d7e4b

Please sign in to comment.