summaryrefslogtreecommitdiff
blob: 3ba8466f56f8d8508bd74d13b10b6b635a5c87f5 (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7,8} )
inherit distutils-r1 eutils

DESCRIPTION="Universal Radio Hacker: investigate wireless protocols like a boss"
HOMEPAGE="https://github.com/jopohl/urh"

if [ "${PV}" = "9999" ]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/jopohl/urh.git"
	KEYWORDS=""
else
	SRC_URI="https://github.com/jopohl/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~x86"
fi

LICENSE="Apache-2.0"
SLOT="0"
IUSE="airspy audio bladerf hackrf limesdr plutosdr rtlsdr sdrplay uhd"

DEPEND="${PYTHON_DEPS}
		net-wireless/gnuradio[zeromq]
		dev-python/numpy[${PYTHON_USEDEP}]
		dev-python/psutil[${PYTHON_USEDEP}]
		dev-python/pyzmq[${PYTHON_USEDEP}]
		dev-python/cython[${PYTHON_USEDEP}]
		airspy? ( net-wireless/airspy:= )
		audio? ( dev-python/pyaudio[${PYTHON_USEDEP}] )
		bladerf? ( net-wireless/bladerf:= )
		hackrf? ( net-libs/libhackrf:= )
		limesdr? ( net-wireless/limesuite:= )
		plutosdr? ( net-libs/libiio:= )
		rtlsdr? ( net-wireless/rtl-sdr:= )
		sdrplay? ( net-wireless/sdrplay:= )
		uhd?    ( net-wireless/uhd:= )"
RDEPEND="${DEPEND}
		dev-python/PyQt5[${PYTHON_USEDEP},testlib]
		net-wireless/gr-osmosdr"

python_configure_all() {
	mydistutilsargs=(
			$(use_with airspy)
			$(use_with bladerf)
			$(use_with hackrf)
			$(use_with limesdr)
			$(use_with plutosdr)
			$(use_with rtlsdr)
			$(use_with sdrplay)
			$(use_with uhd usrp)
			)
}