summaryrefslogtreecommitdiff
blob: a0d7409fa52897cef237bacbd7cf797b09211321 (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
# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake

DESCRIPTION="Open source SDR LTE software suite from Software Radio Systems"
HOMEPAGE="http://www.softwareradiosystems.com"

if [ "${PV}" = "9999" ]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/srsLTE/srsLTE.git"
else
	inherit vcs-snapshot
	KEYWORDS="~amd64 ~x86"
	MY_PV=${PV//./_}
	SRC_URI="https://github.com/srsLTE/srsLTE/archive/release_${MY_PV}.tar.gz -> ${P}.tar.gz"
fi
#https://github.com/srsLTE/srsLTE/issues/537
RESTRICT="test"

LICENSE="GPL-3"
SLOT="0"
IUSE="bladerf simcard soapysdr uhd zeromq"

DEPEND="
	dev-libs/boost:=
	dev-libs/libconfig:=
	net-misc/lksctp-tools
	net-libs/mbedtls:=
	sci-libs/fftw:3.0=
	bladerf? ( net-wireless/bladerf:= )
	simcard? ( sys-apps/pcsc-lite )
	soapysdr? ( net-wireless/soapysdr:= )
	uhd? ( net-wireless/uhd:= )
	zeromq? ( net-libs/zeromq:= )
"
RDEPEND="${DEPEND}"
BDEPEND=""

src_prepare() {
	sed -i '/ -Werror"/d' CMakeLists.txt || die
	cmake_src_prepare
}

src_configure() {
	mycmakeargs=(
		-DENABLE_UHD="$(usex uhd)"
		-DENABLE_BLADERF="$(usex bladerf)"
		-DENABLE_SOAPYSDR="$(usex soapysdr)"
		-DENABLE_ZEROMQ="$(usex zeromq)"
		-DENABLE_HARDSIM="$(usex simcard)"
	)
	cmake_src_configure
}