summaryrefslogtreecommitdiff
path: root/dev-libs/zycore-c/zycore-c-9999.ebuild
blob: 6759d2eb7d9311ebe2b2c5fdbbcb63dea6d0a886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Zyan Core Library for C"
HOMEPAGE="https://github.com/zyantific/zycore-c"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/zyantific/zycore-c.git"
else
	SRC_URI="https://github.com/zyantific/zycore-c/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi

LICENSE="MIT"
SLOT="0"
IUSE="doc test"
RESTRICT="!test? ( test )"

BDEPEND="
	doc? ( app-text/doxygen )
	test? ( dev-cpp/gtest )
"

PATCHES=(
	"${FILESDIR}/${PN}-1.5.2-build-documentation-only-when-requested.patch"
)

src_configure() {
	local mycmakeargs=(
		-DZYCORE_BUILD_SHARED_LIB=yes
		-DZYCORE_BUILD_TESTS=$(usex test)
		-DZYCORE_BUILD_DOCS=$(usex doc)
	)

	cmake_src_configure
}