1 |
commit: 801713036d2f629e3fd6fae8b9e812a6038d9705 |
2 |
Author: Huang Rui <vowstar <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Aug 7 15:02:38 2022 +0000 |
4 |
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 17 12:32:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80171303 |
7 |
|
8 |
net-wireless/gnuradio: fix 3.10.3.0 build problems |
9 |
|
10 |
Fix static assertion failed : Cannot format an argument |
11 |
Fix error: ‘HUGE_VAL’ was not declared in this scope |
12 |
|
13 |
Signed-off-by: Huang Rui <vowstar <AT> gmail.com> |
14 |
Closes: https://bugs.gentoo.org/858659 |
15 |
Closes: https://bugs.gentoo.org/858665 |
16 |
Closes: https://github.com/gentoo/gentoo/pull/26775 |
17 |
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org> |
18 |
|
19 |
.../files/gnuradio-3.10.3.0-fix-fmt-v9.patch | 145 +++++++++++++++++++++ |
20 |
.../files/gnuradio-3.10.3.0-fix-gcc12.patch | 50 +++++++ |
21 |
net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild | 5 + |
22 |
3 files changed, 200 insertions(+) |
23 |
|
24 |
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 |
25 |
new file mode 100644 |
26 |
index 000000000000..7b17021213d8 |
27 |
--- /dev/null |
28 |
+++ b/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-fmt-v9.patch |
29 |
@@ -0,0 +1,145 @@ |
30 |
+From e63ee41fd455cdd39ae983c258d8632c3ea57fc6 Mon Sep 17 00:00:00 2001 |
31 |
+From: Huang Rui <vowstar@×××××.com> |
32 |
+Date: Sun, 7 Aug 2022 22:06:30 +0800 |
33 |
+Subject: [PATCH] Fix build failures with libfmt-9.0.0 |
34 |
+ |
35 |
+libfmt-9.0.0 require explicit tagging of ARG types. This commit |
36 |
+adds those tags for the types that are currently formatted via fmt. |
37 |
+ |
38 |
+Bug: https://bugs.gentoo.org/858659 |
39 |
+Closes: https://github.com/gnuradio/gnuradio/issues/6052 |
40 |
+Signed-off-by: Huang Rui <vowstar@×××××.com> |
41 |
+--- |
42 |
+ gnuradio-runtime/lib/flat_flowgraph.cc | 25 ++++++++++++++++++++++ |
43 |
+ gnuradio-runtime/lib/flowgraph.cc | 10 +++++++++ |
44 |
+ gnuradio-runtime/lib/hier_block2_detail.cc | 19 ++++++++++++++++ |
45 |
+ gr-analog/lib/sig_source_impl.cc | 10 +++++++++ |
46 |
+ gr-uhd/lib/usrp_block_impl.cc | 7 ++++++ |
47 |
+ 5 files changed, 71 insertions(+) |
48 |
+ |
49 |
+diff --git a/gnuradio-runtime/lib/flat_flowgraph.cc b/gnuradio-runtime/lib/flat_flowgraph.cc |
50 |
+index 42875fb4c32..ac7c8ce9109 100644 |
51 |
+--- a/gnuradio-runtime/lib/flat_flowgraph.cc |
52 |
++++ b/gnuradio-runtime/lib/flat_flowgraph.cc |
53 |
+@@ -25,6 +25,31 @@ |
54 |
+ #include <map> |
55 |
+ #include <numeric> |
56 |
+ |
57 |
++#if FMT_VERSION >= 90000 |
58 |
++#include <fmt/ostream.h> |
59 |
++template <> |
60 |
++struct fmt::formatter<gr::edge> : ostream_formatter { |
61 |
++}; |
62 |
++template <> |
63 |
++struct fmt::formatter<gr::msg_endpoint> : ostream_formatter { |
64 |
++}; |
65 |
++template <> |
66 |
++struct fmt::formatter<std::shared_ptr<gr::basic_block>> : ostream_formatter { |
67 |
++}; |
68 |
++template <> |
69 |
++struct fmt::formatter<std::shared_ptr<gr::block_detail>> : ostream_formatter { |
70 |
++}; |
71 |
++template <> |
72 |
++struct fmt::formatter<std::shared_ptr<gr::buffer_reader>> : ostream_formatter { |
73 |
++}; |
74 |
++template <> |
75 |
++struct fmt::formatter<std::shared_ptr<gr::buffer>> : ostream_formatter { |
76 |
++}; |
77 |
++template <> |
78 |
++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { |
79 |
++}; |
80 |
++#endif // FMT_VERSION >= 90000 |
81 |
++ |
82 |
+ namespace gr { |
83 |
+ |
84 |
+ |
85 |
+diff --git a/gnuradio-runtime/lib/flowgraph.cc b/gnuradio-runtime/lib/flowgraph.cc |
86 |
+index 0bc04adc22c..6c63b834a89 100644 |
87 |
+--- a/gnuradio-runtime/lib/flowgraph.cc |
88 |
++++ b/gnuradio-runtime/lib/flowgraph.cc |
89 |
+@@ -20,6 +20,16 @@ |
90 |
+ // TODO: Replace with GNU Radio logging |
91 |
+ #include <iostream> |
92 |
+ |
93 |
++#if FMT_VERSION >= 90000 |
94 |
++#include <fmt/ostream.h> |
95 |
++template <> |
96 |
++struct fmt::formatter<std::shared_ptr<gr::basic_block>> : ostream_formatter { |
97 |
++}; |
98 |
++template <> |
99 |
++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { |
100 |
++}; |
101 |
++#endif // FMT_VERSION >= 90000 |
102 |
++ |
103 |
+ namespace gr { |
104 |
+ |
105 |
+ edge::~edge() {} |
106 |
+diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc b/gnuradio-runtime/lib/hier_block2_detail.cc |
107 |
+index 5cb42030dca..d3e27aee5b4 100644 |
108 |
+--- a/gnuradio-runtime/lib/hier_block2_detail.cc |
109 |
++++ b/gnuradio-runtime/lib/hier_block2_detail.cc |
110 |
+@@ -22,6 +22,25 @@ |
111 |
+ // TODO: Replace with GNU Radio logging |
112 |
+ #include <iostream> |
113 |
+ |
114 |
++#if FMT_VERSION >= 90000 |
115 |
++#include <fmt/ostream.h> |
116 |
++template <> |
117 |
++struct fmt::formatter<gr::edge> : ostream_formatter { |
118 |
++}; |
119 |
++template <> |
120 |
++struct fmt::formatter<gr::endpoint> : ostream_formatter { |
121 |
++}; |
122 |
++template <> |
123 |
++struct fmt::formatter<gr::msg_endpoint> : ostream_formatter { |
124 |
++}; |
125 |
++template <> |
126 |
++struct fmt::formatter<std::shared_ptr<gr::basic_block>> : ostream_formatter { |
127 |
++}; |
128 |
++template <> |
129 |
++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { |
130 |
++}; |
131 |
++#endif // FMT_VERSION >= 90000 |
132 |
++ |
133 |
+ namespace gr { |
134 |
+ |
135 |
+ hier_block2_detail::hier_block2_detail(hier_block2* owner) |
136 |
+diff --git a/gr-analog/lib/sig_source_impl.cc b/gr-analog/lib/sig_source_impl.cc |
137 |
+index 0e1db81648a..afa6d779cb0 100644 |
138 |
+--- a/gr-analog/lib/sig_source_impl.cc |
139 |
++++ b/gr-analog/lib/sig_source_impl.cc |
140 |
+@@ -21,6 +21,16 @@ |
141 |
+ #include <algorithm> |
142 |
+ #include <stdexcept> |
143 |
+ |
144 |
++#if FMT_VERSION >= 90000 |
145 |
++#include <fmt/ostream.h> |
146 |
++template <> |
147 |
++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { |
148 |
++}; |
149 |
++template <> |
150 |
++struct fmt::formatter<gr::analog::gr_waveform_t&> : ostream_formatter { |
151 |
++}; |
152 |
++#endif // FMT_VERSION >= 90000 |
153 |
++ |
154 |
+ namespace gr { |
155 |
+ namespace analog { |
156 |
+ |
157 |
+diff --git a/gr-uhd/lib/usrp_block_impl.cc b/gr-uhd/lib/usrp_block_impl.cc |
158 |
+index cb6dccfcdea..b11b82a9e70 100644 |
159 |
+--- a/gr-uhd/lib/usrp_block_impl.cc |
160 |
++++ b/gr-uhd/lib/usrp_block_impl.cc |
161 |
+@@ -12,6 +12,13 @@ |
162 |
+ #include <chrono> |
163 |
+ #include <thread> |
164 |
+ |
165 |
++#if FMT_VERSION >= 90000 |
166 |
++#include <fmt/ostream.h> |
167 |
++template <> |
168 |
++struct fmt::formatter<std::shared_ptr<pmt::pmt_base>> : ostream_formatter { |
169 |
++}; |
170 |
++#endif // FMT_VERSION >= 90000 |
171 |
++ |
172 |
+ using namespace gr::uhd; |
173 |
+ using namespace std::chrono_literals; |
174 |
+ |
175 |
|
176 |
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 |
177 |
new file mode 100644 |
178 |
index 000000000000..5db69aa60a75 |
179 |
--- /dev/null |
180 |
+++ b/net-wireless/gnuradio/files/gnuradio-3.10.3.0-fix-gcc12.patch |
181 |
@@ -0,0 +1,50 @@ |
182 |
+From 9bf18900418e1d16e30072765bff1cbffdf8c0a9 Mon Sep 17 00:00:00 2001 |
183 |
+From: danielnachun <daniel.nachun@×××××.com> |
184 |
+Date: Fri, 8 Jul 2022 12:53:47 -0700 |
185 |
+Subject: [PATCH] add missing includes |
186 |
+ |
187 |
+Signed-off-by: danielnachun <daniel.nachun@×××××.com> |
188 |
+--- |
189 |
+ gr-qtgui/lib/FrequencyDisplayPlot.cc | 2 +- |
190 |
+ gr-qtgui/lib/VectorDisplayPlot.cc | 2 ++ |
191 |
+ gr-qtgui/lib/WaterfallDisplayPlot.cc | 1 + |
192 |
+ 3 files changed, 4 insertions(+), 1 deletion(-) |
193 |
+ |
194 |
+diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc b/gr-qtgui/lib/FrequencyDisplayPlot.cc |
195 |
+index f6f673e7ec6..2171f26e7d8 100644 |
196 |
+--- a/gr-qtgui/lib/FrequencyDisplayPlot.cc |
197 |
++++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc |
198 |
+@@ -16,7 +16,7 @@ |
199 |
+ #include <gnuradio/qtgui/qtgui_types.h> |
200 |
+ #include <qwt_scale_draw.h> |
201 |
+ #include <QColor> |
202 |
+- |
203 |
++#include <cmath> |
204 |
+ |
205 |
+ /*********************************************************************** |
206 |
+ * Widget to provide mouse pointer coordinate text |
207 |
+diff --git a/gr-qtgui/lib/VectorDisplayPlot.cc b/gr-qtgui/lib/VectorDisplayPlot.cc |
208 |
+index d5c2ecc27e5..2e5f3f422b9 100644 |
209 |
+--- a/gr-qtgui/lib/VectorDisplayPlot.cc |
210 |
++++ b/gr-qtgui/lib/VectorDisplayPlot.cc |
211 |
+@@ -25,6 +25,8 @@ |
212 |
+ #include <qwt_legend_label.h> |
213 |
+ #endif /* QWT_VERSION < 0x060100 */ |
214 |
+ |
215 |
++#include <cmath> |
216 |
++ |
217 |
+ /*********************************************************************** |
218 |
+ * Widget to provide mouse pointer coordinate text |
219 |
+ **********************************************************************/ |
220 |
+diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc b/gr-qtgui/lib/WaterfallDisplayPlot.cc |
221 |
+index 69d82fdae86..d999fe046da 100644 |
222 |
+--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc |
223 |
++++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc |
224 |
+@@ -28,6 +28,7 @@ |
225 |
+ #endif /* QWT_VERSION < 0x060100 */ |
226 |
+ |
227 |
+ #include <QDebug> |
228 |
++#include <cmath> |
229 |
+ |
230 |
+ /*********************************************************************** |
231 |
+ * Text scale widget to provide Y (time) axis text |
232 |
|
233 |
diff --git a/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild b/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild |
234 |
index 87023a4ce0be..f9e22ca10894 100644 |
235 |
--- a/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild |
236 |
+++ b/net-wireless/gnuradio/gnuradio-3.10.3.0.ebuild |
237 |
@@ -130,6 +130,11 @@ DEPEND="${RDEPEND} |
238 |
zeromq? ( net-libs/cppzmq ) |
239 |
" |
240 |
|
241 |
+PATCHES=( |
242 |
+ "${FILESDIR}/${PN}-3.10.3.0-fix-fmt-v9.patch" #858659 |
243 |
+ "${FILESDIR}/${PN}-3.10.3.0-fix-gcc12.patch" #858665 |
244 |
+) |
245 |
+ |
246 |
src_prepare() { |
247 |
xdg_environment_reset #534582 |