From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9AD5E15800A for ; Sat, 15 Jul 2023 06:07:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9826AE08A2; Sat, 15 Jul 2023 06:07:31 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7E653E08A2 for ; Sat, 15 Jul 2023 06:07:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3BF434017A for ; Sat, 15 Jul 2023 06:07:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F39E7A6A for ; Sat, 15 Jul 2023 06:07:28 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1689400977.682906906c17c3127b5f9dfd984bbd4ea91902bc.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/spdlog/files/, dev-libs/spdlog/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/spdlog/files/spdlog-fmt-10.patch dev-libs/spdlog/spdlog-1.11.0-r2.ebuild dev-libs/spdlog/spdlog-1.11.0-r3.ebuild X-VCS-Directories: dev-libs/spdlog/files/ dev-libs/spdlog/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 682906906c17c3127b5f9dfd984bbd4ea91902bc X-VCS-Branch: master Date: Sat, 15 Jul 2023 06:07:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 28bbd551-49a8-47e2-a0a4-4fff7db483b6 X-Archives-Hash: 3ba94d003dc289fa9ca8ac92219743f8 commit: 682906906c17c3127b5f9dfd984bbd4ea91902bc Author: David Roman ifae es> AuthorDate: Mon Jun 26 22:25:38 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jul 15 06:02:57 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68290690 dev-libs/spdlog: fix fmt-10.x compatibility Closes: https://bugs.gentoo.org/906069 Signed-off-by: David Roman gmail.com> Signed-off-by: Sam James gentoo.org> dev-libs/spdlog/files/spdlog-fmt-10.patch | 121 +++++++++++++++++++++ ...og-1.11.0-r2.ebuild => spdlog-1.11.0-r3.ebuild} | 5 +- 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/dev-libs/spdlog/files/spdlog-fmt-10.patch b/dev-libs/spdlog/files/spdlog-fmt-10.patch new file mode 100644 index 000000000000..5ee44c41ea6a --- /dev/null +++ b/dev-libs/spdlog/files/spdlog-fmt-10.patch @@ -0,0 +1,121 @@ +diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h +index f6f1bb1d..90af9676 100644 +--- a/include/spdlog/sinks/daily_file_sink.h ++++ b/include/spdlog/sinks/daily_file_sink.h +@@ -13,6 +13,9 @@ + #include + #include + ++#include ++#include ++#include + #include + #include + #include +@@ -46,46 +49,15 @@ struct daily_filename_calculator + */ + struct daily_filename_format_calculator + { +- static filename_t calc_filename(const filename_t &filename, const tm &now_tm) ++ static filename_t calc_filename(const filename_t &file_path, const tm &now_tm) + { +-#ifdef SPDLOG_USE_STD_FORMAT +- // adapted from fmtlib: https://github.com/fmtlib/fmt/blob/8.0.1/include/fmt/chrono.h#L522-L546 +- +- filename_t tm_format; +- tm_format.append(filename); +- // By appending an extra space we can distinguish an empty result that +- // indicates insufficient buffer size from a guaranteed non-empty result +- // https://github.com/fmtlib/fmt/issues/2238 +- tm_format.push_back(' '); +- +- const size_t MIN_SIZE = 10; +- filename_t buf; +- buf.resize(MIN_SIZE); +- for (;;) +- { +- size_t count = strftime(buf.data(), buf.size(), tm_format.c_str(), &now_tm); +- if (count != 0) +- { +- // Remove the extra space. +- buf.resize(count - 1); +- break; +- } +- buf.resize(buf.size() * 2); +- } +- +- return buf; ++#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) ++ std::wstringstream stream; + #else +- // generate fmt datetime format string, e.g. {:%Y-%m-%d}. +- filename_t fmt_filename = fmt::format(SPDLOG_FMT_STRING(SPDLOG_FILENAME_T("{{:{}}}")), filename); +- +- // MSVC doesn't allow fmt::runtime(..) with wchar, with fmtlib versions < 9.1.x +-# if defined(_MSC_VER) && defined(SPDLOG_WCHAR_FILENAMES) && FMT_VERSION < 90101 +- return fmt::format(fmt_filename, now_tm); +-# else +- return fmt::format(SPDLOG_FMT_RUNTIME(fmt_filename), now_tm); +-# endif +- ++ std::stringstream stream; + #endif ++ stream << std::put_time(&now_tm, file_path.c_str()); ++ return stream.str(); + } + + private: +diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h +index 71544e84..1d802f32 100644 +--- a/include/spdlog/logger.h ++++ b/include/spdlog/logger.h +@@ -369,9 +369,9 @@ protected: + { + memory_buf_t buf; + #ifdef SPDLOG_USE_STD_FORMAT +- fmt_lib::vformat_to(std::back_inserter(buf), fmt, fmt_lib::make_format_args(std::forward(args)...)); ++ fmt_lib::vformat_to(std::back_inserter(buf), fmt, fmt_lib::make_format_args(args...)); + #else +- fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(std::forward(args)...)); ++ fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(args...)); + #endif + + details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size())); +@@ -395,10 +395,9 @@ protected: + // format to wmemory_buffer and convert to utf8 + wmemory_buf_t wbuf; + # ifdef SPDLOG_USE_STD_FORMAT +- fmt_lib::vformat_to( +- std::back_inserter(wbuf), fmt, fmt_lib::make_format_args(std::forward(args)...)); ++ fmt_lib::vformat_to(std::back_inserter(wbuf), fmt, fmt_lib::make_format_args(args...)); + # else +- fmt::vformat_to(std::back_inserter(wbuf), fmt, fmt::make_format_args(std::forward(args)...)); ++ fmt::vformat_to(std::back_inserter(wbuf), fmt, fmt::make_format_args(args...)); + # endif + + memory_buf_t buf; +diff --git a/include/spdlog/common.h b/include/spdlog/common.h +index e69201a8..5f671c5c 100644 +--- a/include/spdlog/common.h ++++ b/include/spdlog/common.h +@@ -173,12 +173,19 @@ using format_string_t = fmt::format_string; + template + using remove_cvref_t = typename std::remove_cv::type>::type; + ++template ++#if FMT_VERSION >= 90101 ++using fmt_runtime_string = fmt::runtime_format_string; ++#else ++using fmt_runtime_string = fmt::basic_runtime; ++#endif ++ + // clang doesn't like SFINAE disabled constructor in std::is_convertible<> so have to repeat the condition from basic_format_string here, + // in addition, fmt::basic_runtime is only convertible to basic_format_string but not basic_string_view + template + struct is_convertible_to_basic_format_string + : std::integral_constant>::value || std::is_same, fmt::basic_runtime>::value> ++ std::is_convertible>::value || std::is_same, fmt_runtime_string>::value> + {}; + + # if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) diff --git a/dev-libs/spdlog/spdlog-1.11.0-r2.ebuild b/dev-libs/spdlog/spdlog-1.11.0-r3.ebuild similarity index 94% rename from dev-libs/spdlog/spdlog-1.11.0-r2.ebuild rename to dev-libs/spdlog/spdlog-1.11.0-r3.ebuild index 7d751c92f18e..a513025d8d54 100644 --- a/dev-libs/spdlog/spdlog-1.11.0-r2.ebuild +++ b/dev-libs/spdlog/spdlog-1.11.0-r3.ebuild @@ -24,13 +24,16 @@ RESTRICT="!test? ( test )" BDEPEND=" virtual/pkgconfig " + DEPEND=" - dev-libs/libfmt:0/9.1.0 + dev-libs/libfmt " + RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${PN}-force_external_fmt.patch" + "${FILESDIR}/${PN}-fmt-10.patch" "${FILESDIR}/${PN}-musl-1.2.4.patch" )