summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2020-07-06 13:06:17 -0400
committerCraig Andrews <candrews@gentoo.org>2020-07-06 15:15:40 -0400
commit07d3f7a5daab2a29c4644675bd608d46189cf023 (patch)
tree2fce9c25859acee8899ae8eb5eeeaebe516b0de3 /dev-libs/spdlog
parentdev-python/doit: Stabilize 0.32.0-r1 amd64, #723994 (diff)
downloadgentoo-07d3f7a5daab2a29c4644675bd608d46189cf023.tar.gz
gentoo-07d3f7a5daab2a29c4644675bd608d46189cf023.tar.bz2
gentoo-07d3f7a5daab2a29c4644675bd608d46189cf023.zip
dev-libs/spdlog: Compatibility with dev-libs/libfmt-7.0.0
Closes: https://bugs.gentoo.org/show_bug.cgi?id=731100 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-libs/spdlog')
-rw-r--r--dev-libs/spdlog/files/spdlog-1.6.1-libfmt-7.0.0.patch33
-rw-r--r--dev-libs/spdlog/spdlog-1.6.1-r1.ebuild51
-rw-r--r--dev-libs/spdlog/spdlog-9999.ebuild2
3 files changed, 85 insertions, 1 deletions
diff --git a/dev-libs/spdlog/files/spdlog-1.6.1-libfmt-7.0.0.patch b/dev-libs/spdlog/files/spdlog-1.6.1-libfmt-7.0.0.patch
new file mode 100644
index 000000000000..422a507a6d86
--- /dev/null
+++ b/dev-libs/spdlog/files/spdlog-1.6.1-libfmt-7.0.0.patch
@@ -0,0 +1,33 @@
+https://github.com/gabime/spdlog/pull/1606
+
+From 22bee8128a4150ce37cf761ed9a609ad891848a6 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Mon, 6 Jul 2020 13:01:52 -0400
+Subject: [PATCH] fmt 7.0.0 renamed the internal namespace to detail.
+
+See: https://github.com/fmtlib/fmt/issues/1538
+---
+ include/spdlog/details/fmt_helper.h | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/include/spdlog/details/fmt_helper.h b/include/spdlog/details/fmt_helper.h
+index cbc0bdf3..4f363858 100644
+--- a/include/spdlog/details/fmt_helper.h
++++ b/include/spdlog/details/fmt_helper.h
+@@ -34,7 +34,15 @@ template<typename T>
+ inline unsigned int count_digits(T n)
+ {
+ using count_type = typename std::conditional<(sizeof(T) > sizeof(uint32_t)), uint64_t, uint32_t>::type;
+- return static_cast<unsigned int>(fmt::internal::count_digits(static_cast<count_type>(n)));
++ return static_cast<unsigned int>(fmt::
++// fmt 7.0.0 renamed the internal namespace to detail.
++// See: https://github.com/fmtlib/fmt/issues/1538
++#if FMT_VERSION < 70000
++internal
++#else
++detail
++#endif
++::count_digits(static_cast<count_type>(n)));
+ }
+
+ inline void pad2(int n, memory_buf_t &dest)
diff --git a/dev-libs/spdlog/spdlog-1.6.1-r1.ebuild b/dev-libs/spdlog/spdlog-1.6.1-r1.ebuild
new file mode 100644
index 000000000000..04237834f6cc
--- /dev/null
+++ b/dev-libs/spdlog/spdlog-1.6.1-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Very fast, header only, 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 ~ppc ~ppc64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/1"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ virtual/pkgconfig
+"
+DEPEND="
+ >=dev-libs/libfmt-5.3.0:=
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-libfmt-7.0.0.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 24491a214dcb..6da33cbbf3c6 100644
--- a/dev-libs/spdlog/spdlog-9999.ebuild
+++ b/dev-libs/spdlog/spdlog-9999.ebuild
@@ -13,7 +13,7 @@ if [[ ${PV} == *9999 ]]; then
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"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
fi
LICENSE="MIT"