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/gnuradio/
Date: Sat, 25 Jun 2022 09:29:01
Message-Id: 1656149318.e13b33ad95a6e3d613bd8d1b31046be4e4c58000.tomjbe@gentoo
1 commit: e13b33ad95a6e3d613bd8d1b31046be4e4c58000
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 25 09:24:22 2022 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 25 09:28:38 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e13b33ad
7
8 net-wireless/gnuradio: Add missing dep
9
10 Bug: https://bugs.gentoo.org/838364
11 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
12
13 net-wireless/gnuradio/gnuradio-3.8.5.0-r1.ebuild | 225 +++++++++++++++++++++++
14 1 file changed, 225 insertions(+)
15
16 diff --git a/net-wireless/gnuradio/gnuradio-3.8.5.0-r1.ebuild b/net-wireless/gnuradio/gnuradio-3.8.5.0-r1.ebuild
17 new file mode 100644
18 index 000000000000..a8da90f2bd12
19 --- /dev/null
20 +++ b/net-wireless/gnuradio/gnuradio-3.8.5.0-r1.ebuild
21 @@ -0,0 +1,225 @@
22 +# Copyright 1999-2022 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +PYTHON_COMPAT=( python3_{8..10} )
27 +
28 +CMAKE_BUILD_TYPE="None"
29 +inherit cmake python-single-r1 virtualx xdg-utils
30 +
31 +DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
32 +HOMEPAGE="https://www.gnuradio.org/"
33 +LICENSE="GPL-3"
34 +SLOT="0/${PV}"
35 +
36 +if [[ ${PV} =~ "9999" ]]; then
37 + EGIT_REPO_URI="https://github.com/gnuradio/gnuradio.git"
38 + EGIT_BRANCH="maint-3.8"
39 + inherit git-r3
40 +else
41 + SRC_URI="https://github.com/gnuradio/gnuradio/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
42 + KEYWORDS="~amd64 ~x86"
43 +fi
44 +
45 +IUSE="+audio +alsa +analog +digital channels ctrlport doc dtv examples fec +filter grc jack modtool oss performance-counters portaudio +qt5 sdl test trellis uhd vocoder +utils wavelet zeromq"
46 +
47 +#RESTRICT="!test? ( test )"
48 +#Tests are known broken right now
49 +RESTRICT="test"
50 +
51 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
52 + audio? ( || ( alsa oss jack portaudio ) )
53 + alsa? ( audio )
54 + jack? ( audio )
55 + oss? ( audio )
56 + portaudio? ( audio )
57 + analog? ( filter )
58 + channels? ( filter analog qt5 )
59 + digital? ( filter analog )
60 + dtv? ( filter analog fec )
61 + modtool? ( utils )
62 + qt5? ( filter )
63 + trellis? ( analog digital )
64 + uhd? ( filter analog )
65 + vocoder? ( filter analog )
66 + wavelet? ( analog )
67 +"
68 +
69 +RDEPEND="${PYTHON_DEPS}
70 + $(python_gen_cond_dep 'dev-libs/boost:0=[python,${PYTHON_USEDEP}]')
71 + dev-libs/log4cpp:=
72 + $(python_gen_cond_dep 'dev-python/six[${PYTHON_USEDEP}]')
73 + sci-libs/fftw:3.0=
74 + sci-libs/mpir:=
75 + sci-libs/volk:=
76 + alsa? ( media-libs/alsa-lib:= )
77 + ctrlport? ( $(python_gen_cond_dep 'dev-python/thrift[${PYTHON_USEDEP}]') )
78 + fec? (
79 + sci-libs/gsl:=
80 + dev-python/scipy
81 + )
82 + filter? (
83 + dev-python/scipy
84 + $(python_gen_cond_dep 'dev-python/pyqtgraph[${PYTHON_USEDEP}]')
85 + )
86 + grc? (
87 + $(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]
88 + dev-python/numpy[${PYTHON_USEDEP}]
89 + dev-python/pygobject:3[${PYTHON_USEDEP}]
90 + dev-python/pyyaml[${PYTHON_USEDEP}]')
91 + x11-libs/gtk+:3[introspection]
92 + x11-libs/pango[introspection]
93 + )
94 + jack? ( virtual/jack )
95 + portaudio? ( >=media-libs/portaudio-19_pre )
96 + qt5? (
97 + $(python_gen_cond_dep 'dev-python/PyQt5[opengl,${PYTHON_USEDEP}]')
98 + dev-qt/qtcore:5
99 + dev-qt/qtgui:5
100 + x11-libs/qwt:6[qt5(+)]
101 + dev-qt/qtwidgets:5
102 + )
103 + sdl? ( >=media-libs/libsdl-1.2.0 )
104 + trellis? ( dev-python/scipy )
105 + uhd? (
106 + $(python_gen_cond_dep '>=net-wireless/uhd-3.9.6:=[${PYTHON_SINGLE_USEDEP}]')
107 + )
108 + utils? (
109 + $(python_gen_cond_dep 'dev-python/click[${PYTHON_USEDEP}]
110 + dev-python/click-plugins[${PYTHON_USEDEP}]
111 + dev-python/mako[${PYTHON_USEDEP}]
112 + dev-python/matplotlib[${PYTHON_USEDEP}]')
113 + )
114 + vocoder? (
115 + media-sound/gsm
116 + >=media-libs/codec2-0.8.1:=
117 + )
118 + wavelet? (
119 + sci-libs/gsl:=
120 + dev-libs/gmp:=
121 + sci-libs/lapack
122 + )
123 + zeromq? ( >=net-libs/zeromq-2.1.11:= )
124 +"
125 +
126 +#That's right, it can't build if gnuradio 3.7 is installed
127 +#Both due to build failure, and then file collision due to bundled volk
128 +DEPEND="${RDEPEND}
129 + !!<net-wireless/gnuradio-3.8
130 + app-text/docbook-xml-dtd:4.2
131 + >=dev-lang/swig-3.0.5
132 + virtual/pkgconfig
133 + doc? (
134 + >=app-doc/doxygen-1.5.7.1
135 + )
136 + grc? ( x11-misc/xdg-utils )
137 + oss? ( virtual/os-headers )
138 + test? ( >=dev-util/cppunit-1.9.14 )
139 + zeromq? ( net-libs/cppzmq )
140 +"
141 +
142 +src_prepare() {
143 + xdg_environment_reset #534582
144 +
145 + use !alsa && sed -i 's#version.h#version-nonexistent.h#' cmake/Modules/FindALSA.cmake
146 + use !jack && sed -i 's#jack.h#jack-nonexistent.h#' cmake/Modules/FindJACK.cmake
147 + use !oss && sed -i 's#soundcard.h#oss-nonexistent.h#g' cmake/Modules/FindOSS.cmake
148 + use !portaudio && sed -i 's#portaudio.h#portaudio-nonexistent.h#g' cmake/Modules/FindPORTAUDIO.cmake
149 +
150 + cmake_src_prepare
151 +}
152 +
153 +src_configure() {
154 + mycmakeargs=(
155 + -DENABLE_DEFAULT=OFF
156 + -DENABLE_VOLK=OFF
157 + -DENABLE_INTERNAL_VOLK=OFF
158 + -DENABLE_GNURADIO_RUNTIME=ON
159 + -DENABLE_PYTHON=ON
160 + -DENABLE_GR_BLOCKS=ON
161 + -DENABLE_GR_FFT=ON
162 + -DENABLE_GR_AUDIO=ON
163 + -DENABLE_GR_ANALOG="$(usex analog)"
164 + -DENABLE_GR_CHANNELS="$(usex channels)"
165 + -DENABLE_GR_CTRLPORT="$(usex ctrlport)"
166 + -DENABLE_GR_DIGITAL="$(usex digital)"
167 + -DENABLE_DOXYGEN="$(usex doc)"
168 + -DENABLE_GR_DTV="$(usex dtv)"
169 + -DENABLE_GR_FEC="$(usex fec)"
170 + -DENABLE_GR_FILTER="$(usex filter)"
171 + -DENABLE_GRC="$(usex grc)"
172 + -DENABLE_GR_MODTOOL="$(usex modtool)"
173 + -DENABLE_PERFORMANCE_COUNTERS="$(usex performance-counters)"
174 + -DENABLE_TESTING="$(usex test)"
175 + -DENABLE_GR_TRELLIS="$(usex trellis)"
176 + -DENABLE_GR_UHD="$(usex uhd)"
177 + -DENABLE_GR_UTILS="$(usex utils)"
178 + -DENABLE_GR_VOCODER="$(usex vocoder)"
179 + -DENABLE_GR_WAVELET="$(usex wavelet)"
180 + -DENABLE_GR_QTGUI="$(usex qt5)"
181 + -DENABLE_GR_VIDEO_SDL="$(usex sdl)"
182 + -DENABLE_GR_ZEROMQ="$(usex zeromq)"
183 + -DSYSCONFDIR="${EPREFIX}"/etc
184 + -DPYTHON_EXECUTABLE="${PYTHON}"
185 + -DGR_PYTHON_DIR="$(python_get_sitedir)"
186 + -DGR_PKG_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
187 + )
188 + cmake_src_configure
189 +}
190 +
191 +src_install() {
192 + cmake_src_install
193 +
194 + if use examples ; then
195 + dodir /usr/share/doc/${PF}/
196 + mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
197 + docompress -x /usr/share/doc/${PF}/examples
198 + else
199 + # It seems that the examples are always installed
200 + rm -rf "${ED}"/usr/share/${PN}/examples || die
201 + fi
202 +
203 + if use doc || use examples; then
204 + #this doesn't appear useful
205 + rm -rf "${ED}"/usr/share/doc/${PF}/xml || die
206 + fi
207 +
208 + # Remove duplicated icons, MIME and desktop files and installation script
209 + rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
210 + rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
211 +
212 + # Install icons, menu items and mime-types for GRC
213 + #if use grc ; then
214 + # local fd_path="${S}/grc/scripts/freedesktop"
215 + # insinto /usr/share/mime/packages
216 + # doins "${fd_path}/${PN}-grc.xml"
217 +
218 + # domenu "${fd_path}/"*.desktop
219 + # doicon "${fd_path}/"*.png
220 + #fi
221 +
222 + python_fix_shebang "${ED}"
223 + # Remove incorrectly byte-compiled Python files and replace
224 + find "${ED}"/usr/lib* -name "*.py[co]" -exec rm {} \; || die
225 + python_optimize
226 +}
227 +
228 +src_test() {
229 + virtx cmake_src_test
230 +}
231 +
232 +pkg_postinst() {
233 + if use grc ; then
234 + xdg_desktop_database_update
235 + xdg_icon_cache_update
236 + xdg_mimeinfo_database_update
237 + fi
238 +}
239 +
240 +pkg_postrm() {
241 + if use grc ; then
242 + xdg_desktop_database_update
243 + xdg_icon_cache_update
244 + xdg_mimeinfo_database_update
245 + fi
246 +}