From 3144407cbf26a88da2dfa8fdc760f9390ac990ca Mon Sep 17 00:00:00 2001 From: Viorel Date: Tue, 7 Jan 2020 10:14:33 +0200 Subject: [PATCH] Add a newer spdlog Spdlog in portage depends on libfmt 5, now libfmt 6 is stable --- dev-libs/spdlog/Manifest | 1 + .../files/spdlog-1.4.2-include-assert.patch | 21 ++++++++++ dev-libs/spdlog/spdlog-1.4.2.ebuild | 42 +++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 dev-libs/spdlog/Manifest create mode 100644 dev-libs/spdlog/files/spdlog-1.4.2-include-assert.patch create mode 100644 dev-libs/spdlog/spdlog-1.4.2.ebuild diff --git a/dev-libs/spdlog/Manifest b/dev-libs/spdlog/Manifest new file mode 100644 index 0000000..5e6bf8c --- /dev/null +++ b/dev-libs/spdlog/Manifest @@ -0,0 +1 @@ +DIST spdlog-1.4.2.tar.gz 260262 BLAKE2B 1dda9d311b7832d638b0764e21075b67ee8e59b8f013b7f88eeb773093117cb50ae9325aaedcb94101b9980132ddbe8147e7e52a79856e2766ac51258b3c4de1 SHA512 886b489138a1bdf363b5eab65a7d973f570a01c399ff5b910fcfee172ad4ff4d42a45dc2ae24e77b07130df527fb13a86b3e55ac992e72c418aebb232e27eabf diff --git a/dev-libs/spdlog/files/spdlog-1.4.2-include-assert.patch b/dev-libs/spdlog/files/spdlog-1.4.2-include-assert.patch new file mode 100644 index 0000000..dbf9317 --- /dev/null +++ b/dev-libs/spdlog/files/spdlog-1.4.2-include-assert.patch @@ -0,0 +1,21 @@ +--- a/include/spdlog/details/pattern_formatter-inl.h 2019-10-06 13:13:26.000000000 +0300 ++++ b/include/spdlog/details/pattern_formatter-inl.h 2020-01-07 10:05:01.333785629 +0200 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + namespace spdlog { + namespace details { +--- a/include/spdlog/details/thread_pool-inl.h 2019-10-06 13:13:26.000000000 +0300 ++++ b/include/spdlog/details/thread_pool-inl.h 2020-01-07 10:05:01.330452318 +0200 +@@ -9,6 +9,8 @@ + + #include "spdlog/common.h" + ++#include ++ + namespace spdlog { + namespace details { + diff --git a/dev-libs/spdlog/spdlog-1.4.2.ebuild b/dev-libs/spdlog/spdlog-1.4.2.ebuild new file mode 100644 index 0000000..d00d5e7 --- /dev/null +++ b/dev-libs/spdlog/spdlog-1.4.2.ebuild @@ -0,0 +1,42 @@ +# 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/spdlog" +else + SRC_URI="https://github.com/gabime/spdlog/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="MIT" +SLOT="0/1" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/libfmt:0/6 +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-1.4.2-include-assert.patch" ) + +src_configure() { + rm -r include/spdlog/fmt/bundled || die + + local mycmakeargs=( + -DSPDLOG_BUILD_EXAMPLE=no + -DSPDLOG_BUILD_BENCH=no + -DSPDLOG_BUILD_TESTS=$(usex test) + -DSPDLOG_FMT_EXTERNAL=1 + ) + + cmake_src_configure +}