summarylogtreecommitdiffstats
path: root/682.patch
blob: 3d8d3576a823358adb66c2876f660d122e0b4037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
From 5f6cd839bd4478af1592eda662452be3f3e37993 Mon Sep 17 00:00:00 2001
From: Adam Shrout <geezer85@users.noreply.github.com>
Date: Tue, 10 May 2022 19:43:54 -0500
Subject: [PATCH 1/2] Add initial support for GNURadio 3.10.

---
 lib/op25_repeater/lib/CMakeLists.txt                 | 11 +++++++++--
 lib/op25_repeater/lib/fsk4_demod_ff_impl.h           |  3 +++
 plugins/openmhz_uploader/openmhz_uploader.cc         |  3 +++
 plugins/rdioscanner_uploader/rdioscanner_uploader.cc |  3 +++
 trunk-recorder/plugin_manager/plugin_manager.h       |  3 +++
 trunk-recorder/recorders/debug_recorder.cc           |  7 +++++++
 trunk-recorder/recorders/debug_recorder.h            |  9 +++++++++
 7 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/lib/op25_repeater/lib/CMakeLists.txt b/lib/op25_repeater/lib/CMakeLists.txt
index 9844aea0..b1bf1e68 100644
--- a/lib/op25_repeater/lib/CMakeLists.txt
+++ b/lib/op25_repeater/lib/CMakeLists.txt
@@ -118,12 +118,19 @@ set(GR_FILTER_LIBRARIES ${GR_FILTER_LIBRARY})
 set(GR_PMT_LIBRARIES ${GR_PMT_LIBRARY})
 
 target_link_libraries(gnuradio-op25_repeater ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GR_PMT_LIBRARIES} ${GR_FILTER_LIBRARIES} )
-if(NOT Gnuradio_VERSION VERSION_LESS "3.8")
+if(NOT Gnuradio_VERSION VERSION_LESS "3.10")
     target_link_libraries(gnuradio-op25_repeater
     gnuradio::gnuradio-runtime
     gnuradio::gnuradio-filter
     gnuradio::gnuradio-pmt
-    )  
+    gnuradio-network
+    )
+else(NOT Gnuradio_VERSION VERSION_LESS "3.8")
+    target_link_libraries(gnuradio-op25_repeater
+    gnuradio::gnuradio-runtime
+    gnuradio::gnuradio-filter
+    gnuradio::gnuradio-pmt
+    )
 endif()
 
 set_target_properties(gnuradio-op25_repeater PROPERTIES DEFINE_SYMBOL "gnuradio_op25_repeater_EXPORTS")
diff --git a/lib/op25_repeater/lib/fsk4_demod_ff_impl.h b/lib/op25_repeater/lib/fsk4_demod_ff_impl.h
index 7345a21f..6dcad111 100644
--- a/lib/op25_repeater/lib/fsk4_demod_ff_impl.h
+++ b/lib/op25_repeater/lib/fsk4_demod_ff_impl.h
@@ -24,6 +24,9 @@
 #ifndef INCLUDED_OP25_REPEATER_FSK4_DEMOD_FF_IMPL_H
 #define INCLUDED_OP25_REPEATER_FSK4_DEMOD_FF_IMPL_H
 
