From 9b6120d8af003bb775da6737dfe42f8f580f59f6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 15 Jul 2023 10:39:51 +0100 Subject: gentoo auto-resync : 15:07:2023 - 10:39:50 --- dev-libs/spdlog/Manifest | 7 +- dev-libs/spdlog/files/spdlog-fmt-10.patch | 121 ++++++++++++++++++++++++++++++ dev-libs/spdlog/spdlog-1.11.0-r2.ebuild | 52 ------------- dev-libs/spdlog/spdlog-1.11.0-r3.ebuild | 55 ++++++++++++++ dev-libs/spdlog/spdlog-1.12.0-r2.ebuild | 52 +++++++++++++ dev-libs/spdlog/spdlog-9999.ebuild | 3 +- 6 files changed, 235 insertions(+), 55 deletions(-) create mode 100644 dev-libs/spdlog/files/spdlog-fmt-10.patch delete mode 100644 dev-libs/spdlog/spdlog-1.11.0-r2.ebuild create mode 100644 dev-libs/spdlog/spdlog-1.11.0-r3.ebuild create mode 100644 dev-libs/spdlog/spdlog-1.12.0-r2.ebuild (limited to 'dev-libs/spdlog') diff --git a/dev-libs/spdlog/Manifest b/dev-libs/spdlog/Manifest index d8d922be16ec..f5ca08b49ce8 100644 --- a/dev-libs/spdlog/Manifest +++ b/dev-libs/spdlog/Manifest @@ -1,6 +1,9 @@ +AUX spdlog-fmt-10.patch 5199 BLAKE2B 1e2593faf291f2f366897fd2eb1764b442627a86ced6195454f283e9e2a17807386f55d5c33f31dccdabcda0bf4bd6aab60388a4f6cc281e3506344984a90a3e SHA512 8af2a62939eb39de667af8d7082230b696243510648577abc786ea5b8e9ee87a830e2e5972bc92431c692cd508c76eec592374b1fa599dea4cd52ac0dbfd4496 AUX spdlog-force_external_fmt.patch 539 BLAKE2B 326f40d3d496e7373a77476d5aba237d8ad7828e5d21ccfc1e4183a74e3f7f2df1f61a2188a5cf0dc4c08ef9692c5de4a4589fae75c1daa4a9987d4be3f168f6 SHA512 257c7f7f56e66b88a16238a2c81887f2d5ba9692c18bf5fc371b95f44936018ec7c4a0abd0e54f38cb6a7957f82a1b95af9d238fa7fa16631f0be1980d76f692 AUX spdlog-musl-1.2.4.patch 1428 BLAKE2B 22d1c0ada761c52f29e1a4dff0c16140741d78f878d14fc78fbfde9dbf7a73fe08e3b0bfa22c9e0ccfa4f631459bb6349c6a33f0e6ba5f646c2e56e731831bbe SHA512 8cc281e126eb0246a13880487a667e8672eb190810698b0737dd1211153e3b158e13a0bba8c57f8e72f5f3f0532b856c9ef9ab6c5825c694cb96c02877a73151 DIST spdlog-1.11.0.tar.gz 373033 BLAKE2B a05a535ba55641ecb3bf484eeff902f266bf3967cfbd619234ab0ca2d0c15bddb27b73ce43c33623d02fb046f621933cd52cf39f377f354182d9cdab33340f28 SHA512 210f3135c7af3ec774ef9a5c77254ce172a44e2fa720bf590e1c9214782bf5c8140ff683403a85b585868bc308286fbdeb1c988e4ed1eb3c75975254ffe75412 -EBUILD spdlog-1.11.0-r2.ebuild 1027 BLAKE2B 48384fe3d981ac45eeb29d7b1ba5f6d394e575d9f1255bc37c1ca673422141903ae02c2bc8df8913441d1b37fc6245744f8cae057cc56784f10e74aa7d81b9f8 SHA512 20eb904c28dabf670a795ad3a67842ad6c6d48ee74034b82efaedf52fa6aabcc239011665879ea52f8791505be6423f6c17930f4872b5591b4aeeea8e9cd5b28 -EBUILD spdlog-9999.ebuild 997 BLAKE2B 63ee00aedfb9a4aa437a72ed2d41dc28e590cb50c76476733ef5ee895ed5e2fe0b16f3ec0dce562a05bdcd5f373df2f657735ad30890a1eb1a4cec5b86422dcc SHA512 2628758065ca9a8bc93ad99c4c0f930b6aa7bb44a75e80a40cd781597124ab81f3e38e24e327401adb2128e5d909c3f46c500f1578bb198f8b47c23a566efd74 +DIST spdlog-1.12.0.tar.gz 251037 BLAKE2B 3170f1e680fc4652ed8ddc0f74627aec22149f028def599fc5ed4db3a942d840006963789577f2e3df0e2b8ca1d98a881f3b96be5e1174fdf0acea15b3676d6e SHA512 db9a4f13b6c39ffde759db99bcdfe5e2dbe4231e73b29eb906a3fa78d6b8ec66920b8bd4371df17ae21b7b562472a236bc4435678f3af92b6496be090074181d +EBUILD spdlog-1.11.0-r3.ebuild 1055 BLAKE2B 12914f9c9ecf487565ad5df9ee4d2c293b63212778829f67e0c8b9d6de346b72ef43caf84d08a124321eb2b2e9b19b3715582753d327258bc4e160fbcc799377 SHA512 ce1325781aebbfe60c5ce4ae603c0709e9f6a3fff4c735fc6fec015f6f0339d47e439ed43f9d8e232baad15e3702680922e5d38a13abaa4835c0b9d7307b6e3c +EBUILD spdlog-1.12.0-r2.ebuild 1037 BLAKE2B dc327846fe1bb2ed5199ba13f53ba24b2040af8df5e6e094059d96436b1e882cf1fee83f92da10812ac738a4c50e8eaae3d0c7b1fe5fca72ca1e17831b647364 SHA512 fe9ec2e627e4dc8195bfee5892e966ee119bd6149e9002d5a8469f981d20e980fccb6bbeaf9eb90b564982ab479efe9f4cf2235a3db60cf4807b89e8296b9943 +EBUILD spdlog-9999.ebuild 1037 BLAKE2B dc327846fe1bb2ed5199ba13f53ba24b2040af8df5e6e094059d96436b1e882cf1fee83f92da10812ac738a4c50e8eaae3d0c7b1fe5fca72ca1e17831b647364 SHA512 fe9ec2e627e4dc8195bfee5892e966ee119bd6149e9002d5a8469f981d20e980fccb6bbeaf9eb90b564982ab479efe9f4cf2235a3db60cf4807b89e8296b9943 MISC metadata.xml 475 BLAKE2B cd5f474d10b31fb435f603c876f20d7a13c892eb6b10b4f135855fcd3c2da9ee5d9679ccf384de61472f36df06af8f49ac19c302a27fd0112b07a7da2dba1504 SHA512 89ddbd67b6fd5a54f035d068d71eac904b677d2370f9e15842eb442bc7e4ec9f579df8db2090480c3673d558371c6d7ca3a8f7b36c316ac54d47e4baa018381c 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-r2.ebuild deleted file mode 100644 index 7d751c92f18e..000000000000 --- a/dev-libs/spdlog/spdlog-1.11.0-r2.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -DESCRIPTION="Fast C++ logging library" -HOMEPAGE="https://github.com/gabime/spdlog" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/gabime/${PN}" -else - SRC_URI="https://github.com/gabime/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86" -fi - -LICENSE="MIT" -SLOT="0/1" -IUSE="test" -RESTRICT="!test? ( test )" - -BDEPEND=" - virtual/pkgconfig -" -DEPEND=" - dev-libs/libfmt:0/9.1.0 -" -RDEPEND="${DEPEND}" - -PATCHES=( - "${FILESDIR}/${PN}-force_external_fmt.patch" - "${FILESDIR}/${PN}-musl-1.2.4.patch" -) - -src_prepare() { - cmake_src_prepare - rm -r include/spdlog/fmt/bundled || die "Failed to delete bundled libfmt" -} - -src_configure() { - local mycmakeargs=( - -DSPDLOG_BUILD_BENCH=no - -DSPDLOG_BUILD_EXAMPLE=no - -DSPDLOG_FMT_EXTERNAL=yes - -DSPDLOG_BUILD_SHARED=yes - -DSPDLOG_BUILD_TESTS=$(usex test) - ) - - cmake_src_configure -} diff --git a/dev-libs/spdlog/spdlog-1.11.0-r3.ebuild b/dev-libs/spdlog/spdlog-1.11.0-r3.ebuild new file mode 100644 index 000000000000..a513025d8d54 --- /dev/null +++ b/dev-libs/spdlog/spdlog-1.11.0-r3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Fast C++ logging library" +HOMEPAGE="https://github.com/gabime/spdlog" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/gabime/${PN}" +else + SRC_URI="https://github.com/gabime/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86" +fi + +LICENSE="MIT" +SLOT="0/1" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + virtual/pkgconfig +" + +DEPEND=" + dev-libs/libfmt +" + +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-force_external_fmt.patch" + "${FILESDIR}/${PN}-fmt-10.patch" + "${FILESDIR}/${PN}-musl-1.2.4.patch" +) + +src_prepare() { + cmake_src_prepare + rm -r include/spdlog/fmt/bundled || die "Failed to delete bundled libfmt" +} + +src_configure() { + local mycmakeargs=( + -DSPDLOG_BUILD_BENCH=no + -DSPDLOG_BUILD_EXAMPLE=no + -DSPDLOG_FMT_EXTERNAL=yes + -DSPDLOG_BUILD_SHARED=yes + -DSPDLOG_BUILD_TESTS=$(usex test) + ) + + cmake_src_configure +} diff --git a/dev-libs/spdlog/spdlog-1.12.0-r2.ebuild b/dev-libs/spdlog/spdlog-1.12.0-r2.ebuild new file mode 100644 index 000000000000..55c4ac137dc1 --- /dev/null +++ b/dev-libs/spdlog/spdlog-1.12.0-r2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Fast C++ logging library" +HOMEPAGE="https://github.com/gabime/spdlog" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/gabime/${PN}" +else + SRC_URI="https://github.com/gabime/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + virtual/pkgconfig + test? ( dev-cpp/catch:0 ) +" +DEPEND=" + >=dev-libs/libfmt-8.0.0:= +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-force_external_fmt.patch" +) + +src_prepare() { + cmake_src_prepare + rm -r include/spdlog/fmt/bundled || die "Failed to delete bundled libfmt" +} + +src_configure() { + local mycmakeargs=( + -DSPDLOG_BUILD_BENCH=no + -DSPDLOG_BUILD_EXAMPLE=no + -DSPDLOG_FMT_EXTERNAL=yes + -DSPDLOG_BUILD_SHARED=yes + -DSPDLOG_BUILD_TESTS=$(usex test) + ) + + cmake_src_configure +} diff --git a/dev-libs/spdlog/spdlog-9999.ebuild b/dev-libs/spdlog/spdlog-9999.ebuild index 3a40efcae37b..55c4ac137dc1 100644 --- a/dev-libs/spdlog/spdlog-9999.ebuild +++ b/dev-libs/spdlog/spdlog-9999.ebuild @@ -17,12 +17,13 @@ else fi LICENSE="MIT" -SLOT="0/1" +SLOT="0/$(ver_cut 1-2)" IUSE="test" RESTRICT="!test? ( test )" BDEPEND=" virtual/pkgconfig + test? ( dev-cpp/catch:0 ) " DEPEND=" >=dev-libs/libfmt-8.0.0:= -- cgit v1.2.3