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

EAPI=7

inherit cmake prefix

DESCRIPTION="Provides C++ support for the HOCON configuration file format"
HOMEPAGE="https://github.com/puppetlabs/cpp-hocon"
SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0/${PV}"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc x86"
IUSE="debug test"
RESTRICT="!test? ( test )"

RDEPEND="
	>=dev-libs/boost-1.54:=[nls]
	>=dev-libs/leatherman-0.9.3:=
"
DEPEND="${DEPEND}
	test? ( dev-cpp/catch:1 )"

#PATCHES=( "${FILESDIR}"/${PN}-0.2.1-cmake.patch )
PATCHES=( "${FILESDIR}"/${PN}-0.3.0-use-system-catch.patch )

src_prepare() {
	cmake_src_prepare

	eprefixify lib/tests/CMakeLists.txt
}

src_configure() {
	local mycmakeargs=(
		-DBUILD_TESTING=$(usex test)
	)

	cmake_src_configure
}