public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/spdlog/files/, dev-libs/spdlog/
Date: Sun, 12 Jan 2025 14:22:26 +0000 (UTC)	[thread overview]
Message-ID: <1736691616.a16bad273658ff883161a04974026a3d5a4dab5f.sam@gentoo> (raw)

commit:     a16bad273658ff883161a04974026a3d5a4dab5f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 12 14:20:16 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 12 14:20:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a16bad27

dev-libs/spdlog: backport further libfmt-11.1.0 fixups

Not that we seem to have hit any of these extra issues...

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/spdlog-1.15.0-libfmt-11.1.0-fixups.patch | 69 ++++++++++++++++++++++
 dev-libs/spdlog/spdlog-1.15.0-r1.ebuild            | 56 ++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/dev-libs/spdlog/files/spdlog-1.15.0-libfmt-11.1.0-fixups.patch b/dev-libs/spdlog/files/spdlog-1.15.0-libfmt-11.1.0-fixups.patch
new file mode 100644
index 000000000000..afada8092f37
--- /dev/null
+++ b/dev-libs/spdlog/files/spdlog-1.15.0-libfmt-11.1.0-fixups.patch
@@ -0,0 +1,69 @@
+https://github.com/gabime/spdlog/commit/7f8060d5b280eac9786f92ac74d263cc8359c5ed
+https://github.com/gabime/spdlog/commit/96a8f6250cbf4e8c76387c614f666710a2fa9bad
+
+From 7f8060d5b280eac9786f92ac74d263cc8359c5ed Mon Sep 17 00:00:00 2001
+From: Christian Blichmann <cblichmann@users.noreply.github.com>
+Date: Tue, 7 Jan 2025 23:59:12 +0100
+Subject: [PATCH] fix: Compatibility with external fmtlib 11.1.1 (#3312)
+
+Include fmtlib's `xchar` header to include `fmt::basic_format_string`.
+Otherwise, compilation with an external fmtlib 11.1.1 fails with
+
+```
+In file included from include/spdlog/spdlog.h:12:
+include/spdlog/common.h:369:49: error: no template named 'basic_format_string' in namespace 'fmt'; did you mean 'std::basic_format_string'?
+  369 | inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
+      |                                                 ^~~~~
+```
+
+Signed-off-by: Christian Blichmann <cblichmann@google.com>
+---
+ include/spdlog/fmt/fmt.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h
+index 7fa6b0933..2f09c15ed 100644
+--- a/include/spdlog/fmt/fmt.h
++++ b/include/spdlog/fmt/fmt.h
+@@ -27,4 +27,5 @@
+ #else  // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib
+     #include <fmt/core.h>
+     #include <fmt/format.h>
++    #include <fmt/xchar.h>
+ #endif
+
+From 96a8f6250cbf4e8c76387c614f666710a2fa9bad Mon Sep 17 00:00:00 2001
+From: jdrouhard <john@drouhard.dev>
+Date: Thu, 9 Jan 2025 16:58:46 -0600
+Subject: [PATCH] fix: remove unused to_string_view overload in fmt >= 11.1
+ (#3314)
+
+---
+ include/spdlog/common.h | 14 +-------------
+ 1 file changed, 1 insertion(+), 13 deletions(-)
+
+diff --git a/include/spdlog/common.h b/include/spdlog/common.h
+index 2d73f8300..71ffd2403 100644
+--- a/include/spdlog/common.h
++++ b/include/spdlog/common.h
+@@ -364,19 +364,7 @@ SPDLOG_CONSTEXPR_FUNC spdlog::wstring_view_t to_string_view(spdlog::wstring_view
+ }
+ #endif
+ 
+-#ifndef SPDLOG_USE_STD_FORMAT
+-#if FMT_VERSION >= 110100
+-template <typename T, typename... Args>
+-inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_arg<T> fmt) {
+-    return fmt;
+-}
+-#else
+-template <typename T, typename... Args>
+-inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
+-    return fmt;
+-}
+-#endif
+-#elif __cpp_lib_format >= 202207L
++#if defined(SPDLOG_USE_STD_FORMAT) &&  __cpp_lib_format >= 202207L
+ template <typename T, typename... Args>
+ SPDLOG_CONSTEXPR_FUNC std::basic_string_view<T> to_string_view(
+     std::basic_format_string<T, Args...> fmt) SPDLOG_NOEXCEPT {

diff --git a/dev-libs/spdlog/spdlog-1.15.0-r1.ebuild b/dev-libs/spdlog/spdlog-1.15.0-r1.ebuild
new file mode 100644
index 000000000000..cefd2edefc7e
--- /dev/null
+++ b/dev-libs/spdlog/spdlog-1.15.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+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="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="test static-libs"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+	virtual/pkgconfig
+	test? (
+		>=dev-cpp/catch-3.4.0
+	)
+"
+DEPEND="
+	dev-libs/libfmt:=[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-force_external_fmt.patch"
+	"${FILESDIR}/${PN}-1.15.0-libfmt-11.1.0.patch"
+	"${FILESDIR}/${PN}-1.15.0-libfmt-11.1.0-fixups.patch"
+)
+
+multilib_src_prepare() {
+	cmake_src_prepare
+	rm -r include/spdlog/fmt/bundled || die "Failed to delete bundled libfmt"
+}
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		-DSPDLOG_BUILD_BENCH=no
+		-DSPDLOG_BUILD_EXAMPLE=no
+		-DSPDLOG_FMT_EXTERNAL=yes
+		-DSPDLOG_BUILD_SHARED=$(usex static-libs)
+		-DSPDLOG_BUILD_TESTS=$(usex test)
+	)
+
+	cmake_src_configure
+}


             reply	other threads:[~2025-01-12 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-12 14:22 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-04 12:30 [gentoo-commits] repo/gentoo:master commit in: dev-libs/spdlog/files/, dev-libs/spdlog/ Sam James
2023-07-15  6:07 Sam James
2023-05-10 15:22 Sam James
2022-05-11  1:04 Sam James
2021-06-25  0:31 Sam James
2020-08-08  9:04 Joonas Niilola
2020-01-21  2:12 Craig Andrews
2019-07-21 12:02 Andreas Sturmlechner
2018-08-08 21:21 Craig Andrews
2018-06-12 17:38 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1736691616.a16bad273658ff883161a04974026a3d5a4dab5f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox