diff --git a/0003-enables-use-of-qwt-6_2.patch b/0003-enables-use-of-qwt-6_2.patch new file mode 100644 index 0000000..3f31eac --- /dev/null +++ b/0003-enables-use-of-qwt-6_2.patch @@ -0,0 +1,302 @@ +diff -up gnuradio-3.8.3.1/cmake/Modules/FindQwt.cmake.aaaa gnuradio-3.8.3.1/cmake/Modules/FindQwt.cmake +--- gnuradio-3.8.3.1/cmake/Modules/FindQwt.cmake.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/cmake/Modules/FindQwt.cmake 2021-08-31 00:24:14.515453198 +0200 +@@ -51,13 +51,13 @@ if(QWT_INCLUDE_DIRS) + set(QWT_VERSION "No Version") + string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" QWT_VERSION ${QWT_STRING_VERSION}) + string(COMPARE LESS ${QWT_VERSION} "5.2.0" QWT_WRONG_VERSION) +- string(COMPARE GREATER ${QWT_VERSION} "6.2.0" QWT_WRONG_VERSION) ++ string(COMPARE GREATER ${QWT_VERSION} "6.3.0" QWT_WRONG_VERSION) + + message(STATUS "QWT Version: ${QWT_VERSION}") + if(NOT QWT_WRONG_VERSION) + set(QWT_FOUND TRUE) + else(NOT QWT_WRONG_VERSION) +- message(STATUS "QWT Version must be >= 5.2 and <= 6.2.0, Found ${QWT_VERSION}") ++ message(STATUS "QWT Version must be >= 5.2 and <= 6.3.0, Found ${QWT_VERSION}") + endif(NOT QWT_WRONG_VERSION) + + endif(QWT_INCLUDE_DIRS) +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/DisplayPlot.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/DisplayPlot.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/DisplayPlot.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/DisplayPlot.h 2021-08-31 00:24:14.515453198 +0200 +@@ -40,7 +40,12 @@ + #include + #include + +-#if QWT_VERSION >= 0x060000 ++#if QWT_VERSION >= 0x060200 ++typedef QPointF QwtDoublePoint; ++typedef QRectF QwtDoubleRect; ++ ++typedef QwtInterval QwtDoubleInterval; ++#elif QWT_VERSION >= 0x060000 + #include + #endif + +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_raster.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_raster.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_raster.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_raster.h 2021-08-31 00:24:14.515453198 +0200 +@@ -27,7 +27,12 @@ + #include + #include + +-#if QWT_VERSION >= 0x060000 ++#if QWT_VERSION >= 0x060200 ++#include "qwt_interval.h" ++#include ++ ++typedef QwtInterval QwtDoubleInterval; ++#elif QWT_VERSION >= 0x060000 + #include + #include // doesn't seem necessary, but is... + #endif +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_waterfall.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_waterfall.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_waterfall.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/plot_waterfall.h 2021-08-31 00:24:14.515453198 +0200 +@@ -27,7 +27,12 @@ + #include + #include + +-#if QWT_VERSION >= 0x060000 ++#if QWT_VERSION >= 0x060200 ++#include "qwt_interval.h" ++#include ++ ++typedef QwtInterval QwtDoubleInterval; ++#elif QWT_VERSION >= 0x060000 + #include + #include // doesn't seem necessary, but is... + #endif +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/qtgui_types.h 2021-08-31 00:24:14.515453198 +0200 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + namespace gr { + namespace qtgui { +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h 2021-08-31 00:24:14.515453198 +0200 +@@ -34,8 +34,13 @@ + + #if QWT_VERSION < 0x060000 + #include +-#else ++#elif QWT_VERSION >= 0x060200 ++#include "qwt_interval.h" ++ ++typedef QwtInterval QwtDoubleInterval; ++#elif QWT_VERSION >= 0x060000 + #include ++#include // doesn't seem necessary, but is... + #endif + + /*! +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/timeRasterGlobalData.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/timeRasterGlobalData.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/timeRasterGlobalData.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/timeRasterGlobalData.h 2021-08-31 00:24:14.515453198 +0200 +@@ -26,7 +26,11 @@ + #include + #include + +-#if QWT_VERSION >= 0x060000 ++#if QWT_VERSION >= 0x060200 ++#include "qwt_interval.h" ++ ++typedef QwtInterval QwtDoubleInterval; ++#elif QWT_VERSION >= 0x060000 + #include + #include // doesn't seem necessary, but is... + #endif +@@ -58,6 +62,11 @@ public: + + void incrementResidual(); + ++#if QWT_VERSION >= 0x060200 ++ virtual QwtInterval interval(Qt::Axis) const; ++ void setInterval(Qt::Axis, const QwtInterval&); ++#endif ++ + protected: + double* d_data; + double d_rows, d_cols; +@@ -70,6 +79,10 @@ protected: + QwtInterval d_intensityRange; + #endif + ++#if QWT_VERSION >= 0x060200 ++ QwtInterval d_intervals[3]; ++#endif ++ + private: + }; + +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h 2021-08-31 00:24:14.515453198 +0200 +@@ -33,8 +33,13 @@ + + #if QWT_VERSION < 0x060000 + #include +-#else ++#elif QWT_VERSION >= 0x060200 ++#include "qwt_interval.h" ++ ++typedef QwtInterval QwtDoubleInterval; ++#elif QWT_VERSION >= 0x060000 + #include ++#include // doesn't seem necessary, but is... + #endif + + /*! +diff -up gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/waterfallGlobalData.h.aaaa gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/waterfallGlobalData.h +--- gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/waterfallGlobalData.h.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/include/gnuradio/qtgui/waterfallGlobalData.h 2021-08-31 00:24:14.515453198 +0200 +@@ -26,7 +26,11 @@ + #include + #include + +-#if QWT_VERSION >= 0x060000 ++#if QWT_VERSION >= 0x060200 ++#include "qwt_interval.h" ++ ++typedef QwtInterval QwtDoubleInterval; ++#elif QWT_VERSION >= 0x060000 + #include + #include // doesn't seem necessary, but is... + #endif +@@ -62,6 +66,11 @@ public: + virtual void setNumLinesToUpdate(const int); + virtual void incrementNumLinesToUpdate(); + ++#if QWT_VERSION >= 0x060200 ++ virtual QwtInterval interval(Qt::Axis) const; ++ void setInterval(Qt::Axis, const QwtInterval&); ++#endif ++ + protected: + double* _spectrumData; + uint64_t _fftPoints; +@@ -74,6 +83,10 @@ protected: + QwtInterval _intensityRange; + #endif + ++#if QWT_VERSION >= 0x060200 ++ QwtInterval d_intervals[3]; ++#endif ++ + private: + }; + +diff -up gnuradio-3.8.3.1/gr-qtgui/lib/ConstellationDisplayPlot.cc.aaaa gnuradio-3.8.3.1/gr-qtgui/lib/ConstellationDisplayPlot.cc +--- gnuradio-3.8.3.1/gr-qtgui/lib/ConstellationDisplayPlot.cc.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/lib/ConstellationDisplayPlot.cc 2021-08-31 00:24:14.515453198 +0200 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + class ConstellationDisplayZoomer : public QwtPlotZoomer + { +diff -up gnuradio-3.8.3.1/gr-qtgui/lib/plot_raster.cc.aaaa gnuradio-3.8.3.1/gr-qtgui/lib/plot_raster.cc +--- gnuradio-3.8.3.1/gr-qtgui/lib/plot_raster.cc.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/lib/plot_raster.cc 2021-08-31 00:24:14.515453198 +0200 +@@ -257,7 +257,11 @@ QImage PlotTimeRaster::renderImage(const + } + d_data->data->incrementResidual(); + } else if (d_data->colorMap->format() == QwtColorMap::Indexed) { ++#if QWT_VERSION >= 0x060200 ++ image.setColorTable(d_data->colorMap->colorTable(256)); ++#else + image.setColorTable(d_data->colorMap->colorTable(intensityRange)); ++#endif + + for (int y = rect.top(); y <= rect.bottom(); y++) { + const double ty = yyMap.invTransform(y); +@@ -266,8 +270,13 @@ QImage PlotTimeRaster::renderImage(const + for (int x = rect.left(); x <= rect.right(); x++) { + const double tx = xxMap.invTransform(x); + ++#if QWT_VERSION >= 0x060200 ++ *line++ = d_data->colorMap->colorIndex( ++ 256, intensityRange, d_data->data->value(tx, ty)); ++#else + *line++ = d_data->colorMap->colorIndex(intensityRange, + d_data->data->value(tx, ty)); ++#endif + } + } + } +diff -up gnuradio-3.8.3.1/gr-qtgui/lib/plot_waterfall.cc.aaaa gnuradio-3.8.3.1/gr-qtgui/lib/plot_waterfall.cc +--- gnuradio-3.8.3.1/gr-qtgui/lib/plot_waterfall.cc.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/lib/plot_waterfall.cc 2021-08-31 00:24:14.515453198 +0200 +@@ -252,7 +252,11 @@ QImage PlotWaterfall::renderImage(const + } + } + } else if (d_data->colorMap->format() == QwtColorMap::Indexed) { ++#if QWT_VERSION >= 0x060200 ++ image.setColorTable(d_data->colorMap->colorTable(256)); ++#else + image.setColorTable(d_data->colorMap->colorTable(intensityRange)); ++#endif + + for (int y = rect.top(); y <= rect.bottom(); y++) { + const double ty = yyMap.invTransform(y); +@@ -261,8 +265,13 @@ QImage PlotWaterfall::renderImage(const + for (int x = rect.left(); x <= rect.right(); x++) { + const double tx = xxMap.invTransform(x); + ++#if QWT_VERSION >= 0x060200 ++ *line++ = d_data->colorMap->colorIndex( ++ 256, intensityRange, d_data->data->value(tx, ty)); ++#else + *line++ = d_data->colorMap->colorIndex(intensityRange, + d_data->data->value(tx, ty)); ++#endif + } + } + } +diff -up gnuradio-3.8.3.1/gr-qtgui/lib/timeRasterGlobalData.cc.aaaa gnuradio-3.8.3.1/gr-qtgui/lib/timeRasterGlobalData.cc +--- gnuradio-3.8.3.1/gr-qtgui/lib/timeRasterGlobalData.cc.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/lib/timeRasterGlobalData.cc 2021-08-31 11:06:50.424496849 +0200 +@@ -60,6 +60,15 @@ TimeRasterData::TimeRasterData(const dou + + TimeRasterData::~TimeRasterData() { delete[] d_data; } + ++#if QWT_VERSION >= 0x060200 ++void TimeRasterData::setInterval(Qt::Axis axis, const QwtInterval& interval) ++{ ++ d_intervals[axis] = interval; ++} ++ ++QwtInterval TimeRasterData::interval(Qt::Axis a) const { return d_intervals[a]; } ++#endif ++ + void TimeRasterData::reset() + { + d_resid = 0; +diff -up gnuradio-3.8.3.1/gr-qtgui/lib/waterfallGlobalData.cc.aaaa gnuradio-3.8.3.1/gr-qtgui/lib/waterfallGlobalData.cc +--- gnuradio-3.8.3.1/gr-qtgui/lib/waterfallGlobalData.cc.aaaa 2021-06-10 22:31:35.000000000 +0200 ++++ gnuradio-3.8.3.1/gr-qtgui/lib/waterfallGlobalData.cc 2021-08-31 11:08:23.085227507 +0200 +@@ -65,6 +65,15 @@ void WaterfallData::reset() + _numLinesToUpdate = -1; + } + ++#if QWT_VERSION >= 0x060200 ++void WaterfallData::setInterval(Qt::Axis axis, const QwtInterval& interval) ++{ ++ d_intervals[axis] = interval; ++} ++ ++QwtInterval WaterfallData::interval(Qt::Axis a) const { return d_intervals[a]; } ++#endif ++ + void WaterfallData::copy(const WaterfallData* rhs) + { + #if QWT_VERSION < 0x060000 diff --git a/gnuradio.changes b/gnuradio.changes index 3d787be..8a92ec2 100644 --- a/gnuradio.changes +++ b/gnuradio.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 31 12:57:53 UTC 2021 - Wojciech Kazubski + +- added a patch 0003-enables-use-of-qwt-6_2.patch to build with + Qwt-6.2.0. The patch was backported from pull request #5034. +- fixed build for Tumbleweed and Factory + ------------------------------------------------------------------- Fri Jun 11 19:00:29 UTC 2021 - Wojciech Kazubski diff --git a/gnuradio.spec b/gnuradio.spec index 31ab617..5e3b653 100644 --- a/gnuradio.spec +++ b/gnuradio.spec @@ -36,6 +36,7 @@ Source99: %{name}-rpmlintrc Patch0: missing_library.patch Patch1: revert-23cece0d0.patch Patch2: 0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch +Patch3: 0003-enables-use-of-qwt-6_2.patch BuildRequires: alsa-devel BuildRequires: cmake >= 3.8 BuildRequires: cppunit-devel