commit:     c1bcbc12319ba4a42e62d85f54b3d1a93a745b36
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 12 17:43:03 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 12 17:58:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1bcbc12

dev-cpp/libjson-rpc-cpp: Tests require catch<3

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../libjson-rpc-cpp/libjson-rpc-cpp-1.4.0.ebuild   | 25 ++++++++++++++++------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/dev-cpp/libjson-rpc-cpp/libjson-rpc-cpp-1.4.0.ebuild 
b/dev-cpp/libjson-rpc-cpp/libjson-rpc-cpp-1.4.0.ebuild
index 3d9e42dd0fce..e80e82ba5964 100644
--- a/dev-cpp/libjson-rpc-cpp/libjson-rpc-cpp-1.4.0.ebuild
+++ b/dev-cpp/libjson-rpc-cpp/libjson-rpc-cpp-1.4.0.ebuild
@@ -6,8 +6,11 @@ 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"
@@ -15,16 +18,22 @@ 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=(
@@ -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
 }

Reply via email to