Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/gnuradio/
Date: Sat, 01 Aug 2020 17:53:27
Message-Id: 1596304391.8f794520eea47dcfc145bc24c524f0295bda9ddc.fordfrog@gentoo
1 commit: 8f794520eea47dcfc145bc24c524f0295bda9ddc
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 1 17:52:50 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 1 17:53:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f794520
7
8 net-wireless/gnuradio: fixed compilation and switched to virtual/jack
9
10 Closes: https://bugs.gentoo.org/722100
11 Closes: https://bugs.gentoo.org/684178
12 Package-Manager: Portage-3.0.1, Repoman-2.3.23
13 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
14
15 net-wireless/gnuradio/Manifest | 1 +
16 net-wireless/gnuradio/gnuradio-3.7.13.5-r4.ebuild | 281 ++++++++++++++++++++++
17 net-wireless/gnuradio/gnuradio-3.8.1.0-r2.ebuild | 228 ++++++++++++++++++
18 3 files changed, 510 insertions(+)
19
20 diff --git a/net-wireless/gnuradio/Manifest b/net-wireless/gnuradio/Manifest
21 index 0c14569032c..ec386c36bee 100644
22 --- a/net-wireless/gnuradio/Manifest
23 +++ b/net-wireless/gnuradio/Manifest
24 @@ -1,3 +1,4 @@
25 +DIST 0002-boost_qualify_placeholders_with_their_full_namespace.patch.bz2 6933 BLAKE2B 021574de46f582f668788d35bb0f2fb7a47a03ae9d8009adaf3d53946bdf7fc61301a985a7eb0c6cde37fef36dceae86d71d287a8beb61d793b6309064e4e09d SHA512 f42f997a92592d3caf7e29e50bfb5733ab94988743eb3231c78b31272c5cde840f5abd984e1c6b1f928828a6be84eb5d17c3455207509f48652ed160a4f6c7ae
26 DIST gnuradio-3.7.13-1-qt5.tar.xz 31412 BLAKE2B 56aebd5ea61abd48723ed0c16050a05c3c8e328ac2a91307b00d8705ddcac0c713d74b946491bdd763abd5d2432d07cd51a85a4d365ef3c8d51eb255e682e326 SHA512 952c5bbf3ae38e2a935cd8dbd20f2f7aed4ab8c0492e3bc10ebed2b9eb1f11bb2caf84c035cd3d88f7703e84f1e58d8aa0a66290623c7b75e59b43a85de44549
27 DIST gnuradio-3.7.13-codec2.tar.xz 13148 BLAKE2B 84f732dc562dbbd076e1656fad37c818fd9fa869b81f343d45b086659a6df1dc4e26afdb8f283b83c758f76e9d3b90e51ce32e396fbb03d1c0348d27ba9e2c1c SHA512 f9e034ff240b836e336b48900a3b6a86a656ec4f35a9df639503ab99cf8da6acfc6e8d45f11c81994766d9d5bb381671fc678abd0280ebc0e218bcd8523a3f1b
28 DIST gnuradio-3.7.13.5.tar.xz 2976120 BLAKE2B 67aea67b0bd87994f8b4bf89405f410dc08c9fc603a0a59579036b28e575c864df28a0b43e2163fc6ec834fdeb015f110295cdca3aa4256d15e1d223d31579d3 SHA512 cf25491b81d317cd0cdfc70203695c4e819676bc6771c25e85fc62873e6e28d6ea3b9f0387e693976fa072fa1cfe9c9a503e4958ec658e2e0a6768752c61fb15
29
30 diff --git a/net-wireless/gnuradio/gnuradio-3.7.13.5-r4.ebuild b/net-wireless/gnuradio/gnuradio-3.7.13.5-r4.ebuild
31 new file mode 100644
32 index 00000000000..b85c4e57872
33 --- /dev/null
34 +++ b/net-wireless/gnuradio/gnuradio-3.7.13.5-r4.ebuild
35 @@ -0,0 +1,281 @@
36 +# Copyright 1999-2020 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +PYTHON_COMPAT=( python2_7 )
41 +
42 +CMAKE_BUILD_TYPE="None"
43 +inherit cmake-utils eutils gnome2-utils python-single-r1 xdg-utils
44 +
45 +DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
46 +HOMEPAGE="https://www.gnuradio.org/"
47 +LICENSE="GPL-3"
48 +SLOT="0/${PV}"
49 +
50 +if [[ ${PV} =~ "9999" ]]; then
51 + EGIT_REPO_URI="https://www.gnuradio.org/cgit/gnuradio.git"
52 + inherit git-r3
53 + KEYWORDS=""
54 +else
55 + SRC_URI="https://github.com/gnuradio/gnuradio/releases/download/v${PV}/${P}.tar.xz
56 + https://dev.gentoo.org/~zerochaos/patches/${PN}-3.7.13-1-qt5.tar.xz
57 + https://dev.gentoo.org/~zerochaos/patches/${PN}-3.7.13-codec2.tar.xz
58 + https://dev.gentoo.org/~fordfrog/distfiles/0002-boost_qualify_placeholders_with_their_full_namespace.patch.bz2"
59 + KEYWORDS="~amd64 ~arm ~x86"
60 +fi
61 +if [[ ${PV} == "3.7.9999" ]]; then
62 + EGIT_BRANCH="maint-3.7"
63 +fi
64 +
65 +IUSE="+audio +alsa atsc +analog +digital channels doc dtv examples fcd fec +filter grc jack log noaa oss pager performance-counters portaudio +qt5 sdl test trellis uhd vocoder +utils wavelet wxwidgets zeromq"
66 +RESTRICT="!test? ( test )"
67 +
68 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
69 + audio? ( || ( alsa oss jack portaudio ) )
70 + alsa? ( audio )
71 + oss? ( audio )
72 + jack? ( audio )
73 + portaudio? ( audio )
74 + analog? ( filter )
75 + digital? ( filter analog )
76 + dtv? ( fec )
77 + pager? ( filter analog )
78 + qt5? ( filter )
79 + uhd? ( filter analog )
80 + fcd? ( || ( alsa oss ) )
81 + wavelet? ( analog )
82 + wxwidgets? ( filter analog )"
83 +
84 +# bug #348206
85 +# comedi? ( >=sci-electronics/comedilib-0.8 )
86 +# boost-1.52.0 is blacklisted, bug #461578, upstream #513, boost #7669
87 +RDEPEND="${PYTHON_DEPS}
88 + >=dev-lang/orc-0.4.12
89 + !<=dev-libs/boost-1.52.0-r6:0/1.52
90 + sci-libs/fftw:3.0=
91 + alsa? (
92 + media-libs/alsa-lib:=
93 + )
94 + fcd? ( virtual/libusb:1 )
95 + jack? (
96 + virtual/jack
97 + )
98 + log? ( dev-libs/log4cpp )
99 + portaudio? (
100 + >=media-libs/portaudio-19_pre
101 + )
102 + sdl? ( >=media-libs/libsdl-1.2.0 )
103 + uhd? ( >=net-wireless/uhd-3.9.6:=[${PYTHON_SINGLE_USEDEP}] )
104 + vocoder? ( media-sound/gsm
105 + >=media-libs/codec2-0.8.1 )
106 + wavelet? (
107 + >=sci-libs/gsl-1.10
108 + )
109 + zeromq? ( >=net-libs/zeromq-2.1.11 )
110 + $(python_gen_cond_dep '
111 + dev-libs/boost:0=[python,${PYTHON_MULTI_USEDEP}]
112 + dev-python/mako[${PYTHON_MULTI_USEDEP}]
113 + dev-python/six[${PYTHON_MULTI_USEDEP}]
114 + filter? (
115 + || (
116 + sci-libs/scipy-python2[${PYTHON_MULTI_USEDEP}]
117 + sci-libs/scipy[${PYTHON_MULTI_USEDEP}]
118 + )
119 + )
120 + grc? (
121 + dev-python/cheetah[${PYTHON_MULTI_USEDEP}]
122 + dev-python/lxml[${PYTHON_MULTI_USEDEP}]
123 + >=dev-python/pygtk-2.10:2[${PYTHON_MULTI_USEDEP}]
124 + || (
125 + dev-python/numpy-python2[${PYTHON_MULTI_USEDEP}]
126 + dev-python/numpy[${PYTHON_MULTI_USEDEP}]
127 + )
128 + )
129 + qt5? (
130 + dev-python/PyQt5[opengl,${PYTHON_MULTI_USEDEP}]
131 + dev-qt/qtcore:5
132 + dev-qt/qtgui:5
133 + x11-libs/qwt:6[qt5(+)]
134 + dev-qt/qtwidgets:5
135 + )
136 + utils? (
137 + || (
138 + dev-python/matplotlib-python2[${PYTHON_MULTI_USEDEP}]
139 + dev-python/matplotlib[${PYTHON_MULTI_USEDEP}]
140 + )
141 + )
142 + wxwidgets? (
143 + dev-python/wxpython:3.0[${PYTHON_MULTI_USEDEP}]
144 + || (
145 + dev-python/numpy-python2[${PYTHON_MULTI_USEDEP}]
146 + dev-python/numpy[${PYTHON_MULTI_USEDEP}]
147 + )
148 + )
149 + ')
150 + "
151 +
152 +DEPEND="${RDEPEND}
153 + app-text/docbook-xml-dtd:4.2
154 + >=dev-lang/swig-3.0.5
155 + virtual/pkgconfig
156 + $(python_gen_cond_dep '
157 + dev-python/cheetah[${PYTHON_MULTI_USEDEP}]
158 + doc? (
159 + >=app-doc/doxygen-1.5.7.1
160 + dev-python/sphinx[${PYTHON_MULTI_USEDEP}]
161 + )
162 + ')
163 + grc? ( x11-misc/xdg-utils )
164 + oss? ( virtual/os-headers )
165 + test? ( >=dev-util/cppunit-1.9.14 )
166 + zeromq? ( net-libs/cppzmq )
167 +"
168 +
169 +src_prepare() {
170 + gnome2_environment_reset #534582
171 +
172 + if [[ ${PV} == "9999" ]]; then
173 + true
174 + else
175 + epatch "${FILESDIR}"/gnuradio-wxpy3.0-compat.patch
176 + fi
177 + # Useless UI element would require qt3support, bug #365019
178 + sed -i '/qPixmapFromMimeSource/d' "${S}"/gr-qtgui/lib/spectrumdisplayform.ui || die
179 + epatch "${WORKDIR}"/qt5-maint-00*.patch
180 + epatch "${WORKDIR}"/codec2-next-00*.patch
181 + epatch "${FILESDIR}"/${PN}-3.7.13.5-boost-1.70-asio.patch
182 + epatch "${WORKDIR}/0002-boost_qualify_placeholders_with_their_full_namespace.patch"
183 +
184 + use !alsa && sed -i 's#version.h#version-nonexistant.h#' cmake/Modules/FindALSA.cmake
185 + use !jack && sed -i 's#jack.h#jack-nonexistant.h#' cmake/Modules/FindJack.cmake
186 + use !portaudio && sed -i 's#portaudio.h#portaudio-nonexistant.h#' cmake/Modules/FindPortaudio.cmake
187 +
188 + cmake-utils_src_prepare
189 +}
190 +
191 +src_configure() {
192 + #zeromq missing deps isn't fatal
193 + python_export PYTHON_SITEDIR
194 + mycmakeargs=(
195 + -DENABLE_DEFAULT=OFF
196 + -DENABLE_GNURADIO_RUNTIME=ON
197 + -DENABLE_VOLK=ON
198 + -DENABLE_PYTHON=ON
199 + -DENABLE_GR_BLOCKS=ON
200 + -DENABLE_GR_FFT=ON
201 + -DENABLE_GR_AUDIO=ON
202 + -DENABLE_GR_AUDIO_ALSA="$(usex alsa)"
203 + -DENABLE_GR_ANALOG="$(usex analog)"
204 + -DENABLE_GR_ATSC="$(usex atsc)"
205 + -DENABLE_GR_CHANNELS="$(usex channels)"
206 + -DENABLE_GR_DIGITAL="$(usex digital)"
207 + -DENABLE_DOXYGEN="$(usex doc)"
208 + -DENABLE_SPHINX="$(usex doc)"
209 + -DENABLE_GR_DTV="$(usex dtv)"
210 + -DENABLE_GR_FCD="$(usex fcd)"
211 + -DENABLE_GR_FEC="$(usex fec)"
212 + -DENABLE_GR_FILTER="$(usex filter)"
213 + -DENABLE_GRC="$(usex grc)"
214 + -DENABLE_GR_AUDIO_JACK="$(usex jack)"
215 + -DENABLE_GR_LOG="$(usex log)"
216 + -DENABLE_GR_NOAA="$(usex noaa)"
217 + -DENABLE_GR_AUDIO_OSS="$(usex oss)"
218 + -DENABLE_GR_PAGER="$(usex pager)"
219 + -DENABLE_ENABLE_PERFORMANCE_COUNTERS="$(usex performance-counters)"
220 + -DENABLE_GR_AUDIO_PORTAUDIO="$(usex portaudio)"
221 + -DENABLE_TESTING="$(usex test)"
222 + -DENABLE_GR_TRELLIS="$(usex trellis)"
223 + -DENABLE_GR_UHD="$(usex uhd)"
224 + -DENABLE_GR_UTILS="$(usex utils)"
225 + -DENABLE_GR_VOCODER="$(usex vocoder)"
226 + -DENABLE_GR_WAVELET="$(usex wavelet)"
227 + -DENABLE_GR_WXGUI="$(usex wxwidgets)"
228 + -DENABLE_GR_QTGUI="$(usex qt5)"
229 + -DDESIRED_QT_VERSION="$(usex qt5 5)"
230 + -DENABLE_GR_VIDEO_SDL="$(usex sdl)"
231 + -DENABLE_GR_ZEROMQ="$(usex zeromq)"
232 + -DENABLE_GR_CORE=ON
233 + -DSYSCONFDIR="${EPREFIX}"/etc
234 + -DPYTHON_EXECUTABLE="${PYTHON}"
235 + -DGR_PYTHON_DIR="${PYTHON_SITEDIR}"
236 + -DGR_PKG_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
237 + )
238 + use vocoder && mycmakeargs+=( -DGR_USE_SYSTEM_LIBGSM=TRUE )
239 + cmake-utils_src_configure
240 +}
241 +
242 +src_install() {
243 + cmake-utils_src_install
244 +
245 + if use examples ; then
246 + dodir /usr/share/doc/${PF}/
247 + mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
248 + docompress -x /usr/share/doc/${PF}/examples
249 + else
250 + # It seems that the examples are always installed
251 + rm -rf "${ED}"/usr/share/${PN}/examples || die
252 + fi
253 +
254 + if use doc || use examples; then
255 + #this doesn't appear useful
256 + rm -rf "${ED}"/usr/share/doc/${PF}/xml || die
257 + fi
258 +
259 + # We install the mimetypes to the correct locations from the ebuild
260 + rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
261 + rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
262 +
263 + # Install icons, menu items and mime-types for GRC
264 + if use grc ; then
265 + local fd_path="${S}/grc/scripts/freedesktop"
266 + insinto /usr/share/mime/packages
267 + doins "${fd_path}/${PN}-grc.xml"
268 +
269 + domenu "${fd_path}/"*.desktop
270 + doicon "${fd_path}/"*.png
271 + fi
272 +
273 + python_fix_shebang "${ED}"
274 +}
275 +
276 +src_test()
277 +{
278 + ctest -E qtgui
279 +}
280 +
281 +pkg_postinst()
282 +{
283 + local GRC_ICON_SIZES="32 48 64 128 256"
284 +
285 + if use grc ; then
286 + xdg_desktop_database_update
287 + xdg_mimeinfo_database_update
288 + for size in ${GRC_ICON_SIZES} ; do
289 + xdg-icon-resource install --noupdate --context mimetypes --size ${size} \
290 + "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" application-gnuradio-grc \
291 + || die "icon resource installation failed"
292 + xdg-icon-resource install --noupdate --context apps --size ${size} \
293 + "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" gnuradio-grc \
294 + || die "icon resource installation failed"
295 + done
296 + xdg-icon-resource forceupdate
297 + fi
298 +}
299 +
300 +pkg_postrm()
301 +{
302 + local GRC_ICON_SIZES="32 48 64 128 256"
303 +
304 + if use grc ; then
305 + xdg_desktop_database_update
306 + xdg_mimeinfo_database_update
307 + for size in ${GRC_ICON_SIZES} ; do
308 + xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} \
309 + application-gnuradio-grc || ewarn "icon uninstall failed"
310 + xdg-icon-resource uninstall --noupdate --context apps --size ${size} \
311 + gnuradio-grc || ewarn "icon uninstall failed"
312 +
313 + done
314 + xdg-icon-resource forceupdate
315 + fi
316 +}
317
318 diff --git a/net-wireless/gnuradio/gnuradio-3.8.1.0-r2.ebuild b/net-wireless/gnuradio/gnuradio-3.8.1.0-r2.ebuild
319 new file mode 100644
320 index 00000000000..ed6d89a7a8f
321 --- /dev/null
322 +++ b/net-wireless/gnuradio/gnuradio-3.8.1.0-r2.ebuild
323 @@ -0,0 +1,228 @@
324 +# Copyright 1999-2020 Gentoo Authors
325 +# Distributed under the terms of the GNU General Public License v2
326 +
327 +EAPI=7
328 +PYTHON_COMPAT=( python3_{6,7,8} )
329 +
330 +CMAKE_BUILD_TYPE="None"
331 +inherit cmake python-single-r1 virtualx xdg-utils desktop
332 +
333 +DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
334 +HOMEPAGE="https://www.gnuradio.org/"
335 +LICENSE="GPL-3"
336 +SLOT="0/${PV}"
337 +
338 +if [[ ${PV} =~ "9999" ]]; then
339 + EGIT_REPO_URI="https://github.com/gnuradio/gnuradio.git"
340 + EGIT_BRANCH="maint-3.8"
341 + inherit git-r3
342 + KEYWORDS=""
343 +else
344 + SRC_URI="https://github.com/gnuradio/gnuradio/releases/download/v${PV}/${P}.tar.xz
345 + https://dev.gentoo.org/~fordfrog/distfiles/0002-boost_qualify_placeholders_with_their_full_namespace.patch.bz2"
346 + KEYWORDS="~amd64 ~arm ~x86"
347 +fi
348 +
349 +IUSE="+audio +alsa +analog +digital channels doc dtv examples fec +filter grc jack modtool oss performance-counters portaudio +qt5 sdl test trellis uhd vocoder +utils wavelet zeromq"
350 +
351 +#RESTRICT="!test? ( test )"
352 +#Tests are known broken right now
353 +RESTRICT="test"
354 +
355 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
356 + audio? ( || ( alsa oss jack portaudio ) )
357 + alsa? ( audio )
358 + jack? ( audio )
359 + oss? ( audio )
360 + portaudio? ( audio )
361 + analog? ( filter )
362 + channels? ( filter analog qt5 )
363 + digital? ( filter analog )
364 + dtv? ( filter analog fec )
365 + modtool? ( utils )
366 + qt5? ( filter )
367 + trellis? ( analog digital )
368 + uhd? ( filter analog )
369 + vocoder? ( filter analog )
370 + wavelet? ( analog )
371 +"
372 +
373 +RDEPEND="${PYTHON_DEPS}
374 + $(python_gen_cond_dep 'dev-libs/boost:0=[python,${PYTHON_USEDEP}]')
375 + dev-libs/log4cpp
376 + $(python_gen_cond_dep 'dev-python/six[${PYTHON_USEDEP}]')
377 + sci-libs/fftw:3.0=
378 + sci-libs/mpir
379 + sci-libs/volk
380 + alsa? ( media-libs/alsa-lib:= )
381 + fec? (
382 + sci-libs/gsl
383 + sci-libs/scipy
384 + )
385 + filter? ( sci-libs/scipy )
386 + grc? (
387 + $(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]
388 + dev-python/numpy[${PYTHON_USEDEP}]
389 + dev-python/pygobject:3[${PYTHON_USEDEP}]
390 + dev-python/pyyaml[${PYTHON_USEDEP}]')
391 + x11-libs/gtk+:3[introspection]
392 + x11-libs/pango[introspection]
393 + )
394 + jack? ( virtual/jack )
395 + portaudio? ( >=media-libs/portaudio-19_pre )
396 + qt5? (
397 + $(python_gen_cond_dep 'dev-python/PyQt5[opengl,${PYTHON_USEDEP}]')
398 + dev-qt/qtcore:5
399 + dev-qt/qtgui:5
400 + x11-libs/qwt:6[qt5(+)]
401 + dev-qt/qtwidgets:5
402 + )
403 + sdl? ( >=media-libs/libsdl-1.2.0 )
404 + trellis? ( sci-libs/scipy )
405 + uhd? (
406 + $(python_gen_cond_dep '>=net-wireless/uhd-3.9.6:=[${PYTHON_SINGLE_USEDEP}]')
407 + )
408 + utils? (
409 + $(python_gen_cond_dep 'dev-python/click[${PYTHON_USEDEP}]
410 + dev-python/click-plugins[${PYTHON_USEDEP}]
411 + dev-python/mako[${PYTHON_USEDEP}]
412 + dev-python/matplotlib[${PYTHON_USEDEP}]')
413 + )
414 + vocoder? (
415 + media-sound/gsm
416 + >=media-libs/codec2-0.8.1
417 + )
418 + wavelet? ( sci-libs/gsl
419 + dev-libs/gmp
420 + sci-libs/lapack
421 + )
422 + zeromq? ( >=net-libs/zeromq-2.1.11 )
423 +"
424 +
425 +#That's right, it can't build if gnuradio 3.7 is installed
426 +#Both due to build failure, and then file collision due to bundled volk
427 +DEPEND="${RDEPEND}
428 + !<net-wireless/gnuradio-3.8
429 + app-text/docbook-xml-dtd:4.2
430 + >=dev-lang/swig-3.0.5
431 + virtual/pkgconfig
432 + doc? (
433 + >=app-doc/doxygen-1.5.7.1
434 + )
435 + grc? ( x11-misc/xdg-utils )
436 + oss? ( virtual/os-headers )
437 + test? ( >=dev-util/cppunit-1.9.14 )
438 + zeromq? ( net-libs/cppzmq )
439 +"
440 +
441 +PATCHES=(
442 + "${WORKDIR}/0002-boost_qualify_placeholders_with_their_full_namespace.patch"
443 +)
444 +
445 +src_prepare() {
446 + xdg_environment_reset #534582
447 +
448 + use !alsa && sed -i 's#version.h#version-nonexistent.h#' cmake/Modules/FindALSA.cmake
449 + use !jack && sed -i 's#jack.h#jack-nonexistent.h#' cmake/Modules/FindJACK.cmake
450 + use !oss && sed -i 's#soundcard.h#oss-nonexistent.h#g' cmake/Modules/FindOSS.cmake
451 + use !portaudio && sed -i 's#portaudio.h#portaudio-nonexistent.h#g' cmake/Modules/FindPORTAUDIO.cmake
452 +
453 + cmake_src_prepare
454 +}
455 +
456 +src_configure() {
457 + mycmakeargs=(
458 + -DENABLE_DEFAULT=OFF
459 + -DENABLE_VOLK=OFF
460 + -DENABLE_INTERNAL_VOLK=OFF
461 + -DENABLE_GNURADIO_RUNTIME=ON
462 + -DENABLE_PYTHON=ON
463 + -DENABLE_GR_BLOCKS=ON
464 + -DENABLE_GR_FFT=ON
465 + -DENABLE_GR_AUDIO=ON
466 + -DENABLE_GR_ANALOG="$(usex analog)"
467 + -DENABLE_GR_CHANNELS="$(usex channels)"
468 + -DENABLE_GR_DIGITAL="$(usex digital)"
469 + -DENABLE_DOXYGEN="$(usex doc)"
470 + -DENABLE_GR_DTV="$(usex dtv)"
471 + -DENABLE_GR_FEC="$(usex fec)"
472 + -DENABLE_GR_FILTER="$(usex filter)"
473 + -DENABLE_GRC="$(usex grc)"
474 + -DENABLE_GR_MODTOOL="$(usex modtool)"
475 + -DENABLE_PERFORMANCE_COUNTERS="$(usex performance-counters)"
476 + -DENABLE_TESTING="$(usex test)"
477 + -DENABLE_GR_TRELLIS="$(usex trellis)"
478 + -DENABLE_GR_UHD="$(usex uhd)"
479 + -DENABLE_GR_UTILS="$(usex utils)"
480 + -DENABLE_GR_VOCODER="$(usex vocoder)"
481 + -DENABLE_GR_WAVELET="$(usex wavelet)"
482 + -DENABLE_GR_QTGUI="$(usex qt5)"
483 + -DENABLE_GR_VIDEO_SDL="$(usex sdl)"
484 + -DENABLE_GR_ZEROMQ="$(usex zeromq)"
485 + -DSYSCONFDIR="${EPREFIX}"/etc
486 + -DPYTHON_EXECUTABLE="${PYTHON}"
487 + -DGR_PYTHON_DIR="$(python_get_sitedir)"
488 + -DGR_PKG_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
489 + )
490 + cmake_src_configure
491 +}
492 +
493 +src_install() {
494 + cmake_src_install
495 +
496 + if use examples ; then
497 + dodir /usr/share/doc/${PF}/
498 + mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
499 + docompress -x /usr/share/doc/${PF}/examples
500 + else
501 + # It seems that the examples are always installed
502 + rm -rf "${ED}"/usr/share/${PN}/examples || die
503 + fi
504 +
505 + if use doc || use examples; then
506 + #this doesn't appear useful
507 + rm -rf "${ED}"/usr/share/doc/${PF}/xml || die
508 + fi
509 +
510 + # Remove duplicated icons, MIME and desktop files and installation script
511 + rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
512 + rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
513 +
514 + # Install icons, menu items and mime-types for GRC
515 + if use grc ; then
516 + local fd_path="${S}/grc/scripts/freedesktop"
517 + insinto /usr/share/mime/packages
518 + doins "${fd_path}/${PN}-grc.xml"
519 +
520 + domenu "${fd_path}/"*.desktop
521 + doicon "${fd_path}/"*.png
522 + fi
523 +
524 + python_fix_shebang "${ED}"
525 + # Remove incorrectly byte-compiled Python files and replace
526 + find "${ED}"/usr/lib -name "*.py[co]" -exec rm {} \; || die
527 + python_optimize
528 +}
529 +
530 +src_test()
531 +{
532 + virtx cmake_src_test
533 +}
534 +
535 +pkg_postinst()
536 +{
537 + if use grc ; then
538 + xdg_desktop_database_update
539 + xdg_icon_cache_update
540 + xdg_mimeinfo_database_update
541 + fi
542 +}
543 +
544 +pkg_postrm()
545 +{
546 + if use grc ; then
547 + xdg_desktop_database_update
548 + xdg_icon_cache_update
549 + xdg_mimeinfo_database_update
550 + fi
551 +}