From 501735c72d2aa83d5a9993fd5a11a12a7c14ac71 Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Sat, 17 Sep 2022 22:34:08 +1100 Subject: [PATCH] gnuradio: update to 3.10.5.1. --- common/shlibs | 44 +-- .../gnuradio/patches/boost-1.80-fmt-9.patch | 79 ------ srcpkgs/gnuradio/patches/fix-i686-tests.patch | 266 ------------------ .../skip-test-that-hangs-on-32bit.patch | 26 -- srcpkgs/gnuradio/template | 6 +- 5 files changed, 25 insertions(+), 396 deletions(-) delete mode 100644 srcpkgs/gnuradio/patches/boost-1.80-fmt-9.patch delete mode 100644 srcpkgs/gnuradio/patches/fix-i686-tests.patch delete mode 100644 srcpkgs/gnuradio/patches/skip-test-that-hangs-on-32bit.patch diff --git a/common/shlibs b/common/shlibs index 5cc81b9f90b..8a7c321774f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3241,28 +3241,28 @@ libarcan_a12.so.0.1 arcan-0.6.1.1_1 liblwipv6.so.2 lwipv6-1.5a_1 libpipewire-0.3.so.0 libpipewire-0.3.6_1 libvolk.so.3.0 volk-3.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-runtime.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-pmt.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-blocks.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-audio.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-fec.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-fft.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-filter.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-analog.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-digital.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-dtv.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-channels.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-trellis.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-video-sdl.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-vocoder.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-wavelet.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-uhd.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-network.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-soapy.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-qtgui.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-zeromq.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-iio.so.3.10.5 gnuradio-3.10.5.0_1 +libgnuradio-pdu.so.3.10.5 gnuradio-3.10.5.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/boost-1.80-fmt-9.patch b/srcpkgs/gnuradio/patches/boost-1.80-fmt-9.patch deleted file mode 100644 index a0c3f6d4701..00000000000 --- a/srcpkgs/gnuradio/patches/boost-1.80-fmt-9.patch +++ /dev/null @@ -1,79 +0,0 @@ -Upstream: no - -Honestly, I don't care much. I tries to print as much as it makes sense ---- a/gnuradio-runtime/include/gnuradio/logger.h -+++ b/gnuradio-runtime/include/gnuradio/logger.h -@@ -37,6 +37,9 @@ using logger_ptr = std::shared_ptr - #include - #include - #include -+#include -+#include -+#include - - #include - -@@ -285,6 +288,52 @@ struct fmt::formatter : f - } - }; - -+namespace fmt { -+template -+struct formatter< -+ T, -+ typename std::enable_if< -+ std::is_convertible< -+ decltype(std::declval().identifier()), -+ std::string -+ >::value, -+ char -+ >::type > : fmt::formatter { -+ template -+ auto format(const T& value, FormatCtx& ctx) -+ -> decltype(fmt::formatter::format(value.identifier(), ctx)) -+ { -+ return fmt::formatter::format(value.identifier(), ctx); -+ } -+}; -+template -+struct formatter, Ch> : fmt::formatter { -+ template -+ auto format(const std::shared_ptr& ptr, FormatCtx& ctx) -+ -> decltype(fmt::formatter::format(fmt::ptr(ptr), ctx)) -+ { -+ return fmt::formatter::format(fmt::ptr(ptr), ctx); -+ } -+}; -+template -+struct formatter< -+ std::shared_ptr, -+ typename std::enable_if< -+ std::is_convertible< -+ decltype(std::declval().identifier()), -+ std::string -+ >::value, -+ char -+ >::type > : fmt::formatter { -+ template -+ auto format(const std::shared_ptr& ptr, FormatCtx& ctx) -+ -> decltype(fmt::formatter::format(ptr->identifier(), ctx)) -+ { -+ return fmt::formatter::format(ptr->identifier(), ctx); -+ } -+}; -+} -+ - #endif - - #endif /* INCLUDED_GR_LOGGER_H */ ---- a/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc -+++ b/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc -@@ -15,7 +15,7 @@ - /* BINDTOOL_GEN_AUTOMATIC(0) */ - /* BINDTOOL_USE_PYGCCXML(0) */ - /* BINDTOOL_HEADER_FILE(logger.h) */ --/* BINDTOOL_HEADER_FILE_HASH(a76c325b045da079c83e294cc4abb8c6) */ -+/* BINDTOOL_HEADER_FILE_HASH(0e6a6ba08242e117ab4407ef3bf7afdf) */ - /***********************************************************************************/ - - #include diff --git a/srcpkgs/gnuradio/patches/fix-i686-tests.patch b/srcpkgs/gnuradio/patches/fix-i686-tests.patch deleted file mode 100644 index 43094abeb97..00000000000 --- a/srcpkgs/gnuradio/patches/fix-i686-tests.patch +++ /dev/null @@ -1,266 +0,0 @@ -From b7323c09566416187bad7728c547c336ffa49253 Mon Sep 17 00:00:00 2001 -From: Clayton Smith -Date: Fri, 14 Oct 2022 15:39:20 -0400 -Subject: [PATCH] blocks: Allow for floating point error in moving average test - -Signed-off-by: Clayton Smith ---- - gr-blocks/python/blocks/qa_moving_average.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gr-blocks/python/blocks/qa_moving_average.py b/gr-blocks/python/blocks/qa_moving_average.py -index 8f4169d05cf..6aa3ba3df35 100644 ---- a/gr-blocks/python/blocks/qa_moving_average.py -+++ b/gr-blocks/python/blocks/qa_moving_average.py -@@ -147,7 +147,7 @@ def test_vector_complex(self): - ref_data = ref_dst.data() - - # make sure result is close to zero -- self.assertEqual(dut_data, ref_data) -+ self.assertListAlmostEqual(dut_data, ref_data, tol=3) - - def test_complex_scalar(self): - tb = self.tb - -From e3e7b41a1f014ca39ec5d244eed01e1caa7cc4cb Mon Sep 17 00:00:00 2001 -From: Clayton Smith -Date: Fri, 14 Oct 2022 15:52:54 -0400 -Subject: [PATCH] fft: Increase tolerance in qa_window test - -Signed-off-by: Clayton Smith ---- - gr-fft/python/fft/qa_window.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gr-fft/python/fft/qa_window.py b/gr-fft/python/fft/qa_window.py -index 93ab1a9f93f..ec4877f7867 100644 ---- a/gr-fft/python/fft/qa_window.py -+++ b/gr-fft/python/fft/qa_window.py -@@ -35,7 +35,7 @@ def test_normwin(self): - 21, - normalize=True) - power = numpy.sum([x * x for x in win]) / len(win) -- self.assertAlmostEqual(power, 1.0) -+ self.assertAlmostEqual(power, 1.0, places=6) - - - if __name__ == '__main__': - -From 05b3b5e4689e6c061268c6df1773f10b021125e6 Mon Sep 17 00:00:00 2001 -From: Clayton Smith -Date: Fri, 14 Oct 2022 17:29:30 -0400 -Subject: [PATCH 1/2] digital: Account for floating point error in loop - conditions - -Signed-off-by: Clayton Smith ---- - gr-digital/lib/constellation.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gr-digital/lib/constellation.cc b/gr-digital/lib/constellation.cc -index 609b4546b83..4235d17f202 100644 ---- a/gr-digital/lib/constellation.cc -+++ b/gr-digital/lib/constellation.cc -@@ -245,9 +245,9 @@ void constellation::gen_soft_dec_lut(int precision, float npwr) - float maxd = 1.0f; - float step = (2.0f * maxd) / (d_lut_scale - 1); - float y = -maxd; -- while (y < maxd + step) { -+ while (y < maxd + (step / 2)) { - float x = -maxd; -- while (x < maxd + step) { -+ while (x < maxd + (step / 2)) { - gr_complex pt = gr_complex(x, y); - d_soft_dec_lut.push_back(calc_soft_dec(pt, npwr)); - x += step; - -From 830349bb36706aaf872a8a911ead631c9788c2ac Mon Sep 17 00:00:00 2001 -From: Clayton Smith -Date: Fri, 14 Oct 2022 17:31:33 -0400 -Subject: [PATCH 2/2] digital: Fix slicer implementation in qa_constellation - -Signed-off-by: Clayton Smith ---- - gr-digital/python/digital/qa_constellation.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/gr-digital/python/digital/qa_constellation.py b/gr-digital/python/digital/qa_constellation.py -index 7345f782a2c..1ad86a8d263 100644 ---- a/gr-digital/python/digital/qa_constellation.py -+++ b/gr-digital/python/digital/qa_constellation.py -@@ -117,10 +117,10 @@ def threed_constell(): - def slicer(x): - ret = [] - for xi in x: -- if(xi < 0): -+ if xi < 0: - ret.append(0.0) -- else: -- ret.append(1.0) -+ else: -+ ret.append(1.0) - return ret - - -From 7c24638f9924cdedeb9b2c9c430b3eb63585de3b Mon Sep 17 00:00:00 2001 -From: Clayton Smith -Date: Sat, 15 Oct 2022 10:44:37 -0400 -Subject: [PATCH] fec: Fix LDPC output size calculation - -Signed-off-by: Clayton Smith ---- - gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc | 2 +- - gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc -index a76bd76bae2..56a7aeab4c5 100644 ---- a/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc -+++ b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc -@@ -55,7 +55,7 @@ bool ldpc_gen_mtrx_encoder_impl::set_frame_size(unsigned int frame_size) - - d_frame_size = frame_size; - -- d_output_size = static_cast(d_rate * d_frame_size); -+ d_output_size = static_cast(round(d_rate * d_frame_size)); - - return ret; - } -diff --git a/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc b/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc -index f9aaa1b65b4..1475aba70d4 100644 ---- a/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc -+++ b/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc -@@ -75,7 +75,7 @@ bool ldpc_par_mtrx_encoder_impl::set_frame_size(unsigned int frame_size) - - d_frame_size = frame_size; - -- d_output_size = static_cast(d_rate * d_frame_size); -+ d_output_size = static_cast(round(d_rate * d_frame_size)); - - return ret; - } - -From 543983116771cee5653514f3cd2f260551edc89d Mon Sep 17 00:00:00 2001 -From: Clayton Smith -Date: Sun, 16 Oct 2022 08:22:48 -0400 -Subject: [PATCH] analog: Use realistic signals for CTCSS squelch tests - -Signed-off-by: Clayton Smith ---- - gr-analog/python/analog/qa_ctcss_squelch.py | 62 +++++++++++++++------ - 1 file changed, 45 insertions(+), 17 deletions(-) - -From 543983116771cee5653514f3cd2f260551edc89d Mon Sep 17 00:00:00 2001 -From: Clayton Smith -Date: Sun, 16 Oct 2022 08:22:48 -0400 -Subject: [PATCH] analog: Use realistic signals for CTCSS squelch tests - -Signed-off-by: Clayton Smith ---- - gr-analog/python/analog/qa_ctcss_squelch.py | 62 +++++++++++++++------ - 1 file changed, 45 insertions(+), 17 deletions(-) - -diff --git a/gr-analog/python/analog/qa_ctcss_squelch.py b/gr-analog/python/analog/qa_ctcss_squelch.py -index 6151641aa3c..195e19ab9a3 100644 ---- a/gr-analog/python/analog/qa_ctcss_squelch.py -+++ b/gr-analog/python/analog/qa_ctcss_squelch.py -@@ -9,6 +9,8 @@ - # - - -+import math -+import random - from gnuradio import gr, gr_unittest, analog, blocks - - -@@ -46,16 +48,24 @@ def test_ctcss_squelch_001(self): - - def test_ctcss_squelch_002(self): - # Test runtime, gate=True -- rate = 1 -+ rate = 8000 - freq = 100 -- level = 0.0 -- length = 1 -- ramp = 1 -+ other_freq = 103.5 -+ level = 0.01 -+ length = 0 -+ ramp = 0 - gate = True - -- src_data = [float(x) / 10.0 for x in range(1, 40)] -- expected_result = src_data -- expected_result[0] = 0 -+ random.seed(1) -+ src_data = [0.5 * math.sin(2 * math.pi * 1000 * x / rate) + random.gauss(0, 0.1) for x in range(rate)] -+ -+ # First half-second has incorrect CTCSS tone -+ for x in range(0, int(rate * 0.500)): -+ src_data[x] += 0.15 * math.sin(2 * math.pi * other_freq * x / rate) -+ -+ # Second half-second has correct CTCSS tone -+ for x in range(int(rate * 0.500), rate): -+ src_data[x] += 0.15 * math.sin(2 * math.pi * freq * x / rate) - - src = blocks.vector_source_f(src_data) - op = analog.ctcss_squelch_ff(rate, freq, level, -@@ -67,18 +77,34 @@ def test_ctcss_squelch_002(self): - self.tb.run() - - result_data = dst.data() -- self.assertFloatTuplesAlmostEqual(expected_result, result_data, 4) -+ -+ # Squelch should open ~100 ms after the correct CTCSS tone appears -+ # so ~400 ms of audio should make it past the gate -+ self.assertGreater(len(result_data), rate * 0.390) -+ self.assertLess(len(result_data), rate * 0.410) -+ self.assertFloatTuplesAlmostEqual(src_data[-len(result_data):], result_data, 6) - - def test_ctcss_squelch_003(self): - # Test runtime, gate=False -- rate = 1 -+ rate = 8000 - freq = 100 -- level = 0.5 -- length = 1 -- ramp = 1 -+ other_freq = 103.5 -+ level = 0.01 -+ length = 0 -+ ramp = 0 - gate = False - -- src_data = [float(x) / 10.0 for x in range(1, 40)] -+ random.seed(1) -+ src_data = [0.5 * math.sin(2 * math.pi * 1000 * x / rate) + random.gauss(0, 0.1) for x in range(rate)] -+ -+ # First half-second has incorrect CTCSS tone -+ for x in range(0, rate // 2): -+ src_data[x] += 0.15 * math.sin(2 * math.pi * other_freq * x / rate) -+ -+ # Second half-second has correct CTCSS tone -+ for x in range(rate // 2, rate): -+ src_data[x] += 0.15 * math.sin(2 * math.pi * freq * x / rate) -+ - src = blocks.vector_source_f(src_data) - op = analog.ctcss_squelch_ff(rate, freq, level, - length, ramp, gate) -@@ -88,11 +114,13 @@ def test_ctcss_squelch_003(self): - self.tb.connect(op, dst) - self.tb.run() - -- expected_result = src_data -- expected_result[0:5] = [0, 0, 0, 0, 0] -- - result_data = dst.data() -- self.assertFloatTuplesAlmostEqual(expected_result, result_data, 4) -+ -+ # Squelch should open ~100 ms after the correct CTCSS tone appears -+ min_zero_samples = int(rate * 0.590) -+ self.assertFloatTuplesAlmostEqual([0] * min_zero_samples, result_data[:min_zero_samples], 6) -+ max_zero_samples = int(rate * 0.610) -+ self.assertFloatTuplesAlmostEqual(src_data[max_zero_samples:], result_data[max_zero_samples:], 6) - - - if __name__ == '__main__': diff --git a/srcpkgs/gnuradio/patches/skip-test-that-hangs-on-32bit.patch b/srcpkgs/gnuradio/patches/skip-test-that-hangs-on-32bit.patch deleted file mode 100644 index 25a69421110..00000000000 --- a/srcpkgs/gnuradio/patches/skip-test-that-hangs-on-32bit.patch +++ /dev/null @@ -1,26 +0,0 @@ -Skip one test that hangs forever on 32 bit - -See: https://github.com/gnuradio/gnuradio/issues/989 - ---- a/gr-fec/python/fec/qa_fecapi_ldpc.py 2019-08-09 18:15:36.000000000 -0300 -+++ b/gr-fec/python/fec/qa_fecapi_ldpc.py 2021-12-28 12:56:31.635977173 -0300 -@@ -98,6 +98,9 @@ - self.assertEqual(data_in, data_out) - - def test_parallelism0_03(self): -+ from ctypes import sizeof, c_long -+ if sizeof(c_long) <= 4: -+ return - filename = LDPC_ALIST_DIR + "n_0100_k_0058_gen_matrix.alist" - gap = 4 - LDPC_matrix_object = fec.ldpc_G_matrix(filename) -@@ -115,6 +118,9 @@ - self.assertEqual(data_in, data_out) - - def test_parallelism0_03(self): -+ from ctypes import sizeof, c_long -+ if sizeof(c_long) <= 4: -+ return - filename = LDPC_ALIST_DIR + "n_0100_k_0058_gen_matrix.alist" - gap = 4 - k = 100 - 58 diff --git a/srcpkgs/gnuradio/template b/srcpkgs/gnuradio/template index 9571677a208..7c74168e8f5 100644 --- a/srcpkgs/gnuradio/template +++ b/srcpkgs/gnuradio/template @@ -1,7 +1,7 @@ # Template file for 'gnuradio' pkgname=gnuradio -version=3.10.3.0 -revision=9 +version=3.10.5.1 +revision=1 build_style=cmake conf_files="/etc/gnuradio/conf.d/*" configure_args="-DMATHJAX2_USE_ROOT=/usr/share/mathjax @@ -22,7 +22,7 @@ maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://www.gnuradio.org" distfiles="https://github.com/gnuradio/gnuradio/archive/v${version}.tar.gz" -checksum=957108a67ec75d99adaad8f3b10be8ae08760a9cef0b659a5c815a4e33898a75 +checksum=85d90147f7f28450bff75eeefd2b44adc88b231d29fe8e86cc3a65437dba6d9f python_version=3 if [ "$CROSS_BUILD" ]; then