dev-cpp/cpp-hocon: fix build with glibc-2.34, conditionally build tests

Closes: https://bugs.gentoo.org/823419
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2021-12-29 00:15:40 +00:00
parent 7571d22a49
commit 28d0fbda2f
2 changed files with 91 additions and 0 deletions
@@ -0,0 +1,40 @@
# Copyright 1999-2021 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 ~ppc64 ~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
}