summaryrefslogtreecommitdiff
blob: ceb0e6e7814f49274ce970fd7c086d5b7cd714e1 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/gr-osmosdr/gr-osmosdr-9999.ebuild,v 1.16 2014/08/27 01:32:39 zerochaos Exp $

EAPI=5
PYTHON_DEPEND="python? 2"

inherit cmake-utils python

DESCRIPTION="GNU Radio source block for OsmoSDR and rtlsdr and hackrf"
HOMEPAGE="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR"

if [[ ${PV} == 9999* ]]; then
	inherit git-r3
	SRC_URI=""
	EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
	KEYWORDS=""
else
	#git archive --format=tar --prefix=gr-osmosdr-${PV}/ v${PV} | xz > ../gr-osmosdr-${PV}.tar.xz
	SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
	KEYWORDS="~amd64 ~arm ~x86"
fi

LICENSE="GPL-3"
SLOT="0/${PV}"
IUSE="bladerf fcd hackrf iqbalance mirisdr python rtlsdr uhd"
#IUSE="fcd hackrf iqbalance mirisdr osmosdr python rtlsdr uhd"

#	osmosdr? ( net-libs/libosmosdr:= )
RDEPEND=">=net-wireless/gnuradio-3.7_rc:0=[fcd?]
	bladerf? ( net-wireless/bladerf:= )
	hackrf? ( net-libs/libhackrf:= )
	iqbalance? ( net-wireless/gr-iqbal:= )
	mirisdr? ( net-libs/libmirisdr:= )
	rtlsdr? ( >=net-wireless/rtl-sdr-0.5.3:= )
	uhd? ( net-wireless/uhd:= )"
DEPEND="${RDEPEND}
	dev-python/cheetah"

pkg_setup() {
	python_set_active_version 2
	python_pkg_setup
}

src_prepare() {
	python_convert_shebangs -q -r 2 "${S}"
}

src_configure() {
	local mycmakeargs=(
		-DENABLE_DEFAULT=OFF
		$(cmake-utils_use_enable bladerf)
		$(cmake-utils_use_enable fcd)
		$(cmake-utils_use_enable hackrf)
		$(cmake-utils_use_enable iqbalance)
		$(cmake-utils_use_enable mirisdr MIRI)
		$(cmake-utils_use_enable python)
		$(cmake-utils_use_enable rtlsdr RTL)
		$(cmake-utils_use_enable rtlsdr RTL_TCP)
		$(cmake-utils_use_enable uhd)
	)
#		$(cmake-utils_use_enable osmosdr)

	cmake-utils_src_configure
}