diff options
author | Huang Rui <vowstar@gmail.com> | 2022-08-07 23:02:38 +0800 |
---|---|---|
committer | Thomas Beierlein <tomjbe@gentoo.org> | 2022-08-17 14:32:51 +0200 |
commit | 801713036d2f629e3fd6fae8b9e812a6038d9705 (patch) | |
tree | 2df79cbcb1a877cb3443257ae58d03a5b6cad4c7 /net-wireless | |
parent | mail-client/sylpheed: drop old (diff) | |
download | gentoo-801713036d2f629e3fd6fae8b9e812a6038d9705.tar.gz gentoo-801713036d2f629e3fd6fae8b9e812a6038d9705.tar.bz2 gentoo-801713036d2f629e3fd6fae8b9e812a6038d9705.zip |
net-wireless/gnuradio: fix 3.10.3.0 build problems
Fix static assertion failed : Cannot format an argument
Fix error: ‘HUGE_VAL’ was not declared in this scope
Signed-off-by: Huang Rui <vowstar@gmail.com>
Closes: https://bugs.gentoo.org/858659
Closes: https://bugs.gentoo.org/858665
Closes: https://github.com/gentoo/gentoo/pull/26775
Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
Diffstat (limited to 'net-wireless')
3 files changed, 200 insertions, 0 deletions
diff --git a/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-fmt-v9.patch b/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-fmt-v9.patch new file mode 100644 index 000000000000..7b17021213d8 --- /dev/null +++ b/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-fmt-v9.patch @@ -0,0 +1,145 @@ +From e63ee41fd455cdd39ae983c258d8632c3ea57fc6 Mon Sep 17 00:00:00 2001 +From: Huang Rui <vowstar@gmail.com> +Date: Sun, 7 Aug 2022 22:06:30 +0800 +Subject: [PATCH] Fix build failures with libfmt-9.0.0 + +libfmt-9.0.0 require explicit tagging of ARG types. This commit +adds those tags for the types that are currently formatted via fmt. + +Bug: https://bugs.gentoo.org/858659 +Closes: https://github.com/gnuradio/gnuradio/issues/6052 +Signed-off-by: Huang Rui <vowstar@gmail.com> +--- + gnuradio-runtime/lib/flat_flowgraph.cc | 25 ++++++++++++++++++++++ + gnuradio-runtime/lib/flowgraph.cc | 10 +++++++++ + gnuradio-runtime/lib/hier_block2_detail.cc | 19 ++++++++++++++++ + gr-analog/lib/sig_source_impl.cc | 10 +++++++++ + gr-uhd/lib/usrp_block_impl.cc | 7 ++++++ + 5 files changed, 71 insertions(+) + +diff --git a/gnuradio-runtime/lib/flat_flowgraph.cc b/gnuradio-runtime/lib/flat_flowgraph.cc +index 42875fb4c32..ac7c8ce9109 100644 +--- a/gnuradio-runtime/lib/flat_flowgraph.cc ++++ b/gnuradio-runtime/lib/flat_flowgraph.cc +@@ -25,6 +25,31 @@ + #include <map> + #include <numeric> + ++#if FMT_VERSION >= 90000 ++#include <fmt/ostream.h> ++template <> ++struct fmt::formatter<gr::edge> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<gr::msg_endpoint> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<gr::basic_block>> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<gr::block_detail>> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<gr::buffer_reader>> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<gr::buffer>> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { ++}; ++#endif // FMT_VERSION >= 90000 ++ + namespace gr { + + +diff --git a/gnuradio-runtime/lib/flowgraph.cc b/gnuradio-runtime/lib/flowgraph.cc +index 0bc04adc22c..6c63b834a89 100644 +--- a/gnuradio-runtime/lib/flowgraph.cc ++++ b/gnuradio-runtime/lib/flowgraph.cc +@@ -20,6 +20,16 @@ + // TODO: Replace with GNU Radio logging + #include <iostream> + ++#if FMT_VERSION >= 90000 ++#include <fmt/ostream.h> ++template <> ++struct fmt::formatter<std::shared_ptr<gr::basic_block>> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { ++}; ++#endif // FMT_VERSION >= 90000 ++ + namespace gr { + + edge::~edge() {} +diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc b/gnuradio-runtime/lib/hier_block2_detail.cc +index 5cb42030dca..d3e27aee5b4 100644 +--- a/gnuradio-runtime/lib/hier_block2_detail.cc ++++ b/gnuradio-runtime/lib/hier_block2_detail.cc +@@ -22,6 +22,25 @@ + // TODO: Replace with GNU Radio logging + #include <iostream> + ++#if FMT_VERSION >= 90000 ++#include <fmt/ostream.h> ++template <> ++struct fmt::formatter<gr::edge> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<gr::endpoint> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<gr::msg_endpoint> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<gr::basic_block>> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { ++}; ++#endif // FMT_VERSION >= 90000 ++ + namespace gr { + + hier_block2_detail::hier_block2_detail(hier_block2* owner) +diff --git a/gr-analog/lib/sig_source_impl.cc b/gr-analog/lib/sig_source_impl.cc +index 0e1db81648a..afa6d779cb0 100644 +--- a/gr-analog/lib/sig_source_impl.cc ++++ b/gr-analog/lib/sig_source_impl.cc +@@ -21,6 +21,16 @@ + #include <algorithm> + #include <stdexcept> + ++#if FMT_VERSION >= 90000 ++#include <fmt/ostream.h> ++template <> ++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { ++}; ++template <> ++struct fmt::formatter<gr::analog::gr_waveform_t&> : ostream_formatter { ++}; ++#endif // FMT_VERSION >= 90000 ++ + namespace gr { + namespace analog { + +diff --git a/gr-uhd/lib/usrp_block_impl.cc b/gr-uhd/lib/usrp_block_impl.cc +index cb6dccfcdea..b11b82a9e70 100644 +--- a/gr-uhd/lib/usrp_block_impl.cc ++++ b/gr-uhd/lib/usrp_block_impl.cc +@@ -12,6 +12,13 @@ + #include <chrono> + #include <thread> + ++#if FMT_VERSION >= 90000 ++#include <fmt/ostream.h> ++template <> ++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { ++}; ++#endif // FMT_VERSION >= 90000 ++ + using namespace gr::uhd; + using namespace std::chrono_literals; + diff --git a/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-gcc12.patch b/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-gcc12.patch new file mode 100644 index 000000000000..5db69aa60a75 --- /dev/null +++ b/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-gcc12.patch @@ -0,0 +1,50 @@ +From 9bf18900418e1d16e30072765bff1cbffdf8c0a9 Mon Sep 17 00:00:00 2001 +From: danielnachun <daniel.nachun@gmail.com> +Date: Fri, 8 Jul 2022 12:53:47 -0700 +Subject: [PATCH] add missing includes + +Signed-off-by: danielnachun <daniel.nachun@gmail.com> +--- + gr-qtgui/lib/FrequencyDisplayPlot.cc | 2 +- + gr-qtgui/lib/VectorDisplayPlot.cc | 2 ++ + gr-qtgui/lib/WaterfallDisplayPlot.cc | 1 + + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc b/gr-qtgui/lib/FrequencyDisplayPlot.cc +index f6f673e7ec6..2171f26e7d8 100644 +--- a/gr-qtgui/lib/FrequencyDisplayPlot.cc ++++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc +@@ -16,7 +16,7 @@ + #include <gnuradio/qtgui/qtgui_types.h> + #include <qwt_scale_draw.h> + #include <QColor> +- ++#include <cmath> + + /*********************************************************************** + * Widget to provide mouse pointer coordinate text +diff --git a/gr-qtgui/lib/VectorDisplayPlot.cc b/gr-qtgui/lib/VectorDisplayPlot.cc +index d5c2ecc27e5..2e5f3f422b9 100644 +--- a/gr-qtgui/lib/VectorDisplayPlot.cc ++++ b/gr-qtgui/lib/VectorDisplayPlot.cc +@@ -25,6 +25,8 @@ + #include <qwt_legend_label.h> + #endif /* QWT_VERSION < 0x060100 */ + ++#include <cmath> ++ + /*********************************************************************** + * Widget to provide mouse pointer coordinate text + **********************************************************************/ +diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc b/gr-qtgui/lib/WaterfallDisplayPlot.cc +index 69d82fdae86..d999fe046da 100644 +--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc ++++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc +@@ -28,6 +28,7 @@ + #endif /* QWT_VERSION < 0x060100 */ + + #include <QDebug> ++#include <cmath> + + /*********************************************************************** + * Text scale widget to provide Y (time) axis text diff --git a/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild b/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild index 87023a4ce0be..f9e22ca10894 100644 --- a/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild +++ b/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild @@ -130,6 +130,11 @@ DEPEND="${RDEPEND} zeromq? ( net-libs/cppzmq ) " +PATCHES=( + "${FILESDIR}/${PN}-3.10.3.0-fix-fmt-v9.patch" #858659 + "${FILESDIR}/${PN}-3.10.3.0-fix-gcc12.patch" #858665 +) + src_prepare() { xdg_environment_reset #534582 |