Gentoo Archives: gentoo-commits

From: Thomas Beierlein <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/gr-osmosdr/
Date: Mon, 29 Aug 2022 12:08:09
Message-Id: 1661774806.48d8e802ac708411bd972944996b6e1f8ed16e38.tomjbe@gentoo
1 commit: 48d8e802ac708411bd972944996b6e1f8ed16e38
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 29 12:06:46 2022 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 29 12:06:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48d8e802
7
8 net-wireless/gr-osmosdr: Make building documentation optional
9
10 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
11
12 .../gr-osmosdr-0.2.3_p20210128-r1.ebuild | 85 ++++++++++++++++++++++
13 1 file changed, 85 insertions(+)
14
15 diff --git a/net-wireless/gr-osmosdr/gr-osmosdr-0.2.3_p20210128-r1.ebuild b/net-wireless/gr-osmosdr/gr-osmosdr-0.2.3_p20210128-r1.ebuild
16 new file mode 100644
17 index 000000000000..93c7e4a5661e
18 --- /dev/null
19 +++ b/net-wireless/gr-osmosdr/gr-osmosdr-0.2.3_p20210128-r1.ebuild
20 @@ -0,0 +1,85 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +PYTHON_COMPAT=( python3_{8..10} )
26 +
27 +inherit cmake python-single-r1
28 +
29 +DESCRIPTION="GNU Radio source block for OsmoSDR and rtlsdr and hackrf"
30 +HOMEPAGE="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR"
31 +
32 +if [[ ${PV} == 9999* ]]; then
33 + inherit git-r3
34 + EGIT_REPO_URI="https://github.com/osmocom/gr-osmosdr.git"
35 +else
36 + COMMIT="a100eb024c0210b95e4738b6efd836d48225bd03"
37 + SRC_URI="https://github.com/osmocom/gr-osmosdr/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
38 + S="${WORKDIR}/${PN}-${COMMIT}"
39 + KEYWORDS="~amd64 ~x86"
40 +fi
41 +
42 +LICENSE="GPL-3"
43 +SLOT="0/${PV}"
44 +IUSE="airspy bladerf doc hackrf iqbalance python rtlsdr sdrplay soapy uhd xtrx"
45 +
46 +RDEPEND="${PYTHON_DEPS}
47 + dev-libs/boost:=
48 + dev-libs/log4cpp
49 + >=net-wireless/gnuradio-3.9.0.0:0=[${PYTHON_SINGLE_USEDEP}]
50 + sci-libs/volk:=
51 + airspy? ( net-wireless/airspy )
52 + bladerf? ( >=net-wireless/bladerf-2018.08_rc1:= )
53 + hackrf? ( net-libs/libhackrf:= )
54 + iqbalance? ( net-wireless/gr-iqbal:=[${PYTHON_SINGLE_USEDEP}] )
55 + rtlsdr? ( >=net-wireless/rtl-sdr-0.5.4:= )
56 + sdrplay? ( net-wireless/sdrplay )
57 + soapy? ( net-wireless/soapysdr:= )
58 + uhd? ( net-wireless/uhd:=[${PYTHON_SINGLE_USEDEP}] )
59 + xtrx? ( net-wireless/libxtrx )
60 + "
61 +DEPEND="${RDEPEND}"
62 +
63 +BDEPEND="
64 + $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
65 + doc? ( app-doc/doxygen )
66 + "
67 +
68 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
69 +
70 +PATCHES=(
71 + "${FILESDIR}"/${P}-fix-enable-python.patch
72 +)
73 +
74 +src_configure() {
75 + local mycmakeargs=(
76 + -DENABLE_DEFAULT=OFF
77 + -DPYTHON_EXECUTABLE="${PYTHON}"
78 + -DENABLE_FILE=ON
79 + -DENABLE_AIRSPY="$(usex airspy ON OFF)"
80 + -DENABLE_BLADERF="$(usex bladerf ON OFF)"
81 + -DENABLE_HACKRF="$(usex hackrf ON OFF)"
82 + -DENABLE_IQBALANCE="$(usex iqbalance ON OFF)"
83 + -DENABLE_PYTHON="$(usex python ON OFF)"
84 + -DENABLE_RTL="$(usex rtlsdr ON OFF)"
85 + -DENABLE_RTL_TCP="$(usex rtlsdr ON OFF)"
86 + -DENABLE_SDRPLAY="$(usex sdrplay ON OFF)"
87 + -DENABLE_NONFREE="$(usex sdrplay ON OFF)"
88 + -DENABLE_SOAPY="$(usex soapy ON OFF)"
89 + -DENABLE_UHD="$(usex uhd ON OFF)"
90 + -DENABLE_XTRX="$(usex xtrx ON OFF)"
91 + -DENABLE_DOXYGEN="$(usex doc ON OFF)"
92 + )
93 +
94 + cmake_src_configure
95 +}
96 +
97 +src_install() {
98 + cmake_src_install
99 + if use python; then
100 + find "${ED}" -name '*.py[oc]' -delete || die
101 + python_fix_shebang "${ED}"/usr/bin
102 + python_optimize
103 + fi
104 + mv "${ED}/usr/share/doc/${PN}" "${ED}/usr/share/doc/${P}"
105 +}