From 57b62fc07622759a8c27b255c8f1740b4b7f237e Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Mon, 29 Nov 2021 00:53:30 +1100 Subject: [PATCH] gnuradio: update to 3.10.3.0. Also add makedepends to devel package. --- common/shlibs | 38 ++++++++------ ...6495f3bdf579dae0c26531a16f6adcc7fb2f.patch | 46 ----------------- ...15d0b26b3c72fab736bcd28a67ab9d1404b7.patch | 28 ----------- ...befbbe54e55fc4994899e92bcf5bf462fa2f.patch | 31 ------------ .../patches/fix-x11-library-call.patch | 39 +++++++++++++++ srcpkgs/gnuradio/template | 49 ++++++++++++++----- 6 files changed, 97 insertions(+), 134 deletions(-) delete mode 100644 srcpkgs/gnuradio/patches/596c6495f3bdf579dae0c26531a16f6adcc7fb2f.patch delete mode 100644 srcpkgs/gnuradio/patches/aa4b15d0b26b3c72fab736bcd28a67ab9d1404b7.patch delete mode 100644 srcpkgs/gnuradio/patches/f259befbbe54e55fc4994899e92bcf5bf462fa2f.patch create mode 100644 srcpkgs/gnuradio/patches/fix-x11-library-call.patch diff --git a/common/shlibs b/common/shlibs index 6e57e5eb769..58553f0dfdd 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3251,22 +3251,28 @@ liblwipv6.so.2 lwipv6-1.5a_1 libpipewire-0.2.so.1 libpipewire0.2-0.2.7_1 libpipewire-0.3.so.0 libpipewire-0.3.6_1 libvolk.so.2.5 volk-2.5.0_1 -libgnuradio-runtime.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-pmt.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-blocks.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-audio.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-fec.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-fft.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-filter.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-analog.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-digital.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-dtv.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-channels.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-trellis.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-video-sdl.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-vocoder.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-wavelet.so.3.8.0 gnuradio-3.8.0.0_1 -libgnuradio-uhd.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-runtime.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-pmt.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-blocks.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-audio.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-fec.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-fft.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-filter.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-analog.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-digital.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-dtv.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-channels.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-trellis.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-video-sdl.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-vocoder.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-wavelet.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-uhd.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-network.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-soapy.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-qtgui.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-zeromq.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-iio.so.3.10.3 gnuradio-3.10.3.0_1 +libgnuradio-pdu.so.3.10.3 gnuradio-3.10.3.0_1 libgnuradio-osmosdr.so.0.2.0 gnuradio-osmosdr-0.2.0_1 libflann_cpp.so.1.9 flann-1.9.1_1 libflann.so.1.9 flann-1.9.1_1 diff --git a/srcpkgs/gnuradio/patches/596c6495f3bdf579dae0c26531a16f6adcc7fb2f.patch b/srcpkgs/gnuradio/patches/596c6495f3bdf579dae0c26531a16f6adcc7fb2f.patch deleted file mode 100644 index 51952bd29b3..00000000000 --- a/srcpkgs/gnuradio/patches/596c6495f3bdf579dae0c26531a16f6adcc7fb2f.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 596c6495f3bdf579dae0c26531a16f6adcc7fb2f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marcus=20M=C3=BCller?= -Date: Mon, 13 Apr 2020 00:11:59 +0200 -Subject: [PATCH] =?UTF-8?q?pmt:=20conditionalize=20testing=20of=20long=20>?= - =?UTF-8?q?=202=C2=B3=C2=B2=20on=20sizeof(long)?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - gnuradio-runtime/python/pmt/qa_pmt.py | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/gnuradio-runtime/python/pmt/qa_pmt.py b/gnuradio-runtime/python/pmt/qa_pmt.py -index 884bba7dd4b..44f616cdae1 100644 ---- a/gnuradio-runtime/python/pmt/qa_pmt.py -+++ b/gnuradio-runtime/python/pmt/qa_pmt.py -@@ -18,6 +18,10 @@ class test_pmt(unittest.TestCase): - MAXINT32 = (2**31)-1 - MININT32 = (-MAXINT32)-1 - -+ def setUp(self): -+ from ctypes import sizeof, c_long -+ self.sizeof_long = sizeof(c_long) -+ - def test01(self): - a = pmt.intern("a") - b = pmt.from_double(123765) -@@ -112,6 +116,8 @@ def test14(self): - self.assertEqual(const,pmt.to_long(deser)) - - def test15(self): -+ if(self.sizeof_long <= 4): -+ return - const = self.MAXINT32 + 1 - x_pmt = pmt.from_long(const) - s = pmt.serialize_str(x_pmt) -@@ -137,6 +143,8 @@ def test17(self): - self.assertEqual(const, x_long) - - def test18(self): -+ if(self.sizeof_long <= 4): -+ return - const = self.MININT32 - 1 - x_pmt = pmt.from_long(const) - s = pmt.serialize_str(x_pmt) diff --git a/srcpkgs/gnuradio/patches/aa4b15d0b26b3c72fab736bcd28a67ab9d1404b7.patch b/srcpkgs/gnuradio/patches/aa4b15d0b26b3c72fab736bcd28a67ab9d1404b7.patch deleted file mode 100644 index c49a047427e..00000000000 --- a/srcpkgs/gnuradio/patches/aa4b15d0b26b3c72fab736bcd28a67ab9d1404b7.patch +++ /dev/null @@ -1,28 +0,0 @@ -From aa4b15d0b26b3c72fab736bcd28a67ab9d1404b7 Mon Sep 17 00:00:00 2001 -From: John Sallay -Date: Sat, 23 Oct 2021 08:26:42 -0400 -Subject: [PATCH] Fix issue 4595 qa_agc Assertion Error. - -The number of input elements needs to be disivible by volk_alignment, which it wasn't -for machines with 512-bit registers. - -Signed-off-by: John Sallay ---- - gr-analog/python/analog/qa_agc.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/gr-analog/python/analog/qa_agc.py b/gr-analog/python/analog/qa_agc.py -index a5a8ea47b6a..9368dd5d2a8 100644 ---- a/gr-analog/python/analog/qa_agc.py -+++ b/gr-analog/python/analog/qa_agc.py -@@ -454,7 +454,9 @@ def test_006(self): - tb = self.tb - - sampling_freq = 100 -- N = int(5*sampling_freq) -+ # N must by a multiple of the volk_alignment of the system for this test to work. -+ # For a machine with 512-bit registers, that would be 8 complex-floats. -+ N = int(8 * sampling_freq) - src1 = analog.sig_source_c(sampling_freq, analog.GR_SIN_WAVE, - sampling_freq * 0.10, 100) - dst1 = blocks.vector_sink_c() diff --git a/srcpkgs/gnuradio/patches/f259befbbe54e55fc4994899e92bcf5bf462fa2f.patch b/srcpkgs/gnuradio/patches/f259befbbe54e55fc4994899e92bcf5bf462fa2f.patch deleted file mode 100644 index 4faa3468140..00000000000 --- a/srcpkgs/gnuradio/patches/f259befbbe54e55fc4994899e92bcf5bf462fa2f.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f259befbbe54e55fc4994899e92bcf5bf462fa2f Mon Sep 17 00:00:00 2001 -From: alekhgupta1441 -Date: Sun, 12 Apr 2020 03:48:14 +0530 -Subject: [PATCH] gr-digital/python : Updated soft_dec_lut_gen.py - ---- - gr-digital/python/digital/soft_dec_lut_gen.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gr-digital/python/digital/soft_dec_lut_gen.py b/gr-digital/python/digital/soft_dec_lut_gen.py -index 4503c4fea7b..84f6de66e45 100644 ---- a/gr-digital/python/digital/soft_dec_lut_gen.py -+++ b/gr-digital/python/digital/soft_dec_lut_gen.py -@@ -73,7 +73,7 @@ def soft_dec_table_generator(soft_dec_gen, prec, Es=1): - - ''' - -- npts = 2.0**prec -+ npts = int(2.0**prec) - maxd = Es*numpy.sqrt(2.0)/2.0 - yrng = numpy.linspace(-maxd, maxd, npts) - xrng = numpy.linspace(-maxd, maxd, npts) -@@ -110,7 +110,7 @@ def soft_dec_table(constel, symbols, prec, npwr=1): - re_max = max(numpy.array(constel).real) - im_max = max(numpy.array(constel).imag) - -- npts = 2.0**prec -+ npts = int(2.0**prec) - yrng = numpy.linspace(im_min, im_max, npts) - xrng = numpy.linspace(re_min, re_max, npts) - diff --git a/srcpkgs/gnuradio/patches/fix-x11-library-call.patch b/srcpkgs/gnuradio/patches/fix-x11-library-call.patch new file mode 100644 index 00000000000..589c87e2ee3 --- /dev/null +++ b/srcpkgs/gnuradio/patches/fix-x11-library-call.patch @@ -0,0 +1,39 @@ +diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft +index fc5e9276c..41ea88b4c 100755 +--- a/gr-uhd/apps/uhd_fft ++++ b/gr-uhd/apps/uhd_fft +@@ -32,7 +32,7 @@ if __name__ == '__main__': + import ctypes + if sys.platform.startswith('linux'): + try: +- X11 = ctypes.cdll.LoadLibrary('libX11.so') ++ X11 = ctypes.cdll.LoadLibrary('libX11.so.6') + X11.XInitThreads() + except: + print("Warning: failed to XInitThreads()") +diff --git a/gr-uhd/apps/uhd_siggen_gui b/gr-uhd/apps/uhd_siggen_gui +index 0d9cb56c2..ea5e430f3 100755 +--- a/gr-uhd/apps/uhd_siggen_gui ++++ b/gr-uhd/apps/uhd_siggen_gui +@@ -29,7 +29,7 @@ if __name__ == '__main__': + import ctypes + if sys.platform.startswith('linux'): + try: +- X11 = ctypes.cdll.LoadLibrary('libX11.so') ++ X11 = ctypes.cdll.LoadLibrary('libX11.so.6') + X11.XInitThreads() + except: + print("Warning: failed to XInitThreads()") +diff --git a/grc/core/generator/flow_graph.py.mako b/grc/core/generator/flow_graph.py.mako +index b1c369177..6e9c56a08 100644 +--- a/grc/core/generator/flow_graph.py.mako ++++ b/grc/core/generator/flow_graph.py.mako +@@ -29,7 +29,7 @@ if __name__ == '__main__': + import sys + if sys.platform.startswith('linux'): + try: +- x11 = ctypes.cdll.LoadLibrary('libX11.so') ++ x11 = ctypes.cdll.LoadLibrary('libX11.so.6') + x11.XInitThreads() + except: + print("Warning: failed to XInitThreads()") diff --git a/srcpkgs/gnuradio/template b/srcpkgs/gnuradio/template index c950b53e8be..cb7afd79710 100644 --- a/srcpkgs/gnuradio/template +++ b/srcpkgs/gnuradio/template @@ -1,28 +1,50 @@ # Template file for 'gnuradio' pkgname=gnuradio -version=3.8.0.0 -revision=9 +version=3.10.3.0 +revision=1 build_style=cmake conf_files="/etc/gnuradio/conf.d/*" -configure_args="-DENABLE_INTERNAL_VOLK=OFF -DGR_PYTHON_DIR=/${py3_sitelib}" -hostmakedepends="pkg-config doxygen swig python3-Mako python3-Sphinx - python3-cairo python3-numpy python3-yaml texlive texlive-latexextra texlive-dvi" -makedepends="SDL-devel boost-devel fftw-devel gsl-devel jack-devel - libgsm-devel libusb-devel volk-devel uhd-devel gtk+3-devel python3-devel - python3-gobject-devel log4cpp-devel gmpxx-devel mpir-devel" -depends="python3-cheetah3 python3-numpy python3-Mako python3-gobject - python3-yaml" -checkdepends="python3-scipy" +configure_args="-DMATHJAX2_USE_ROOT=/usr/share/mathjax + -DZEROMQ_INCLUDE_DIRS=${XBPS_CROSS_BASE}/usr/include + -Dpybind11_DIR=/${py3_sitelib}/pybind11/share/cmake/pybind11" +_pydeps="python3-Mako python3-cairo python3-click python3-click-plugins python3-gobject + python3-jsonschema python3-numpy python3-pyqtgraph python3-pyzmq python3-scipy python3-yaml" +hostmakedepends="pkg-config doxygen mathjax python3-Sphinx python3-pybind11 python3-pygccxml + ${_pydeps}" +makedepends="SDL-devel SoapySDR-devel boost-devel codec2-devel cppzmq fftw-devel gmpxx-devel + gsl-devel gtk+3-devel jack-devel libgsm-devel libiio-devel libsndfile-devel mpir-devel + python3-devel python3-gobject-devel python3-pybind11 python3-pygccxml qwt-devel spdlog + uhd-devel volk-devel" +depends="${_pydeps} python3-cheetah3 python3-lxml python3-matplotlib" +checkdepends="python3-pytest" short_desc="Framework for software defined radio" maintainer="Andrew Benson " license="GPL-3.0-or-later" homepage="https://www.gnuradio.org" distfiles="https://github.com/gnuradio/gnuradio/archive/v${version}.tar.gz" -checksum=03fd01f0b27033befb91709b3d56f95e0869b5fb8bc71bec2662266a3f0dedf5 +checksum=957108a67ec75d99adaad8f3b10be8ae08760a9cef0b659a5c815a4e33898a75 python_version=3 +if [ "$CROSS_BUILD" ]; then + # CMake fails when cross-compiling. + configure_args+=" -DENABLE_TESTING=OFF" +fi + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" qt5-host-tools qt5-qmake" +fi + +if [ "$XBPS_WORDSIZE" != "$XBPS_TARGET_WORDSIZE" ]; then + nocross="pybind11: Python config failure: Python is 64-bit, chosen compiler is 32-bit" +fi + +if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then + make_check=ci-skip # See https://github.com/gnuradio/gnuradio/issues/5973 +fi + post_install() { rm ${DESTDIR}/usr/share/gnuradio/examples/audio/dial_tone \ + ${DESTDIR}/usr/share/gnuradio/examples/qt-gui/display_qt \ ${DESTDIR}/usr/share/gnuradio/examples/uhd/tags_demo vinstall grc/scripts/freedesktop/gnuradio-grc.desktop 644 \ usr/share/applications @@ -32,6 +54,7 @@ post_install() { gnuradio-doc_package() { short_desc+=" - documentation" + depends="mathjax" pkg_install() { vmove usr/share/doc } @@ -39,7 +62,7 @@ gnuradio-doc_package() { gnuradio-devel_package() { short_desc+=" - development files" - depends="${sourcepkg}>=${version}_${revision}" + depends="${makedepends} ${sourcepkg}>=${version}_${revision}" pkg_install() { vmove usr/include vmove "usr/lib/*.so"