From 2805585923d4d5c02f53de6e7bfdec08b719f7d0 Mon Sep 17 00:00:00 2001 From: tigro Date: Sat, 11 May 2024 20:50:33 +0300 Subject: [PATCH] import frozen-1.1.1-3.el9 --- .frozen.metadata | 1 + .gitignore | 1 + ...73cc5c6413127d47f325cbb34a607e2cb030.patch | 37 ++++++++++ SOURCES/includes.patch | 11 +++ SPECS/frozen.spec | 68 +++++++++++++++++++ 5 files changed, 118 insertions(+) create mode 100644 .frozen.metadata create mode 100644 .gitignore create mode 100644 SOURCES/079f73cc5c6413127d47f325cbb34a607e2cb030.patch create mode 100644 SOURCES/includes.patch create mode 100644 SPECS/frozen.spec diff --git a/.frozen.metadata b/.frozen.metadata new file mode 100644 index 0000000..a949832 --- /dev/null +++ b/.frozen.metadata @@ -0,0 +1 @@ +cce2994151ccd58ccbb5db060374ec909e34cf8c SOURCES/frozen-1.1.1.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..338b99d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/frozen-1.1.1.tar.gz diff --git a/SOURCES/079f73cc5c6413127d47f325cbb34a607e2cb030.patch b/SOURCES/079f73cc5c6413127d47f325cbb34a607e2cb030.patch new file mode 100644 index 0000000..1ce542e --- /dev/null +++ b/SOURCES/079f73cc5c6413127d47f325cbb34a607e2cb030.patch @@ -0,0 +1,37 @@ +From 079f73cc5c6413127d47f325cbb34a607e2cb030 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Fri, 16 Dec 2022 22:58:51 +0100 +Subject: [PATCH] Workaround gcc 11 limitation + +For some reason, gcc sees a constexpr violation here. Trust clang and msvc on this. +--- + include/frozen/unordered_set.h | 2 +- + tests/test_unordered_set.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/frozen/unordered_set.h b/include/frozen/unordered_set.h +index 4d16df9..196ea50 100644 +--- a/include/frozen/unordered_set.h ++++ b/include/frozen/unordered_set.h +@@ -105,7 +105,7 @@ class unordered_set { + /* lookup */ + template + constexpr std::size_t count(KeyType const &key, Hasher const &hash, Equal const &equal) const { +- auto const k = lookup(key, hash); ++ auto const & k = lookup(key, hash); + return equal(k, key); + } + template +diff --git a/tests/test_unordered_set.cpp b/tests/test_unordered_set.cpp +index e90a0d4..042c1a8 100644 +--- a/tests/test_unordered_set.cpp ++++ b/tests/test_unordered_set.cpp +@@ -65,7 +65,7 @@ TEST_CASE("tripleton str frozen unordered set", "[unordered set]") { + constexpr auto max_size = ze_set.max_size(); + REQUIRE(max_size == 3); + +- constexpr auto nocount = ze_set.count(4); ++ const auto nocount = ze_set.count(4); + REQUIRE(nocount == 0); + + constexpr auto count = ze_set.count(1); diff --git a/SOURCES/includes.patch b/SOURCES/includes.patch new file mode 100644 index 0000000..039138b --- /dev/null +++ b/SOURCES/includes.patch @@ -0,0 +1,11 @@ +--- include/frozen/bits/pmh.h~ 2022-03-31 00:56:25.000000000 -0500 ++++ include/frozen/bits/pmh.h 2023-07-17 13:42:52.903675376 -0500 +@@ -30,6 +30,8 @@ + #include + #include + ++#include ++ + namespace frozen { + + namespace bits { diff --git a/SPECS/frozen.spec b/SPECS/frozen.spec new file mode 100644 index 0000000..76f41cb --- /dev/null +++ b/SPECS/frozen.spec @@ -0,0 +1,68 @@ +# Header-only package +%global debug_package %{nil} + +Name: frozen +Version: 1.1.1 +Release: 3%{?dist} +Summary: A header-only, constexpr alternative to gperf for C++14 users + +License: Apache-2.0 +URL: https://github.com/serge-sans-paille/frozen +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# Fixes FTBFS, already present in upstream main branch. +Patch0: includes.patch +Patch1: 079f73cc5c6413127d47f325cbb34a607e2cb030.patch + +BuildRequires: gcc-c++ +BuildRequires: cmake + +%description +Header-only library that provides 0 cost initialization +for immutable containers, fixed-size containers, and +various algorithms. + +%package devel +Summary: Development files for %{name} +BuildArch: noarch +Requires: pkgconfig +Provides: %{name}-static = %{version}-%{release} + +%description devel +Development files for %{name}. + + +%prep +%setup -q + +%patch -P 0 -p0 +%patch -P 1 -p1 + +%build +%cmake -DCMAKE_BUILD_TYPE=Release +%cmake_build + +%check +%ctest + +%install +%cmake_install + + +%files devel +%license LICENSE +%doc examples/ AUTHORS README.rst +%{_includedir}/frozen/ +%{_datadir}/cmake/%{name}/ + +%changelog +* Sat May 11 2024 Arkady L. Shane - 1.1.1-3 +- Rebuilt for MSVSphere 9.4 + +* Wed Jul 19 2023 Gwyn Ciesla - 1.1.1-3 +- Drop main package. + +* Tue Jul 18 2023 Gwyn Ciesla - 1.1.1-2 +- review fixes. + +* Mon Jul 17 2023 Gwyn Ciesla - 1.1.1-1 +- Initial package.