On Sun, 3 Sep 2023, Stefan Hagen wrote:

> Rafael Sadowski wrote (2023-08-31 07:00 IST):
> > Simple update qwt-6.2.0. Tested on amd64. OK?
> 
> How to test it?
> 
> It breaks gnuradio:
> /usr/ports/pobj/gnuradio-3.8.2.0/gnuradio-3.8.2.0/gr-qtgui/lib/../include/gnuradio/qtgui/DisplayPlot.h:44:10:
>  fatal error: 'qwt_compat.h' file not found
> 

I ran into the same problem while testing a scipy update so integrated 
pull 5320 from upstream which fixes this problem and have committed this.

This allows me to make progress on scipy.

With the below I was able to launch gnuradio. Although to be honest it 
seems like gnuradio itself is in dire need of an update.

Index: Makefile
===================================================================
RCS file: /cvs/ports/comms/gnuradio/Makefile,v
retrieving revision 1.18
diff -u -p -u -r1.18 Makefile
--- Makefile    31 Jul 2023 07:18:36 -0000      1.18
+++ Makefile    4 Sep 2023 03:05:00 -0000
@@ -7,7 +7,7 @@ COMMENT =       signal-processing toolkit for 
 
 V =            3.8.2.0
 DISTNAME =     gnuradio-$V
