summaryrefslogtreecommitdiff
path: root/dev-libs
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/spdlog/Manifest1
-rw-r--r--dev-libs/spdlog/files/libfmt8.patch11
-rw-r--r--dev-libs/spdlog/spdlog-1.8.5-r10.ebuild51
3 files changed, 63 insertions, 0 deletions
diff --git a/dev-libs/spdlog/Manifest b/dev-libs/spdlog/Manifest
new file mode 100644
index 00000000..234120d3
--- /dev/null
+++ b/dev-libs/spdlog/Manifest
@@ -0,0 +1 @@
+DIST spdlog-1.8.5.tar.gz 321229 BLAKE2B 2cdc1902a9e6f51da5c1af02b2961914a5437cfefec13aaaca8b996166c0990f602c811f69569a8812d880f995b401af44457ec4255bc5a0f9e46b51266d1b43 SHA512 77cc9df0c40bbdbfe1f3e5818dccf121918bfceac28f2608f39e5bf944968b7e8e24a6fc29f01bc58a9bae41b8892d49cfb59c196935ec9868884320b50f130c
diff --git a/dev-libs/spdlog/files/libfmt8.patch b/dev-libs/spdlog/files/libfmt8.patch
new file mode 100644
index 00000000..8d38335f
--- /dev/null
+++ b/dev-libs/spdlog/files/libfmt8.patch
@@ -0,0 +1,11 @@
+--- a/include/spdlog/common-inl.h 2021-06-21 17:15:26.695992698 -0600
++++ b/include/spdlog/common-inl.h 2021-06-21 17:15:52.205992496 -0600
+@@ -60,7 +60,7 @@
+ SPDLOG_INLINE spdlog_ex::spdlog_ex(const std::string &msg, int last_errno)
+ {
+ memory_buf_t outbuf;
+- fmt::format_system_error(outbuf, last_errno, msg);
++ fmt::format_system_error(outbuf, last_errno, msg.c_str());
+ msg_ = fmt::to_string(outbuf);
+ }
+
diff --git a/dev-libs/spdlog/spdlog-1.8.5-r10.ebuild b/dev-libs/spdlog/spdlog-1.8.5-r10.ebuild
new file mode 100644
index 00000000..b0e43d34
--- /dev/null
+++ b/dev-libs/spdlog/spdlog-1.8.5-r10.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2021 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-6.1.2:=
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/libfmt8.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
+}