blob: 37dfa3669d92c189836a381b670494c29d1b4094 (
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
63
64
65
66
|
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit edo meson python-any-r1
DESCRIPTION="A simple async wrapper around CURL for C++"
HOMEPAGE="https://nheko.im/nheko-reborn/coeurl"
SRC_URI="https://nheko.im/nheko-reborn/coeurl/-/archive/v${PV}/${PN}-v${PV}.tar.bz2 -> ${P}.tar.bz2"
S="${WORKDIR}/${PN}-v${PV}"
LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
IUSE="ssl test"
REQUIRED_USE="test? ( ssl )"
RESTRICT="!test? ( test )"
RDEPEND="
net-misc/curl[ssl?]
dev-libs/libevent:=
<dev-libs/libfmt-9:=
dev-libs/spdlog:=
"
DEPEND="
${RDEPEND}
test? ( dev-cpp/doctest )
"
BDEPEND="
test? (
dev-libs/openssl
$(python_gen_any_dep 'dev-python/flask[${PYTHON_USEDEP}]')
)
"
python_check_deps() {
python_has_version "dev-python/flask[${PYTHON_USEDEP}]"
}
src_prepare() {
default
rm -r subprojects || die
}
src_configure() {
local -a emesonargs=(
$(meson_use test tests)
)
meson_src_configure
}
src_test() {
openssl req -x509 -newkey rsa:4096 -nodes \
-out "${T}"/cert.pem -keyout "${T}"/key.pem \
-days 365 -subj "/CN=localhost" || die
edo ${EPYTHON} ./tests/testserver.py &
sleep 3
edo ${EPYTHON} ./tests/testserver.py "${T}" &
sleep 3
meson_src_test
}
|