From fc31de9050c9b5a47afc46b47572c72d7d636ead Mon Sep 17 00:00:00 2001 From: Tim Biermann Date: Mon, 7 Aug 2023 06:47:01 +0200 Subject: [PATCH] frozen: initial commit, version 1.1.1 --- frozen/.footprint | 26 +++++++++++++ frozen/.signature | 7 ++++ ...73cc5c6413127d47f325cbb34a607e2cb030.patch | 37 +++++++++++++++++++ frozen/Pkgfile | 27 ++++++++++++++ frozen/frozen-1.1.1-missing-include.patch | 12 ++++++ 5 files changed, 109 insertions(+) create mode 100644 frozen/.footprint create mode 100644 frozen/.signature create mode 100644 frozen/079f73cc5c6413127d47f325cbb34a607e2cb030.patch create mode 100644 frozen/Pkgfile create mode 100644 frozen/frozen-1.1.1-missing-include.patch diff --git a/frozen/.footprint b/frozen/.footprint new file mode 100644 index 000000000..8d3e39393 --- /dev/null +++ b/frozen/.footprint @@ -0,0 +1,26 @@ +drwxr-xr-x root/root usr/ +drwxrwxr-x root/root usr/include/ +drwxrwxr-x root/root usr/include/frozen/ +-rw-rw-r-- root/root usr/include/frozen/algorithm.h +drwxrwxr-x root/root usr/include/frozen/bits/ +-rw-rw-r-- root/root usr/include/frozen/bits/algorithms.h +-rw-rw-r-- root/root usr/include/frozen/bits/basic_types.h +-rw-rw-r-- root/root usr/include/frozen/bits/constexpr_assert.h +-rw-rw-r-- root/root usr/include/frozen/bits/defines.h +-rw-rw-r-- root/root usr/include/frozen/bits/elsa.h +-rw-rw-r-- root/root usr/include/frozen/bits/elsa_std.h +-rw-rw-r-- root/root usr/include/frozen/bits/exceptions.h +-rw-rw-r-- root/root usr/include/frozen/bits/hash_string.h +-rw-rw-r-- root/root usr/include/frozen/bits/pmh.h +-rw-rw-r-- root/root usr/include/frozen/bits/version.h +-rw-rw-r-- root/root usr/include/frozen/map.h +-rw-rw-r-- root/root usr/include/frozen/random.h +-rw-rw-r-- root/root usr/include/frozen/set.h +-rw-rw-r-- root/root usr/include/frozen/string.h +-rw-rw-r-- root/root usr/include/frozen/unordered_map.h +-rw-rw-r-- root/root usr/include/frozen/unordered_set.h +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/cmake/ +drwxr-xr-x root/root usr/share/cmake/frozen/ +-rw-r--r-- root/root usr/share/cmake/frozen/frozenConfig.cmake +-rw-r--r-- root/root usr/share/cmake/frozen/frozenConfigVersion.cmake diff --git a/frozen/.signature b/frozen/.signature new file mode 100644 index 000000000..84010e329 --- /dev/null +++ b/frozen/.signature @@ -0,0 +1,7 @@ +untrusted comment: verify with /etc/ports/contrib.pub +RWSagIOpLGJF3yK8URfa1urDK9GQf1Ap0ZF19PBngSa7HuKkmvTDX9v8/YvbHe3MhPBo9MyJDofFXvvmidbVpKv5+R3TkE6eFgY= +SHA256 (Pkgfile) = 4e3156687198bc335b9ee397a16734d9008e9924e959670a8f91cc236487b536 +SHA256 (.footprint) = f0e261c1b3f1896560cc2cbd29043b12a94e3b8def670edc8a03238ba0e91804 +SHA256 (frozen-1.1.1.tar.gz) = f7c7075750e8fceeac081e9ef01944f221b36d9725beac8681cbd2838d26be45 +SHA256 (frozen-1.1.1-missing-include.patch) = ec8a0168430701e2878e8ad50fd56ea4ada85984ce365ac34dd8f96705586a95 +SHA256 (079f73cc5c6413127d47f325cbb34a607e2cb030.patch) = 97a4f7f24427adc43cf2671fa41fa183e0d41ba547c791b5850954632f02df06 diff --git a/frozen/079f73cc5c6413127d47f325cbb34a607e2cb030.patch b/frozen/079f73cc5c6413127d47f325cbb34a607e2cb030.patch new file mode 100644 index 000000000..1ce542e0e --- /dev/null +++ b/frozen/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/frozen/Pkgfile b/frozen/Pkgfile new file mode 100644 index 000000000..bed2f76bc --- /dev/null +++ b/frozen/Pkgfile @@ -0,0 +1,27 @@ +# Description: a header-only, constexpr alternative to gperf for C++14 users +# URL: https://github.com/serge-sans-paille/frozen +# Maintainer: Tim Biermann, tbier at posteo dot de + +name=frozen +version=1.1.1 +release=1 +source=(https://github.com/serge-sans-paille/frozen/archive/$version/$name-$version.tar.gz + frozen-1.1.1-missing-include.patch + 079f73cc5c6413127d47f325cbb34a607e2cb030.patch) + +build() { + patch -Np1 -d $name-$version -i $SRC/frozen-1.1.1-missing-include.patch + patch -Np1 -d $name-$version -i $SRC/079f73cc5c6413127d47f325cbb34a607e2cb030.patch + + cmake -S $name-$version -B build -G Ninja \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_INSTALL_LIBDIR=lib \ + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \ + -D BUILD_TESTING=OFF \ + -D CMAKE_SKIP_RPATH=ON \ + -Wno-dev + + cmake --build build + DESTDIR=$PKG cmake --install build +} diff --git a/frozen/frozen-1.1.1-missing-include.patch b/frozen/frozen-1.1.1-missing-include.patch new file mode 100644 index 000000000..ed60abd1c --- /dev/null +++ b/frozen/frozen-1.1.1-missing-include.patch @@ -0,0 +1,12 @@ +diff -up frozen-1.1.1/include/frozen/bits/pmh.h:5.omv~ frozen-1.1.1/include/frozen/bits/pmh.h:5 +diff -up frozen-1.1.1/include/frozen/bits/pmh.h.omv~ frozen-1.1.1/include/frozen/bits/pmh.h +--- frozen-1.1.1/include/frozen/bits/pmh.h.omv~ 2023-07-10 15:37:16.000503631 +0200 ++++ frozen-1.1.1/include/frozen/bits/pmh.h 2023-07-10 15:37:22.640548964 +0200 +@@ -29,6 +29,7 @@ + + #include + #include ++#include + + namespace frozen { +