[gnuradio] Added fix for wxPython3 (by wxpython3-gtk3 patch). Patch

Jaroslav Škarvada jskarvad at fedoraproject.org
Thu Jan 29 13:31:42 UTC 2015


commit 2e651de9c32aef269c7c4e8e71d46e85f2f34db1
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date:   Thu Jan 29 14:31:33 2015 +0100

    Added fix for wxPython3 (by wxpython3-gtk3 patch). Patch
    
      provided by Scott Talbert

 gnuradio-3.7.5-wxpython3-gtk3.patch |   28 ++++++++++++++++++++++++++++
 gnuradio.spec                       |    9 ++++++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/gnuradio-3.7.5-wxpython3-gtk3.patch b/gnuradio-3.7.5-wxpython3-gtk3.patch
new file mode 100644
index 0000000..cca9220
--- /dev/null
+++ b/gnuradio-3.7.5-wxpython3-gtk3.patch
@@ -0,0 +1,28 @@
+From cbc1d8036f973108a2f7f8cfcc0c526f2e93c29b Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt at techie.net>
+Date: Wed, 28 Jan 2015 23:35:41 -0500
+Subject: [PATCH] Fix gnuradio for wxPython3/GTK+3
+
+MemoryDC needs to have a bitmap selected before using it
+---
+ gr-wxgui/python/wxgui/plotter/gltext.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gr-wxgui/python/wxgui/plotter/gltext.py b/gr-wxgui/python/wxgui/plotter/gltext.py
+index 0b6e3f5..55627bc 100644
+--- a/gr-wxgui/python/wxgui/plotter/gltext.py
++++ b/gr-wxgui/python/wxgui/plotter/gltext.py
+@@ -149,6 +149,10 @@ class TextElement(object):
+         # get a memory dc
+         dc = wx.MemoryDC()
+ 
++        # Select an empty bitmap into the MemoryDC - otherwise the call to
++        # GetMultiLineTextExtent() may fail below
++        dc.SelectObject(wx.EmptyBitmap(1,1))
++
+         # set our font
+         dc.SetFont(self._font)
+ 
+-- 
+2.2.2
+
diff --git a/gnuradio.spec b/gnuradio.spec
index 2430c52..fff6096 100644
--- a/gnuradio.spec
+++ b/gnuradio.spec
@@ -28,7 +28,7 @@
 
 Name:		gnuradio
 Version:	3.7.5.1
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	Software defined radio framework
 
 Group:		Applications/Engineering
@@ -72,6 +72,8 @@ Obsoletes:	grc < 0.80-1
 Patch0:	gnuradio-3.7.5-size_t.patch
 # rhbz#1185710, workaround from upstream
 Patch1:	gnuradio-3.7.5-volk-memalign-fix.patch
+# wxPython3 patch provided by Scott Talbert, reported upstream
+Patch2:	gnuradio-3.7.5-wxpython3-gtk3.patch
 
 %description
 GNU Radio is a collection of software that when combined with minimal
@@ -111,6 +113,7 @@ GNU Radio examples
 %setup -q
 %patch0 -p1 -b .size_t
 %patch1 -p1 -b .volk-memalign-fix
+%patch2 -p1 -b .wxpython3-gtk3
 
 #force regeneration of cached moc output files
 find . -name "*_moc.cc" -exec rm {} \;
@@ -198,6 +201,10 @@ rm -rf %{buildroot}
 %{_datadir}/gnuradio/examples
 
 %changelog
+* Thu Jan 29 2015 Jaroslav Škarvada <jskarvad at redhat.com> - 3.7.5.1-4
+- Added fix for wxPython3 (by wxpython3-gtk3 patch). Patch
+  provided by Scott Talbert
+
 * Tue Jan 27 2015 Petr Machata <pmachata at redhat.com> - 3.7.5.1-3
 - Rebuild for boost 1.57.0
 


More information about the scm-commits mailing list