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: Tue, 06 Sep 2022 16:59:07
Message-Id: 1662483504.3c7a601c248920ff87566ef3b614dd925a572a8f.tomjbe@gentoo
1 commit: 3c7a601c248920ff87566ef3b614dd925a572a8f
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 6 16:58:24 2022 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 6 16:58:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c7a601c
7
8 net-wireless/gnuradio: Move dev-libs/spdlog to RDEPEND
9
10 Closes: https://bugs.gentoo.org/868249
11 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
12
13 net-wireless/gnuradio/gnuradio-3.10.3.0-r2.ebuild | 246 ++++++++++++++++++++++
14 1 file changed, 246 insertions(+)
15
16 diff --git a/net-wireless/gnuradio/gnuradio-3.10.3.0-r2.ebuild b/net-wireless/gnuradio/gnuradio-3.10.3.0-r2.ebuild
17 new file mode 100644
18 index 000000000000..b3adb8203cfe
19 --- /dev/null
20 +++ b/net-wireless/gnuradio/gnuradio-3.10.3.0-r2.ebuild
21 @@ -0,0 +1,246 @@
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.10"
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 iio jack modtool network oss performance-counters portaudio +qt5 sdl soapy 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 + $(python_gen_cond_dep 'dev-python/jsonschema[${PYTHON_USEDEP}]')
74 + dev-libs/spdlog
75 + sci-libs/fftw:3.0=
76 + sci-libs/mpir:=
77 + sci-libs/volk:=
78 + media-libs/libsndfile
79 + sys-libs/libunwind
80 + alsa? ( media-libs/alsa-lib:= )
81 + ctrlport? (
82 + $(python_gen_cond_dep 'dev-python/thrift[${PYTHON_USEDEP}]')
83 + )
84 + fec? (
85 + sci-libs/gsl:=
86 + dev-python/scipy
87 + )
88 + filter? (
89 + dev-python/scipy
90 + $(python_gen_cond_dep 'dev-python/pyqtgraph[${PYTHON_USEDEP}]')
91 + )
92 + grc? (
93 + $(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]
94 + dev-python/numpy[${PYTHON_USEDEP}]
95 + dev-python/pygobject:3[${PYTHON_USEDEP}]
96 + dev-python/pyyaml[${PYTHON_USEDEP}]')
97 + x11-libs/gtk+:3[introspection]
98 + x11-libs/pango[introspection]
99 + )
100 + iio? (
101 + net-libs/libiio:=
102 + net-libs/libad9361-iio:=
103 + )
104 + jack? ( virtual/jack )
105 + portaudio? ( >=media-libs/portaudio-19_pre )
106 + qt5? (
107 + $(python_gen_cond_dep 'dev-python/PyQt5[opengl,${PYTHON_USEDEP}]')
108 + dev-qt/qtcore:5
109 + dev-qt/qtgui:5
110 + x11-libs/qwt:6[qt5(+)]
111 + dev-qt/qtwidgets:5
112 + )
113 + soapy? (
114 + $(python_gen_cond_dep 'net-wireless/soapysdr[${PYTHON_USEDEP}]')
115 + )
116 + sdl? ( >=media-libs/libsdl-1.2.0 )
117 + trellis? ( dev-python/scipy )
118 + uhd? (
119 + $(python_gen_cond_dep '>=net-wireless/uhd-3.9.6:=[${PYTHON_SINGLE_USEDEP}]')
120 + )
121 + utils? (
122 + $(python_gen_cond_dep 'dev-python/click[${PYTHON_USEDEP}]
123 + dev-python/click-plugins[${PYTHON_USEDEP}]
124 + dev-python/mako[${PYTHON_USEDEP}]
125 + dev-python/matplotlib[${PYTHON_USEDEP}]')
126 + )
127 + vocoder? (
128 + media-sound/gsm
129 + >=media-libs/codec2-0.8.1:=
130 + )
131 + wavelet? (
132 + sci-libs/gsl:=
133 + dev-libs/gmp:=
134 + sci-libs/lapack
135 + )
136 + zeromq? ( >=net-libs/zeromq-2.1.11:= )
137 +"
138 +
139 +DEPEND="${RDEPEND}
140 + app-text/docbook-xml-dtd:4.2
141 + $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
142 + $(python_gen_cond_dep 'dev-python/pygccxml[${PYTHON_USEDEP}]')
143 + virtual/pkgconfig
144 + doc? (
145 + >=app-doc/doxygen-1.5.7.1
146 + dev-libs/mathjax
147 + )
148 + grc? ( x11-misc/xdg-utils )
149 + oss? ( virtual/os-headers )
150 + test? ( >=dev-util/cppunit-1.9.14 )
151 + zeromq? ( net-libs/cppzmq )
152 +"
153 +
154 +PATCHES=(
155 + "${FILESDIR}/${PN}-3.10.3.0-fix-fmt-v9.patch" #858659
156 + "${FILESDIR}/${PN}-3.10.3.0-fix-gcc12.patch" #858665
157 +)
158 +
159 +src_prepare() {
160 + xdg_environment_reset #534582
161 +
162 + use !alsa && sed -i 's#version.h#version-nonexistent.h#' cmake/Modules/FindALSA.cmake
163 + use !jack && sed -i 's#jack.h#jack-nonexistent.h#' cmake/Modules/FindJACK.cmake
164 + use !oss && sed -i 's#soundcard.h#oss-nonexistent.h#g' cmake/Modules/FindOSS.cmake
165 + use !portaudio && sed -i 's#portaudio.h#portaudio-nonexistent.h#g' cmake/Modules/FindPORTAUDIO.cmake
166 +
167 + cmake_src_prepare
168 +}
169 +
170 +src_configure() {
171 + mycmakeargs=(
172 + -DENABLE_DEFAULT=OFF
173 + -DENABLE_GNURADIO_RUNTIME=ON
174 + -DENABLE_PYTHON=ON
175 + -DENABLE_GR_BLOCKS=ON
176 + -DENABLE_GR_ANALOG="$(usex analog)"
177 + -DENABLE_GR_AUDIO=ON
178 + -DENABLE_GR_CHANNELS="$(usex channels)"
179 + -DENABLE_GR_CTRLPORT="$(usex ctrlport)"
180 + -DENABLE_GR_DIGITAL="$(usex digital)"
181 + -DENABLE_DOXYGEN="$(usex doc)"
182 + -DENABLE_GR_DTV="$(usex dtv)"
183 + -DENABLE_GR_FEC="$(usex fec)"
184 + -DENABLE_GR_FFT=ON
185 + -DENABLE_GR_FILTER="$(usex filter)"
186 + -DENABLE_GRC="$(usex grc)"
187 + -DENABLE_GR_IIO="$(usex iio)"
188 + -DENABLE_GR_MODTOOL="$(usex modtool)"
189 + -DENABLE_GR_BLOCKTOOL="$(usex modtool)"
190 + -DENABLE_GR_NETWORK="$(usex network)"
191 + -DENABLE_GR_PDU=ON
192 + -DENABLE_PERFORMANCE_COUNTERS="$(usex performance-counters)"
193 + -DENABLE_TESTING="$(usex test)"
194 + -DENABLE_GR_QTGUI="$(usex qt5)"
195 + -DENABLE_GR_SOAPY="$(usex soapy)"
196 + -DENABLE_GR_TRELLIS="$(usex trellis)"
197 + -DENABLE_GR_UHD="$(usex uhd)"
198 + -DENABLE_GR_UTILS="$(usex utils)"
199 + -DENABLE_GR_VIDEO_SDL="$(usex sdl)"
200 + -DENABLE_GR_VOCODER="$(usex vocoder)"
201 + -DENABLE_GR_WAVELET="$(usex wavelet)"
202 + -DENABLE_GR_ZEROMQ="$(usex zeromq)"
203 + -DSYSCONFDIR="${EPREFIX}"/etc
204 + -DPYTHON_EXECUTABLE="${PYTHON}"
205 + -DGR_PYTHON_DIR="$(python_get_sitedir)"
206 + -DGR_PKG_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
207 + -DMATHJAX2_ROOT="${EPREFIX}/usr/share/mathjax"
208 + )
209 + cmake_src_configure
210 +}
211 +
212 +src_install() {
213 + cmake_src_install
214 +
215 + if use examples ; then
216 + dodir /usr/share/doc/${PF}/
217 + mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
218 + docompress -x /usr/share/doc/${PF}/examples
219 + else
220 + # It seems that the examples are always installed
221 + rm -rf "${ED}"/usr/share/${PN}/examples || die
222 + fi
223 +
224 + if use doc || use examples; then
225 + #this doesn't appear useful
226 + rm -rf "${ED}"/usr/share/doc/${PF}/xml || die
227 + fi
228 +
229 + # Remove duplicated icons, MIME and desktop files and installation script
230 + rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
231 + rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
232 +
233 + # Install icons, menu items and mime-types for GRC
234 + #if use grc ; then
235 + # local fd_path="${S}/grc/scripts/freedesktop"
236 + # insinto /usr/share/mime/packages
237 + # doins "${fd_path}/${PN}-grc.xml"
238 +
239 + # domenu "${fd_path}/"*.desktop
240 + # doicon "${fd_path}/"*.png
241 + #fi
242 +
243 + python_fix_shebang "${ED}"
244 + # Remove incorrectly byte-compiled Python files and replace
245 + find "${ED}"/usr/lib* -name "*.py[co]" -exec rm {} \; || die
246 + python_optimize
247 +}
248 +
249 +src_test() {
250 + virtx cmake_src_test
251 +}
252 +
253 +pkg_postinst() {
254 + if use grc ; then
255 + xdg_desktop_database_update
256 + xdg_icon_cache_update
257 + xdg_mimeinfo_database_update
258 + fi
259 +}
260 +
261 +pkg_postrm() {
262 + if use grc ; then
263 + xdg_desktop_database_update
264 + xdg_icon_cache_update
265 + xdg_mimeinfo_database_update
266 + fi
267 +}