aboutsummaryrefslogtreecommitdiff
blob: ec6ee26f7636ad121a2ba708f8980e35e28494cb (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake flag-o-matic

COMMIT="2f2b80feac1e35cbe1cae986c44dbb20d4151c74"

DESCRIPTION="A utility library used by various potassco projects"
HOMEPAGE="https://github.com/potassco/libpotassco"
SRC_URI="https://github.com/potassco/${PN}/archive/${COMMIT}.tar.gz -> ${PF}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"

LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="test tools"

DEPEND="test? ( dev-cpp/catch:1 )"

RESTRICT="!test? ( test )"

src_prepare() {
	rm tests/catch.hpp || die
	cmake_src_prepare
}

src_configure() {
	append-cxxflags "-I/usr/include/catch"
	local mycmakeargs=(
		-DLIB_POTASSCO_BUILD_TESTS=$(usex test)
		-DLIB_POTASSCO_BUILD_APP=$(usex tools)
		-DLIB_POTASSCO_INSTALL_LIB=ON
		-DLIB_POTASSCO_INSTALL_VERSIONED=OFF
	)
	cmake_src_configure
}