diff options
author | Todd E Johnson | 2022-07-27 19:25:33 -0500 |
---|---|---|
committer | Todd E Johnson | 2022-07-27 19:25:33 -0500 |
commit | 208ce641db0282384b8115eb45af1ba5596272ad (patch) | |
tree | 7f091f4cbc96a8a009dc15c7a9181f73887f1623 | |
parent | 5a5af3485738ef1bd75fd35303015eec192531aa (diff) | |
download | aur-208ce641db0282384b8115eb45af1ba5596272ad.tar.gz |
Fix build issues of v4.3.2 with patches from upstream
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 612-boost-vs-std.patch | 15 | ||||
-rw-r--r-- | 682.patch | 188 | ||||
-rw-r--r-- | 698.patch | 23 | ||||
-rw-r--r-- | PKGBUILD | 11 |
5 files changed, 225 insertions, 18 deletions
@@ -1,7 +1,7 @@ pkgbase = trunk-recorder pkgdesc = Records calls from a Trunked Radio System (P25 & SmartNet) pkgver = 4.3.2 - pkgrel = 1 + pkgrel = 2 url = https://github.com/robotastic/trunk-recorder arch = x86_64 arch = i686 @@ -23,10 +23,14 @@ pkgbase = trunk-recorder source = https://github.com/robotastic/trunk-recorder/archive/v4.3.2.tar.gz source = trunk-recorder.service source = trunk-recorder.sysusers + source = 682.patch + source = 698.patch source = trunk-recorder.tmpfiles sha256sums = 66e424419aefb81f78aa05af6358a09a770caf0f14c6926e6f4b8d6b70b065c3 sha256sums = 78bb66aa30af3395c2eddcafa3e59f65e59a328e04a093bb849a83cdedf01a0d sha256sums = f2e06d333ec8a64c869a9cf369015bf6e0b9819d2af259b4d1c411ed3cca78f8 + sha256sums = b7a38883ffd38a15bdd2858fd7b1f35d58d4679ac7c4789838a6f1c399bc7b57 + sha256sums = 9ff08a0601ab27447eab51c10e4f84d8eb826e0bc1b13c4344a2cb53c60c91a3 sha256sums = c20344ba366fcab3f3552e2b5e537f394406ab634f35c2b8858423ffa63fd0e8 pkgname = trunk-recorder diff --git a/612-boost-vs-std.patch b/612-boost-vs-std.patch deleted file mode 100644 index 9c23c669bdc8..000000000000 --- a/612-boost-vs-std.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/trunk-recorder/systems/system.h b/trunk-recorder/systems/system.h -index a721f38..bb9d044 100644 ---- a/trunk-recorder/systems/system.h -+++ b/trunk-recorder/systems/system.h -@@ -35,8 +35,8 @@ class dmr_recorder; - typedef boost::shared_ptr<dmr_recorder> dmr_recorder_sptr; - #else - typedef std::shared_ptr<analog_recorder> analog_recorder_sptr; -- typedef boost::shared_ptr<p25_recorder> p25_recorder_sptr; -- typedef boost::shared_ptr<dmr_recorder> dmr_recorder_sptr; -+ typedef std::shared_ptr<p25_recorder> p25_recorder_sptr; -+ typedef std::shared_ptr<dmr_recorder> dmr_recorder_sptr; - #endif - - class System { diff --git a/682.patch b/682.patch new file mode 100644 index 000000000000..3d8d3576a823 --- /dev/null +++ b/682.patch @@ -0,0 +1,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" diff --git a/698.patch b/698.patch new file mode 100644 index 000000000000..9df32ff9cbdb --- /dev/null +++ b/698.patch @@ -0,0 +1,23 @@ +From dd25c29a59664f2ff2ead99fed38b7c78f41a35b Mon Sep 17 00:00:00 2001 +From: Adam Shrout <geezer85@users.noreply.github.com> +Date: Wed, 8 Jun 2022 20:39:43 -0500 +Subject: [PATCH 2/2] Fix build error if spdlog does not ship with bundled fmt. + +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e1e9da0b..8d3ebc32 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -191,6 +191,9 @@ if(NOT Boost_FOUND) + endif() + + ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) ++if(NOT EXISTS /usr/include/spdlog/fmt/bundled) ++ ADD_DEFINITIONS(-DSPDLOG_FMT_EXTERNAL=ON) ++endif() + add_definitions(-DGNURADIO_VERSION=${GNURADIO_VERSION}) + + ######################################################################## @@ -3,7 +3,7 @@ options=(!buildflags) pkgname=trunk-recorder pkgver=4.3.2 _dlpkgver=${pkgver} -pkgrel=1 +pkgrel=2 pkgdesc="Records calls from a Trunked Radio System (P25 & SmartNet)" arch=(x86_64 i686 armv5 armv6h armv7h aarch64) url="https://github.com/robotastic/trunk-recorder" @@ -14,15 +14,23 @@ optdepends=() source=("https://github.com/robotastic/trunk-recorder/archive/v${_dlpkgver}.tar.gz" 'trunk-recorder.service' 'trunk-recorder.sysusers' + '682.patch' + '698.patch' 'trunk-recorder.tmpfiles') sha256sums=('66e424419aefb81f78aa05af6358a09a770caf0f14c6926e6f4b8d6b70b065c3' '78bb66aa30af3395c2eddcafa3e59f65e59a328e04a093bb849a83cdedf01a0d' 'f2e06d333ec8a64c869a9cf369015bf6e0b9819d2af259b4d1c411ed3cca78f8' + 'b7a38883ffd38a15bdd2858fd7b1f35d58d4679ac7c4789838a6f1c399bc7b57' + '9ff08a0601ab27447eab51c10e4f84d8eb826e0bc1b13c4344a2cb53c60c91a3' 'c20344ba366fcab3f3552e2b5e537f394406ab634f35c2b8858423ffa63fd0e8') prepare() { rm -rf build mkdir build + # Patch to work around https://github.com/robotastic/trunk-recorder/pull/682 + patch --directory="${pkgname}-${_dlpkgver}" --forward --strip=1 --input="${srcdir}/682.patch" + # Patch to work around https://github.com/robotastic/trunk-recorder/pull/698/commits/dd25c29a59664f2ff2ead99fed38b7c78f41a35b + patch --directory="${pkgname}-${_dlpkgver}" --forward --strip=1 --input="${srcdir}/698.patch" } build() { cd build @@ -37,7 +45,6 @@ package() { install -D -m644 "../${pkgname}-${_dlpkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -D -m644 "../$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" install -D -m644 "../$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" - install -D -m644 "../$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" install -D -m644 "../$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" } |