+#if GNURADIO_VERSION >= 0x030a00
+#include <boost/smart_ptr/scoped_array.hpp>
+#endif
 #include <op25_repeater/fsk4_demod_ff.h>
 
 namespace gr {
diff --git a/plugins/openmhz_uploader/openmhz_uploader.cc b/plugins/openmhz_uploader/openmhz_uploader.cc
index 47135cf6..fb75ffb2 100644
--- a/plugins/openmhz_uploader/openmhz_uploader.cc
+++ b/plugins/openmhz_uploader/openmhz_uploader.cc
@@ -1,5 +1,8 @@
 #include <curl/curl.h>
 #include <time.h>
+#if GNURADIO_VERSION >= 0x030a00
+#include <iomanip>
+#endif
 #include <vector>
 
 #include "../../trunk-recorder/call_concluder/call_concluder.h"
diff --git a/plugins/rdioscanner_uploader/rdioscanner_uploader.cc b/plugins/rdioscanner_uploader/rdioscanner_uploader.cc
index 6829121e..08230c6b 100644
--- a/plugins/rdioscanner_uploader/rdioscanner_uploader.cc
+++ b/plugins/rdioscanner_uploader/rdioscanner_uploader.cc
@@ -1,5 +1,8 @@
 #include <curl/curl.h>
 #include <time.h>
+#if GNURADIO_VERSION >= 0x030a00
+#include <iomanip>
+#endif
 #include <vector>
 
 #include "../../trunk-recorder/call_concluder/call_concluder.h"
diff --git a/trunk-recorder/plugin_manager/plugin_manager.h b/trunk-recorder/plugin_manager/plugin_manager.h
index aa72feca..806cc325 100644
--- a/trunk-recorder/plugin_manager/plugin_manager.h
+++ b/trunk-recorder/plugin_manager/plugin_manager.h
@@ -7,6 +7,9 @@
 #include "../call_concluder/call_concluder.h"
 
 #include "plugin_api.h"
+#if GNURADIO_VERSION >= 0x030a00
+#include <boost/function.hpp>
+#endif
 #include <boost/property_tree/ptree.hpp>
 #include <boost/optional/optional.hpp>
 #include <vector>
diff --git a/trunk-recorder/recorders/debug_recorder.cc b/trunk-recorder/recorders/debug_recorder.cc
index ca927603..3c9d48ac 100644
--- a/trunk-recorder/recorders/debug_recorder.cc
+++ b/trunk-recorder/recorders/debug_recorder.cc
@@ -1,6 +1,9 @@
 
 #include "debug_recorder.h"
 #include <boost/log/trivial.hpp>
+#if GNURADIO_VERSION >= 0x030a00
+#include <gnuradio/network/udp_header_types.h>
+#endif
 
 //static int rec_counter=0;
 
@@ -156,7 +159,11 @@ debug_recorder::debug_recorder(Source *src, std::string address, int port)
   starttime = time(NULL);
 
   initialize_prefilter();
+  #if GNURADIO_VERSION < 0x030a00
   udp_sink = gr::blocks::udp_sink::make(sizeof(gr_complex), address, port);
+  #else
+  udp_sink = gr::network::udp_sink::make(sizeof(gr_complex), 1, address, port, HEADERTYPE_NONE, 1472, true);
+  #endif
   connect(arb_resampler, 0, udp_sink, 0);
 }
 
diff --git a/trunk-recorder/recorders/debug_recorder.h b/trunk-recorder/recorders/debug_recorder.h
index 143b2166..d9a85795 100644
--- a/trunk-recorder/recorders/debug_recorder.h
+++ b/trunk-recorder/recorders/debug_recorder.h
@@ -13,7 +13,12 @@
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/path.hpp>
 #include <boost/shared_ptr.hpp>
+#if GNURADIO_VERSION < 0x030a00
 #include <gnuradio/blocks/udp_sink.h>
+#endif
+#if GNURADIO_VERSION >= 0x030a00
+#include <gnuradio/network/udp_sink.h>
+#endif
 
 #include <gnuradio/hier_block2.h>
 #include <gnuradio/io_signature.h>
@@ -142,7 +147,11 @@ class debug_recorder : public gr::hier_block2, public Recorder {
   gr::analog::sig_source_c::sptr lo;
   gr::analog::sig_source_c::sptr bfo;
   gr::blocks::multiply_cc::sptr mixer;
+  #if GNURADIO_VERSION < 0x030a00
   gr::blocks::udp_sink::sptr udp_sink;
+  #else
+  gr::network::udp_sink::sptr udp_sink;
+  #endif
   gr::filter::pfb_arb_resampler_ccf::sptr arb_resampler;
 };
 

From 2b9aef451af49dc224f071ba5a3faaead064104f Mon Sep 17 00:00:00 2001
From: Adam Shrout <geezer85@users.noreply.github.com>
Date: Sat, 4 Jun 2022 23:20:00 -0500
Subject: [PATCH 2/2] Remove unnecessary GNURadio version checks.

---
 plugins/openmhz_uploader/openmhz_uploader.cc         | 2 --
 plugins/rdioscanner_uploader/rdioscanner_uploader.cc | 2 --
 trunk-recorder/recorders/debug_recorder_impl.h       | 5 ++---
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/plugins/openmhz_uploader/openmhz_uploader.cc b/plugins/openmhz_uploader/openmhz_uploader.cc
index fb75ffb2..153c35ef 100644
--- a/plugins/openmhz_uploader/openmhz_uploader.cc
+++ b/plugins/openmhz_uploader/openmhz_uploader.cc
@@ -1,8 +1,6 @@
 #include <curl/curl.h>
 #include <time.h>
-#if GNURADIO_VERSION >= 0x030a00
 #include <iomanip>
-#endif
 #include <vector>
 
 #include "../../trunk-recorder/call_concluder/call_concluder.h"
diff --git a/plugins/rdioscanner_uploader/rdioscanner_uploader.cc b/plugins/rdioscanner_uploader/rdioscanner_uploader.cc
index 08230c6b..ac720aaf 100644
--- a/plugins/rdioscanner_uploader/rdioscanner_uploader.cc
+++ b/plugins/rdioscanner_uploader/rdioscanner_uploader.cc
@@ -1,8 +1,6 @@
 #include <curl/curl.h>
 #include <time.h>
-#if GNURADIO_VERSION >= 0x030a00
 #include <iomanip>
-#endif
 #include <vector>
 
 #include "../../trunk-recorder/call_concluder/call_concluder.h"