dev-libs/spdlog: fix patch of live ebuild
[gentoo.git] / dev-libs / spdlog / spdlog-1.3.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit cmake-utils
7
8 DESCRIPTION="Very fast, header only, C++ logging library"
9 HOMEPAGE="https://github.com/gabime/spdlog"
10
11 if [[ ${PV} == *9999 ]]; then
12         inherit git-r3
13         EGIT_REPO_URI="https://github.com/gabime/spdlog"
14 else
15         SRC_URI="https://github.com/gabime/spdlog/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16         KEYWORDS="~amd64"
17 fi
18
19 LICENSE="MIT"
20 SLOT="0/1"
21 IUSE="test"
22
23 DEPEND="
24         >=dev-libs/libfmt-5.0.0
25 "
26 RDEPEND="${DEPEND}"
27
28 PATCHES=( "${FILESDIR}/${PN}-1.0.0-unbundle-fmt.patch" )
29
30 src_configure() {
31         rm -r include/spdlog/fmt/bundled || die
32
33         local mycmakeargs=(
34                 -DSPDLOG_BUILD_EXAMPLES=no
35                 -DSPDLOG_BUILD_BENCH=no
36                 -DSPDLOG_BUILD_TESTS=$(usex test)
37         )
38
39         cmake-utils_src_configure
40 }