summaryrefslogtreecommitdiff
path: root/dev-libs/libfmt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-libs/libfmt
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-libs/libfmt')
-rw-r--r--dev-libs/libfmt/Manifest2
-rw-r--r--dev-libs/libfmt/files/libfmt-8.1.1-fix-static-assert.patch76
-rw-r--r--dev-libs/libfmt/libfmt-8.1.1-r1.ebuild40
3 files changed, 118 insertions, 0 deletions
diff --git a/dev-libs/libfmt/Manifest b/dev-libs/libfmt/Manifest
index 6f1afe901b3c..27c195b21fe5 100644
--- a/dev-libs/libfmt/Manifest
+++ b/dev-libs/libfmt/Manifest
@@ -1,4 +1,5 @@
AUX libfmt-8.0.0-no-udl-define.patch 1802 BLAKE2B 538a9dfe1dec002894db22536de91b8c3180eebd7029f5c97ca31da04b93c83dea38e70c44c880ef45e45fdded7010f571999eb3b65958d5af2cd23b5442bbe9 SHA512 967d2969a2afcfb2ad9be07382e2dba332162c7a43905f855a98dd2ae5cc6b9c387dbfeebd3f8cc538d51b4ac885b78584486831f9e80c1728be75a24f0fd628
+AUX libfmt-8.1.1-fix-static-assert.patch 2670 BLAKE2B 781ccf10647dede937f38f2743dd3ab381c307774d136aeb974997ba6f004bb0e30ba02fa5e69952f76fb142133c9e5c9867194352d54ec6d9f4bacf9a13fa09 SHA512 c03186a3d4d1857f5063e94a5bdbc764535c042d98dc20d577c88ad3d93a60d75e7bf6a95c547df8fc7b037c021b464b9e47b6fcb6aba4ee9716e1727f181cd9
DIST libfmt-7.1.2.tar.gz 769401 BLAKE2B 66a14197a818cbc63e2219eb9f8aeb47cc575a712e3a8e20ad6e2316219bd4661446533f305a1a18b83723d5f530c59dcff17251488c3e811aa090b399bc16ca SHA512 e245a3860df4414ad7ea114d2d5686d0c8ae06fbc45f4af0a232ad4bbf0797e5845d731e307af67aad920d3587e5e424135bffeab09132690edb387c47f4fe15
DIST libfmt-7.1.3.tar.gz 770029 BLAKE2B 745440a6f5876d47d4651d007d5968f77d8f5ac01ab5ec17ec5851130a5581e2aa7d359ae297ce7318023b0bf386f9c027e3e38c65f297ae874e607253a3493a SHA512 cfb2431de822202f17a6f34a302b1922b9cd696d8d4c27ad50ea08add781d2af9944db987603c2eb294ee7d73054a60cc11d3a0693f7f6db61949f3041cb9517
DIST libfmt-8.0.0.tar.gz 804902 BLAKE2B 9330acbfb6ab47a484b4dbd3138d11cdd79f4233dfe8fefed41d67118eb19b2c00db5896ee883e2f5ff297170c2eb8dfa001cc6d7c6eff42b6285acd0ea91b5c SHA512 61768bf8b64c430f11536800985509ce436bbbe05cbe1dfb6045cfaf2f859af98eae1019ef602af8fec6946ae25e4d8adb589f0f738666b20beb3afe65ee760c
@@ -8,6 +9,7 @@ EBUILD libfmt-7.1.2.ebuild 778 BLAKE2B 8bcbc4e41e301994ef5d4b3af78c156503be56359
EBUILD libfmt-7.1.3.ebuild 778 BLAKE2B 8bcbc4e41e301994ef5d4b3af78c156503be5635937c17f9e48d27f5800cc022071352131d63e2cdb24c9ce05929006fea637911c537c1b39874753cf00fdac1 SHA512 3e3a6478992cabf9be4c94a6fa55c027414978f6a422d3557777d39b4dd0bf3f4dbabd7abb768bbc2991a64e51b753060e86bf1297f2f8decc62dbe55ed74ff1
EBUILD libfmt-8.0.0-r1.ebuild 837 BLAKE2B 40ccd08531ed4834cd9b5489a623775a7770e2ef6ede4431d4ee45376f03895e5f1c6e40d9f4204b9368851f9e8d6620dc1c61e5e290d73bd5a3e17e6720f4c7 SHA512 35a204cd36f3b08d328b20c5da367826ce2d27647a19563fc540561226d75bc68c29c9352ea526062c2088010cc02a747fef26e619f554496649e0b140055926
EBUILD libfmt-8.0.1-r1.ebuild 784 BLAKE2B 483b0edf71a10536c233b5ede3f12326119ccfa6ca2417dc01c275d0d37140452f320b58c30d25cf62abc9223c50ca92271e80131c67f134d42bd50de050dde7 SHA512 dd7cdc4589d7054cdaa77c13b99cf39e440944163d33d3f7b0994dd3f54db808eb9d45fbea5fa31690036f452d80668b39834e2d5dcd3d4fc2e57b15bfefca55
+EBUILD libfmt-8.1.1-r1.ebuild 841 BLAKE2B d6a66f2881c113d5194f01f50d49ede5a406cdb4fc20d1a452823913cf90b5e146a9d8096cece3f0d31bcebfff34238dab40b4c00f6f3ed62d8fe8fbe522164f SHA512 b648807a1ee735d1a134e98f676278f519d5638a1eebd49eeb18df2a2430c967041080ccaff6c4b7c53324f0a001807a745e3c60f34687920b28fa7616c1adec
EBUILD libfmt-8.1.1.ebuild 784 BLAKE2B a4f6a82298967ee7fd4cde9ecabdf910bc4f1ca6bae4667b15f86b170264928772ddd8097afedf69ef0b76e3281f77e395e061b7bcab60881eca9d78ad67cff7 SHA512 3756c94a13bf6a60a0b9dc66a7853de1694b16b5472f18a4f89c2fee17e0553c8b0f764b5294056281b1e9cc52369a1259d55d9e59f15de7feb84c63b10989bc
EBUILD libfmt-9999.ebuild 784 BLAKE2B a4f6a82298967ee7fd4cde9ecabdf910bc4f1ca6bae4667b15f86b170264928772ddd8097afedf69ef0b76e3281f77e395e061b7bcab60881eca9d78ad67cff7 SHA512 3756c94a13bf6a60a0b9dc66a7853de1694b16b5472f18a4f89c2fee17e0553c8b0f764b5294056281b1e9cc52369a1259d55d9e59f15de7feb84c63b10989bc
MISC metadata.xml 382 BLAKE2B e67d9bbfe9721b994b68130e570826f819088bf0c891073ecf1451a4fb54611e2ed1465588314cf6d1b69be91d7ac2c082da8aa4e2ed5b4d531a40fce7143bac SHA512 21bd1200ee00e4f664b5d992281492c1c4a61229aa408c387280db08a9438f75b2215ef0c0ee1aa9db0d7537bfff074fba54176d44f1f105db611ebe1e45e742
diff --git a/dev-libs/libfmt/files/libfmt-8.1.1-fix-static-assert.patch b/dev-libs/libfmt/files/libfmt-8.1.1-fix-static-assert.patch
new file mode 100644
index 000000000000..9f29d7fb111c
--- /dev/null
+++ b/dev-libs/libfmt/files/libfmt-8.1.1-fix-static-assert.patch
@@ -0,0 +1,76 @@
+https://github.com/fmtlib/fmt/commit/8f8a1a02d5c5cb967d240feee3ffac00d66f22a2.patch
+https://github.com/facebook/folly/issues/1705
+
+From 8f8a1a02d5c5cb967d240feee3ffac00d66f22a2 Mon Sep 17 00:00:00 2001
+From: Victor Zverovich <viz@fb.com>
+Date: Fri, 14 Jan 2022 13:08:14 -0800
+Subject: [PATCH] Fix handling of formattable types implicitly convertible to
+ pointers
+
+---
+ include/fmt/core.h | 5 +++--
+ test/core-test.cc | 21 ++++++++++++++++++++-
+ 2 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/include/fmt/core.h b/include/fmt/core.h
+index f2d21e5c5a..12571ce0da 100644
+--- a/include/fmt/core.h
++++ b/include/fmt/core.h
+@@ -1398,10 +1398,11 @@ template <typename Context> struct arg_mapper {
+ template <
+ typename T,
+ FMT_ENABLE_IF(
+- std::is_member_pointer<T>::value ||
++ std::is_pointer<T>::value || std::is_member_pointer<T>::value ||
+ std::is_function<typename std::remove_pointer<T>::type>::value ||
+ (std::is_convertible<const T&, const void*>::value &&
+- !std::is_convertible<const T&, const char_type*>::value))>
++ !std::is_convertible<const T&, const char_type*>::value &&
++ !has_formatter<T, Context>::value))>
+ FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
+ return {};
+ }
+diff --git a/test/core-test.cc b/test/core-test.cc
+index b2f2097ea1..c9eea8ffd8 100644
+--- a/test/core-test.cc
++++ b/test/core-test.cc
+@@ -737,6 +737,24 @@ struct convertible_to_pointer {
+ operator const int*() const { return nullptr; }
+ };
+
++struct convertible_to_pointer_formattable {
++ operator const int*() const { return nullptr; }
++};
++
++FMT_BEGIN_NAMESPACE
++template <> struct formatter<convertible_to_pointer_formattable> {
++ auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
++ return ctx.begin();
++ }
++
++ auto format(convertible_to_pointer_formattable, format_context& ctx) const
++ -> decltype(ctx.out()) {
++ auto test = string_view("test");
++ return std::copy_n(test.data(), test.size(), ctx.out());
++ }
++};
++FMT_END_NAMESPACE
++
+ enum class test_scoped_enum {};
+
+ TEST(core_test, is_formattable) {
+@@ -770,11 +788,12 @@ TEST(core_test, is_formattable) {
+ #endif
+
+ static_assert(!fmt::is_formattable<convertible_to_pointer>::value, "");
++ const auto f = convertible_to_pointer_formattable();
++ EXPECT_EQ(fmt::format("{}", f), "test");
+
+ static_assert(!fmt::is_formattable<void (*)()>::value, "");
+
+ struct s;
+-
+ static_assert(!fmt::is_formattable<int(s::*)>::value, "");
+ static_assert(!fmt::is_formattable<int (s::*)()>::value, "");
+ static_assert(!fmt::is_formattable<test_scoped_enum>::value, "");
+
diff --git a/dev-libs/libfmt/libfmt-8.1.1-r1.ebuild b/dev-libs/libfmt/libfmt-8.1.1-r1.ebuild
new file mode 100644
index 000000000000..1c6b0f4fa2dc
--- /dev/null
+++ b/dev-libs/libfmt/libfmt-8.1.1-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib
+
+DESCRIPTION="Small, safe and fast formatting library"
+HOMEPAGE="https://github.com/fmtlib/fmt"
+
+LICENSE="MIT"
+IUSE="test"
+SLOT="0/${PV}"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/fmtlib/fmt.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/fmtlib/fmt/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+ S="${WORKDIR}/fmt-${PV}"
+fi
+
+DEPEND=""
+RDEPEND=""
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-static-assert.patch
+)
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DFMT_CMAKE_DIR="$(get_libdir)/cmake/fmt"
+ -DFMT_LIB_DIR="$(get_libdir)"
+ -DFMT_TEST=$(usex test)
+ )
+ cmake_src_configure
+}