gnuradio: rebuild for boost-1.80

This commit is contained in:
Đoàn Trần Công Danh 2022-08-26 17:00:31 +07:00
parent 9255c50d63
commit e8ad70b640
2 changed files with 80 additions and 1 deletions

View File

@ -0,0 +1,79 @@
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<void>
#include <spdlog/fmt/fmt.h>
#include <spdlog/fmt/ostr.h>
#include <memory>
+#include <string>
+#include <type_traits>
+#include <utility>
#include <spdlog/spdlog.h>
@@ -285,6 +288,52 @@ struct fmt::formatter<boost::format> : f
}
};
+namespace fmt {
+template <typename T>
+struct formatter<
+ T,
+ typename std::enable_if<
+ std::is_convertible<
+ decltype(std::declval<T>().identifier()),
+ std::string
+ >::value,
+ char
+ >::type > : fmt::formatter<std::string> {
+ template <typename FormatCtx>
+ auto format(const T& value, FormatCtx& ctx)
+ -> decltype(fmt::formatter<std::string>::format(value.identifier(), ctx))
+ {
+ return fmt::formatter<std::string>::format(value.identifier(), ctx);
+ }
+};
+template <typename T, typename Ch>
+struct formatter<std::shared_ptr<T>, Ch> : fmt::formatter<const void *, Ch> {
+ template <typename FormatCtx>
+ auto format(const std::shared_ptr<T>& ptr, FormatCtx& ctx)
+ -> decltype(fmt::formatter<const void *, Ch>::format(fmt::ptr(ptr), ctx))
+ {
+ return fmt::formatter<const void *, Ch>::format(fmt::ptr(ptr), ctx);
+ }
+};
+template <typename T>
+struct formatter<
+ std::shared_ptr<T>,
+ typename std::enable_if<
+ std::is_convertible<
+ decltype(std::declval<T>().identifier()),
+ std::string
+ >::value,
+ char
+ >::type > : fmt::formatter<std::string> {
+ template <typename FormatCtx>
+ auto format(const std::shared_ptr<T>& ptr, FormatCtx& ctx)
+ -> decltype(fmt::formatter<std::string>::format(ptr->identifier(), ctx))
+ {
+ return fmt::formatter<std::string>::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 <pybind11/complex.h>

View File

@ -1,7 +1,7 @@
# Template file for 'gnuradio'
pkgname=gnuradio
version=3.10.3.0
revision=1
revision=2
build_style=cmake
conf_files="/etc/gnuradio/conf.d/*"
configure_args="-DMATHJAX2_USE_ROOT=/usr/share/mathjax