Skip to content

Commit

Permalink
dev-cpp/libjson-rpc-cpp: Tests require catch<3
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Dec 12, 2022
1 parent df359c8 commit c1bcbc1
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions dev-cpp/libjson-rpc-cpp/libjson-rpc-cpp-1.4.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,34 @@ EAPI=8
inherit cmake

DESCRIPTION="JSON-RPC (1.0 & 2.0) framework for C++"
HOMEPAGE="https://github.com/cinemast/libjson-rpc-cpp"
SRC_URI="https://github.com/cinemast/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
HOMEPAGE="https://github.com/cinemast/libjson-rpc-cpp/"
SRC_URI="
https://github.com/cinemast/${PN}/archive/v${PV}.tar.gz
-> ${P}.tar.gz
"

LICENSE="MIT"
SLOT="0/1"
KEYWORDS="~amd64 ~x86"
IUSE="+http-client +http-server redis-client redis-server +stubgen test"
RESTRICT="!test? ( test )"

RDEPEND="
DEPEND="
dev-libs/jsoncpp:=
http-client? ( net-misc/curl:= )
http-server? ( net-libs/libmicrohttpd:= )
redis-client? ( dev-libs/hiredis:= )
redis-server? ( dev-libs/hiredis:= )
stubgen? ( dev-libs/argtable:= )"
DEPEND="${RDEPEND}"
stubgen? ( dev-libs/argtable:= )
"
RDEPEND="
${DEPEND}
"
BDEPEND="
test? ( dev-cpp/catch:0 )"
test? (
<dev-cpp/catch-3
)
"

src_configure() {
local mycmakeargs=(
Expand All @@ -43,10 +52,12 @@ src_configure() {
-DCOMPILE_EXAMPLES=OFF
-DCOMPILE_STUBGEN=$(usex stubgen)
-DCOMPILE_TESTS=$(usex test)
-DCATCH_INCLUDE_DIR="${EPREFIX}/usr/include/catch2"
# disable coverage-related flags
-DWITH_COVERAGE=OFF
)
use test && mycmakeargs+=(
-DCATCH_INCLUDE_DIR="${EPREFIX}/usr/include"
)

cmake_src_configure
}
Expand Down

0 comments on commit c1bcbc1

Please sign in to comment.