blob: 9c9553f69af57d10237c6575fe0167e19c94cb4e (
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
67
68
69
70
71
72
73
74
75
76
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( {15..21} )
PYTHON_COMPAT=( python3_{12..14} )
inherit cmake python-single-r1 llvm-r2
DESCRIPTION="RTC Testbench is a set of tools for validating Ethernet networks"
HOMEPAGE="https://github.com/Linutronix/RTC-Testbench"
SRC_URI="https://github.com/Linutronix/RTC-Testbench/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
S="${WORKDIR}/RTC-Testbench-${PV}"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc mqtt"
# Generated eBPF files
QA_PREBUILT="usr/lib*/rtc-testbench/ebpf/*.o"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
"
BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
doc? (
media-gfx/graphviz
$(python_gen_cond_dep '
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
')
)
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}=[llvm_targets_BPF(-)]
')
"
DEPEND="
mqtt? ( app-misc/mosquitto )
dev-libs/libyaml
dev-libs/libbpf:=
dev-libs/openssl:=
net-libs/xdp-tools
"
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
"
pkg_setup() {
llvm-r2_pkg_setup
}
src_configure() {
local mycmakeargs=(
-DWITH_MQTT=$(usex mqtt)
-DRX_TIMESTAMP=TRUE
-DTX_TIMESTAMP=TRUE
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
use doc && emake -C "${S}/Documentation" html
}
src_install() {
cmake_src_install
use doc && HTML_DOCS=( "${S}/Documentation/_build/html" )
}
|