-REVISION =     7
+REVISION =     8
 
 SHARED_LIBS +=  gnuradio-analog           0.0 # 3.7
 SHARED_LIBS +=  gnuradio-atsc             0.0 # 3.7
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_DisplayPlot_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_DisplayPlot_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_DisplayPlot_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_DisplayPlot_h 4 Sep 2023 
03:05:00 -0000
@@ -0,0 +1,18 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/DisplayPlot.h
+--- gr-qtgui/include/gnuradio/qtgui/DisplayPlot.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/DisplayPlot.h
+@@ -41,7 +41,10 @@
+ #include <vector>
+ 
+ #if QWT_VERSION >= 0x060000
+-#include <qwt_compat.h>
++typedef QPointF QwtDoublePoint;
++typedef QRectF QwtDoubleRect;
++
++typedef QwtInterval QwtDoubleInterval;
+ #endif
+ 
+ typedef QList<QColor> QColorList;
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_TimeRasterDisplayPlot_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_TimeRasterDisplayPlot_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_TimeRasterDisplayPlot_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_TimeRasterDisplayPlot_h       
4 Sep 2023 03:05:00 -0000
@@ -0,0 +1,17 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h
+--- gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h
+@@ -35,7 +35,9 @@
+ #if QWT_VERSION < 0x060000
+ #include <gnuradio/qtgui/plot_waterfall.h>
+ #else
+-#include <qwt_compat.h>
++#include <qwt_interval.h>
++
++typedef QwtInterval QwtDoubleInterval;
+ #endif
+ 
+ /*!
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_WaterfallDisplayPlot_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_WaterfallDisplayPlot_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_WaterfallDisplayPlot_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_WaterfallDisplayPlot_h        
4 Sep 2023 03:05:00 -0000
@@ -0,0 +1,17 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
+--- gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
+@@ -34,7 +34,9 @@
+ #if QWT_VERSION < 0x060000
+ #include <gnuradio/qtgui/plot_waterfall.h>
+ #else
+-#include <qwt_compat.h>
++#include <qwt_interval.h>
++
++typedef QwtInterval QwtDoubleInterval;
+ #endif
+ 
+ /*!
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_raster_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_raster_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_raster_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_raster_h 4 Sep 2023 
03:05:00 -0000
@@ -0,0 +1,19 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/plot_raster.h
+--- gr-qtgui/include/gnuradio/qtgui/plot_raster.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/plot_raster.h
+@@ -28,8 +28,10 @@
+ #include <qwt_plot_rasteritem.h>
+ 
+ #if QWT_VERSION >= 0x060000
+-#include <qwt_compat.h>
+-#include <qwt_point_3d.h> // doesn't seem necessary, but is...
++#include <qsize.h>
++#include <qwt_interval.h>
++
++typedef QwtInterval QwtDoubleInterval;
+ #endif
+ 
+ class QwtColorMap;
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_waterfall_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_waterfall_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_waterfall_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_plot_waterfall_h      4 Sep 
2023 03:05:00 -0000
@@ -0,0 +1,19 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/plot_waterfall.h
+--- gr-qtgui/include/gnuradio/qtgui/plot_waterfall.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/plot_waterfall.h
+@@ -28,8 +28,10 @@
+ #include <qwt_plot_rasteritem.h>
+ 
+ #if QWT_VERSION >= 0x060000
+-#include <qwt_compat.h>
+-#include <qwt_point_3d.h> // doesn't seem necessary, but is...
++#include <qsize.h>
++#include <qwt_interval.h>
++
++typedef QwtInterval QwtDoubleInterval;
+ #endif
+ 
+ class QwtColorMap;
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_qtgui_types_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_qtgui_types_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_qtgui_types_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_qtgui_types_h 4 Sep 2023 
03:05:00 -0000
@@ -0,0 +1,14 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/qtgui_types.h
+--- gr-qtgui/include/gnuradio/qtgui/qtgui_types.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/qtgui_types.h
+@@ -26,6 +26,7 @@
+ #include <gnuradio/high_res_timer.h>
+ #include <qwt_color_map.h>
+ #include <qwt_scale_draw.h>
++#include <qwt_text.h>
+ 
+ namespace gr {
+ namespace qtgui {
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_timeRasterGlobalData_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_timeRasterGlobalData_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_timeRasterGlobalData_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_timeRasterGlobalData_h        
4 Sep 2023 03:05:00 -0000
@@ -0,0 +1,39 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/timeRasterGlobalData.h
+--- gr-qtgui/include/gnuradio/qtgui/timeRasterGlobalData.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/timeRasterGlobalData.h
+@@ -27,8 +27,9 @@
+ #include <qwt_raster_data.h>
+ 
+ #if QWT_VERSION >= 0x060000
+-#include <qwt_compat.h>
+-#include <qwt_point_3d.h> // doesn't seem necessary, but is...
++#include <qwt_interval.h>
++
++typedef QwtInterval QwtDoubleInterval;
+ #endif
+ 
+ class TimeRasterData : public QwtRasterData
+@@ -47,6 +48,9 @@ class TimeRasterData : public QwtRasterData (public)
+ #if QWT_VERSION < 0x060000
+     virtual QwtDoubleInterval range() const;
+     virtual void setRange(const QwtDoubleInterval&);
++#elif QWT_VERSION >= 0x060200
++    virtual QwtInterval interval(Qt::Axis) const;
++    void setInterval(Qt::Axis, const QwtInterval&);
+ #endif
+ 
+     virtual double value(double x, double y) const;
+@@ -68,6 +72,10 @@ class TimeRasterData : public QwtRasterData (public)
+     QwtDoubleInterval d_intensityRange;
+ #else
+     QwtInterval d_intensityRange;
++#endif
++
++#if QWT_VERSION >= 0x060200
++    QwtInterval d_intervals[3];
+ #endif
+ 
+ private:
Index: patches/patch-gr-qtgui_include_gnuradio_qtgui_waterfallGlobalData_h
===================================================================
RCS file: patches/patch-gr-qtgui_include_gnuradio_qtgui_waterfallGlobalData_h
diff -N patches/patch-gr-qtgui_include_gnuradio_qtgui_waterfallGlobalData_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_include_gnuradio_qtgui_waterfallGlobalData_h 4 Sep 
2023 03:05:00 -0000
@@ -0,0 +1,39 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/include/gnuradio/qtgui/waterfallGlobalData.h
+--- gr-qtgui/include/gnuradio/qtgui/waterfallGlobalData.h.orig
++++ gr-qtgui/include/gnuradio/qtgui/waterfallGlobalData.h
+@@ -27,8 +27,9 @@
+ #include <qwt_raster_data.h>
+ 
+ #if QWT_VERSION >= 0x060000
+-#include <qwt_compat.h>
+-#include <qwt_point_3d.h> // doesn't seem necessary, but is...
++#include <qwt_interval.h>
++
++typedef QwtInterval QwtDoubleInterval;
+ #endif
+ 
+ class WaterfallData : public QwtRasterData
+@@ -48,6 +49,9 @@ class WaterfallData : public QwtRasterData (public)
+ #if QWT_VERSION < 0x060000
+     virtual QwtDoubleInterval range() const;
+     virtual void setRange(const QwtDoubleInterval&);
++#elif QWT_VERSION >= 0x060200
++    virtual QwtInterval interval(Qt::Axis) const;
++    void setInterval(Qt::Axis, const QwtInterval&);
+ #endif
+ 
+     virtual double value(double x, double y) const;
+@@ -72,6 +76,10 @@ class WaterfallData : public QwtRasterData (public)
+     QwtDoubleInterval _intensityRange;
+ #else
+     QwtInterval _intensityRange;
++#endif
++
++#if QWT_VERSION >= 0x060200
++    QwtInterval d_intervals[3];
+ #endif
+ 
+ private:
Index: patches/patch-gr-qtgui_lib_plot_raster_cc
===================================================================
RCS file: patches/patch-gr-qtgui_lib_plot_raster_cc
diff -N patches/patch-gr-qtgui_lib_plot_raster_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_lib_plot_raster_cc   4 Sep 2023 03:05:00 -0000
@@ -0,0 +1,32 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/lib/plot_raster.cc
+--- gr-qtgui/lib/plot_raster.cc.orig
++++ gr-qtgui/lib/plot_raster.cc
+@@ -257,7 +257,11 @@ QImage PlotTimeRaster::renderImage(const QwtScaleMap& 
+         }
+         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 QwtScaleMap& 
+             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
+             }
+         }
+     }
Index: patches/patch-gr-qtgui_lib_plot_waterfall_cc
===================================================================
RCS file: patches/patch-gr-qtgui_lib_plot_waterfall_cc
diff -N patches/patch-gr-qtgui_lib_plot_waterfall_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_lib_plot_waterfall_cc        4 Sep 2023 03:05:00 
-0000
@@ -0,0 +1,32 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/lib/plot_waterfall.cc
+--- gr-qtgui/lib/plot_waterfall.cc.orig
++++ gr-qtgui/lib/plot_waterfall.cc
+@@ -252,7 +252,11 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap& x
+             }
+         }
+     } 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 QwtScaleMap& x
+             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
+             }
+         }
+     }
Index: patches/patch-gr-qtgui_lib_timeRasterGlobalData_cc
===================================================================
RCS file: patches/patch-gr-qtgui_lib_timeRasterGlobalData_cc
diff -N patches/patch-gr-qtgui_lib_timeRasterGlobalData_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_lib_timeRasterGlobalData_cc  4 Sep 2023 03:05:00 
-0000
@@ -0,0 +1,20 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/lib/timeRasterGlobalData.cc
+--- gr-qtgui/lib/timeRasterGlobalData.cc.orig
++++ gr-qtgui/lib/timeRasterGlobalData.cc
+@@ -155,6 +155,13 @@ void TimeRasterData::setRange(const QwtDoubleInterval&
+ {
+     d_intensityRange = newRange;
+ }
++#elif 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
+ 
Index: patches/patch-gr-qtgui_lib_waterfallGlobalData_cc
===================================================================
RCS file: patches/patch-gr-qtgui_lib_waterfallGlobalData_cc
diff -N patches/patch-gr-qtgui_lib_waterfallGlobalData_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gr-qtgui_lib_waterfallGlobalData_cc   4 Sep 2023 03:05:00 
-0000
@@ -0,0 +1,20 @@
+backport https://github.com/gnuradio/gnuradio/pull/5302 so
+gnuradio can build with Qwt 6.2
+
+Index: gr-qtgui/lib/waterfallGlobalData.cc
+--- gr-qtgui/lib/waterfallGlobalData.cc.orig
++++ gr-qtgui/lib/waterfallGlobalData.cc
+@@ -158,7 +158,13 @@ void WaterfallData::setRange(const QwtDoubleInterval& 
+ {
+     _intensityRange = newRange;
+ }
++#elif 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
+ 
+ 



Reply via email to