1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit cmake-utils python-single-r1
9 DESCRIPTION="GNU Radio source block for OsmoSDR and rtlsdr and hackrf"
10 HOMEPAGE="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR"
12 if [[ ${PV} == 9999* ]]; then
15 EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
18 #SRC_URI="http://cgit.osmocom.org/gr-osmosdr/snapshot/gr-osmosdr-${PV}.tar.xz"
19 #git clone git://git.osmocom.org/gr-osmosdr.git
21 #git archive --format=tar --prefix=gr-osmosdr-${PV}/ v${PV} | xz > ../gr-osmosdr-${PV}.tar.xz
22 SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/gr-osmosdr-${PV}.tar.xz"
23 KEYWORDS="~amd64 ~arm ~x86"
28 IUSE="bladerf fcd hackrf iqbalance mirisdr python rtlsdr sdrplay soapy uhd"
30 RDEPEND="${PYTHON_DEPS}
32 >=net-wireless/gnuradio-3.7_rc:0=[fcd?,${PYTHON_USEDEP}]
33 bladerf? ( >=net-wireless/bladerf-2018.08_rc1:= )
34 hackrf? ( net-libs/libhackrf:= )
35 iqbalance? ( net-wireless/gr-iqbal:=[${PYTHON_USEDEP}] )
36 mirisdr? ( net-libs/libmirisdr:= )
37 rtlsdr? ( >=net-wireless/rtl-sdr-0.5.3:= )
38 sdrplay? ( net-wireless/sdrplay )
39 soapy? ( net-wireless/soapysdr )
40 uhd? ( net-wireless/uhd:=[${PYTHON_USEDEP}] )"
44 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
49 -DPYTHON_EXECUTABLE="${PYTHON}"
51 -DENABLE_BLADERF="$(usex bladerf)"
52 -DENABLE_FCD="$(usex fcd)"
53 -DENABLE_HACKRF="$(usex hackrf)"
54 -DENABLE_IQBALANCE="$(usex iqbalance)"
55 -DENABLE_MIRI="$(usex mirisdr)"
56 -DENABLE_PYTHON="$(usex python)"
57 -DENABLE_RTL="$(usex rtlsdr)"
58 -DENABLE_RTL_TCP="$(usex rtlsdr)"
59 -DENABLE_SOAPY="$(usex soapy)"
60 -DENABLE_UHD="$(usex uhd)"
61 -DENABLE_SDRPLAY="$(usex sdrplay)"
62 -DENABLE_NONFREE="$(usex sdrplay)"
65 cmake-utils_src_configure
69 cmake-utils_src_install
71 python_fix_shebang "${ED}"/usr/bin