1 # Copyright 1999-2022 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="JSON-RPC (1.0 & 2.0) framework for C++"
9 HOMEPAGE="https://github.com/cinemast/libjson-rpc-cpp/"
11 https://github.com/cinemast/${PN}/archive/v${PV}.tar.gz
17 KEYWORDS="~amd64 ~x86"
18 IUSE="+http-client +http-server redis-client redis-server +stubgen test"
19 RESTRICT="!test? ( test )"
23 http-client? ( net-misc/curl:= )
24 http-server? ( net-libs/libmicrohttpd:= )
25 redis-client? ( dev-libs/hiredis:= )
26 redis-server? ( dev-libs/hiredis:= )
27 stubgen? ( dev-libs/argtable:= )
40 -DHTTP_CLIENT=$(usex http-client)
41 -DHTTP_SERVER=$(usex http-server)
42 -DREDIS_CLIENT=$(usex redis-client)
43 -DREDIS_SERVER=$(usex redis-server)
45 -DTCP_SOCKET_CLIENT=ON
46 -DTCP_SOCKET_SERVER=ON
47 -DSERIAL_PORT_CLIENT=ON
48 -DSERIAL_PORT_SERVER=ON
49 -DUNIX_DOMAIN_SOCKET_CLIENT=ON
50 -DUNIX_DOMAIN_SOCKET_SERVER=ON
51 # they are not installed
52 -DCOMPILE_EXAMPLES=OFF
53 -DCOMPILE_STUBGEN=$(usex stubgen)
54 -DCOMPILE_TESTS=$(usex test)
55 # disable coverage-related flags
58 use test && mycmakeargs+=(
59 -DCATCH_INCLUDE_DIR="${EPREFIX}/usr/include"
66 # Tests fail randomly when run in parallel