aboutsummaryrefslogtreecommitdiff
blob: 0ec823cd88ea45ad1ce9dc219c5052cc7d23f040 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 2021-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

MY_P="IXWebSocket-${PV}"

DESCRIPTION="C++ websocket client and server library"
HOMEPAGE="https://github.com/machinezone/IXWebSocket"
SRC_URI="https://github.com/machinezone/IXWebSocket/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD"
SLOT="0/11.3.2"
KEYWORDS="~amd64 ~x86"
IUSE="+ssl test zlib ws"

DEPEND="
	ssl? (
		dev-libs/openssl:=
	)
	ws? (
		>=dev-libs/spdlog-1.8.0:=
	)
	zlib? (
		sys-libs/zlib:=
	)
	test? (
		>=dev-libs/spdlog-1.8.0:=
	)
"
RDEPEND="
	ssl? (
		dev-libs/openssl:=
	)
	zlib? (
		sys-libs/zlib:=
	)
"
BDEPEND=""

S="${WORKDIR}/${MY_P}"

RESTRICT="!test? ( test )"

PATCHES=(
	# Some tests require network connectivity
	"${FILESDIR}/${P}-remove-network-tests.patch"
	# Upstream uses git submodules
	"${FILESDIR}/${P}-use-system-spdlog.patch"
)

src_configure() {
	local mycmakeargs=(
		-DUSE_TLS="$(usex ssl)"
		-DUSE_ZLIB="$(usex zlib)"
		-DUSE_WS="$(usex ws)"
		-DUSE_TEST="$(usex test)"
	)
	cmake_src_configure
}