[106742] trunk/dports/science/gnuradio

michaelld at macports.org michaelld at macports.org
Thu Jun 6 19:57:30 PDT 2013


Revision: 106742
          https://trac.macports.org/changeset/106742
Author:   michaelld at macports.org
Date:     2013-06-06 19:57:30 -0700 (Thu, 06 Jun 2013)
Log Message:
-----------
gnuradio:
* update devel and next to latest;
* add patches for reverted commits to fix OpenGL plotting behavior.

Modified Paths:
--------------
    trunk/dports/science/gnuradio/Portfile

Added Paths:
-----------
    trunk/dports/science/gnuradio/files/
    trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.6.diff
    trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.7.diff

Modified: trunk/dports/science/gnuradio/Portfile
===================================================================
--- trunk/dports/science/gnuradio/Portfile	2013-06-07 02:26:46 UTC (rev 106741)
+++ trunk/dports/science/gnuradio/Portfile	2013-06-07 02:57:30 UTC (rev 106742)
@@ -44,16 +44,19 @@
     long_description    ${description}: \
         This port is kept up with the GNU Radio GIT 'maint' branch, which is typically updated weekly to monthly.  This version of GNU Radio generally contains fixes to, and its API is compatible with, the current GNU Radio release, and will be incorporated in an upcoming release.  This port may or not compile or function correctly, as it represents a work in progress.  If it does not work, check back in a few days.  Or try deactivating the currently active gnuradio port, cleaning any current builds, and trying again.
 
-    version             3.6.5_20130526
+    version             3.6.5_20130606
 
     conflicts           gnuradio gnuradio-next
 
     fetch.type          git
     git.url             git://git.gnuradio.org/gnuradio.git
-    git.branch          81bc81564803f00ac30ce03ee012c45b2583ad46
+    git.branch          f274d28c0115bc1b2abd75e129d4a9498544b02b
 
     depends_lib-append  port:log4cpp
 
+    patchfiles-append   patch-GL-wxgui-3.6.diff
+    patch.pre_args      -p1
+
     livecheck.url       http://gnuradio.org/cgit/gnuradio.git/log/
     livecheck.version   ${git.branch}
     livecheck.regex     id=(\[a-f0-9\]+).>HEAD<
@@ -65,16 +68,19 @@
     long_description    ${description}: \
         This port is kept up with the GNU Radio GIT 'master' branch, which is typically updated daily to weekly.  This version of GNU Radio represents the next major release of GNU Radio, and hence its API is likely to be different than that provided by either gnuradio or gnuradio-devel.  This port may or not compile or function correctly, as it represents a work in progress.  If it does not work, check back in a few days.  Or try deactivating the currently active gnuradio port, cleaning any current builds, and trying again.
 
-    version             3.7.0_20130604
+    version             3.7.0_20130606
 
     conflicts           gnuradio gnuradio-devel
 
     fetch.type          git
     git.url             git://git.gnuradio.org/gnuradio.git
-    git.branch          81cba98cb1a3adec261aa6b510ee152c3a24bb0d
+    git.branch          5ca7c447f21967df18623937c0d3a4951b699ca1
 
     depends_lib-append  port:log4cpp
 
+    patchfiles-append   patch-GL-wxgui-3.7.diff
+    patch.pre_args      -p1
+
     variant ctrlport description {Enable control port enhancements (EXPERIMENTAL)} {}
 
     if {[variant_isset ctrlport]} {

Added: trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.6.diff
===================================================================
--- trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.6.diff	                        (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.6.diff	2013-06-07 02:57:30 UTC (rev 106742)
@@ -0,0 +1,99 @@
+commit 5f0aaf3d5397675d6f87acd7ab20526ac1fb0d4e
+Author: Balint Seeber <balint at ettus.com>
+Date:   Thu Apr 11 19:49:46 2013 -0700
+
+    wxgui: Fixes to solve issues using GL sinks on OS X
+    plotter/plotter_base.py: Create explicit OpenGL context, check if window is shown before realising context & only create PaintDC is paint triggered by WM message (OS paint event)
+    Added SetSizeHints to WX sink windows so sizing occurs correctly
+
+diff --git a/gr-wxgui/src/python/const_window.py b/gr-wxgui/src/python/const_window.py
+index 2ad89b2..a7ff2e5 100644
+--- a/gr-wxgui/src/python/const_window.py
++++ b/gr-wxgui/src/python/const_window.py
+@@ -150,6 +150,7 @@ class const_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.channel_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.set_x_label('Inphase')
+ 		self.plotter.set_y_label('Quadrature')
+diff --git a/gr-wxgui/src/python/fft_window.py b/gr-wxgui/src/python/fft_window.py
+index fac83a4..cf21b89 100644
+--- a/gr-wxgui/src/python/fft_window.py
++++ b/gr-wxgui/src/python/fft_window.py
+@@ -274,6 +274,7 @@ class fft_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.channel_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_legend(True)
+ 		self.plotter.enable_point_label(True)
+diff --git a/gr-wxgui/src/python/histo_window.py b/gr-wxgui/src/python/histo_window.py
+index a1b520f..e87e978 100644
+--- a/gr-wxgui/src/python/histo_window.py
++++ b/gr-wxgui/src/python/histo_window.py
+@@ -117,6 +117,7 @@ class histo_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.bar_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_point_label(True)
+ 		self.plotter.enable_grid_lines(False)
+diff --git a/gr-wxgui/src/python/plotter/plotter_base.py b/gr-wxgui/src/python/plotter/plotter_base.py
+index b8a2ce7..6d94634 100644
+--- a/gr-wxgui/src/python/plotter/plotter_base.py
++++ b/gr-wxgui/src/python/plotter/plotter_base.py
+@@ -87,7 +87,8 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
+ 		@param parent the parent widgit
+ 		"""
+ 		attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA)
+-		wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList);
++		wx.glcanvas.GLCanvas.__init__(self, parent, wx.ID_ANY, attribList);	# Specifically use the CTOR which does NOT create an implicit GL context
++		self._gl_ctx = wx.glcanvas.GLContext(self)	# Create the explicit GL context
+ 		self.use_persistence=False
+ 		self.persist_alpha=2.0/15
+ 		self.clear_accum=True
+@@ -151,10 +152,14 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
+ 		Resize the view port if the width or height changed.
+ 		Redraw the screen, calling the draw functions.
+ 		"""
++		if not self.IsShownOnScreen():	# Cannot realise a GL context on OS X if window is not yet shown
++			return
+ 		# create device context (needed on Windows, noop on X)
+-		dc = wx.PaintDC(self)
++		dc = None
++		if event.GetEventObject():	# Only create DC if paint triggered by WM message (for OS X)
++			dc = wx.PaintDC(self)
+ 		self.lock()
+-		self.SetCurrent()
++		self.SetCurrent(self._gl_ctx)	# Real the explicit GL context
+ 
+ 		# check if gl was initialized
+ 		if not self._gl_init_flag:
+diff --git a/gr-wxgui/src/python/scope_window.py b/gr-wxgui/src/python/scope_window.py
+index dc90a60..fa79a98 100644
+--- a/gr-wxgui/src/python/scope_window.py
++++ b/gr-wxgui/src/python/scope_window.py
+@@ -492,6 +492,7 @@ class scope_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.channel_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_legend(True)
+ 		self.plotter.enable_point_label(True)
+diff --git a/gr-wxgui/src/python/waterfall_window.py b/gr-wxgui/src/python/waterfall_window.py
+index cd60104..a190899 100644
+--- a/gr-wxgui/src/python/waterfall_window.py
++++ b/gr-wxgui/src/python/waterfall_window.py
+@@ -207,6 +207,7 @@ class waterfall_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.waterfall_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_point_label(True)
+ 		self.plotter.enable_grid_lines(False)

Added: trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.7.diff
===================================================================
--- trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.7.diff	                        (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-GL-wxgui-3.7.diff	2013-06-07 02:57:30 UTC (rev 106742)
@@ -0,0 +1,99 @@
+commit 5f0aaf3d5397675d6f87acd7ab20526ac1fb0d4e
+Author: Balint Seeber <balint at ettus.com>
+Date:   Thu Apr 11 19:49:46 2013 -0700
+
+    wxgui: Fixes to solve issues using GL sinks on OS X
+    plotter/plotter_base.py: Create explicit OpenGL context, check if window is shown before realising context & only create PaintDC is paint triggered by WM message (OS paint event)
+    Added SetSizeHints to WX sink windows so sizing occurs correctly
+
+diff --git a/gr-wxgui/python/wxgui/const_window.py b/gr-wxgui/python/wxgui/const_window.py
+index 2ad89b2..a7ff2e5 100644
+--- a/gr-wxgui/python/wxgui/const_window.py
++++ b/gr-wxgui/python/wxgui/const_window.py
+@@ -150,6 +150,7 @@ class const_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.channel_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.set_x_label('Inphase')
+ 		self.plotter.set_y_label('Quadrature')
+diff --git a/gr-wxgui/python/wxgui/fft_window.py b/gr-wxgui/python/wxgui/fft_window.py
+index fac83a4..cf21b89 100644
+--- a/gr-wxgui/python/wxgui/fft_window.py
++++ b/gr-wxgui/python/wxgui/fft_window.py
+@@ -274,6 +274,7 @@ class fft_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.channel_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_legend(True)
+ 		self.plotter.enable_point_label(True)
+diff --git a/gr-wxgui/python/wxgui/histo_window.py b/gr-wxgui/python/wxgui/histo_window.py
+index a1b520f..e87e978 100644
+--- a/gr-wxgui/python/wxgui/histo_window.py
++++ b/gr-wxgui/python/wxgui/histo_window.py
+@@ -117,6 +117,7 @@ class histo_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.bar_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_point_label(True)
+ 		self.plotter.enable_grid_lines(False)
+diff --git a/gr-wxgui/python/wxgui/plotter/plotter_base.py b/gr-wxgui/python/wxgui/plotter/plotter_base.py
+index b8a2ce7..6d94634 100644
+--- a/gr-wxgui/python/wxgui/plotter/plotter_base.py
++++ b/gr-wxgui/python/wxgui/plotter/plotter_base.py
+@@ -87,7 +87,8 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
+ 		@param parent the parent widgit
+ 		"""
+ 		attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA)
+-		wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList);
++		wx.glcanvas.GLCanvas.__init__(self, parent, wx.ID_ANY, attribList);	# Specifically use the CTOR which does NOT create an implicit GL context
++		self._gl_ctx = wx.glcanvas.GLContext(self)	# Create the explicit GL context
+ 		self.use_persistence=False
+ 		self.persist_alpha=2.0/15
+ 		self.clear_accum=True
+@@ -151,10 +152,14 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
+ 		Resize the view port if the width or height changed.
+ 		Redraw the screen, calling the draw functions.
+ 		"""
++		if not self.IsShownOnScreen():	# Cannot realise a GL context on OS X if window is not yet shown
++			return
+ 		# create device context (needed on Windows, noop on X)
+-		dc = wx.PaintDC(self)
++		dc = None
++		if event.GetEventObject():	# Only create DC if paint triggered by WM message (for OS X)
++			dc = wx.PaintDC(self)
+ 		self.lock()
+-		self.SetCurrent()
++		self.SetCurrent(self._gl_ctx)	# Real the explicit GL context
+ 
+ 		# check if gl was initialized
+ 		if not self._gl_init_flag:
+diff --git a/gr-wxgui/python/wxgui/scope_window.py b/gr-wxgui/python/wxgui/scope_window.py
+index dc90a60..fa79a98 100644
+--- a/gr-wxgui/python/wxgui/scope_window.py
++++ b/gr-wxgui/python/wxgui/scope_window.py
+@@ -492,6 +492,7 @@ class scope_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.channel_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_legend(True)
+ 		self.plotter.enable_point_label(True)
+diff --git a/gr-wxgui/python/wxgui/waterfall_window.py b/gr-wxgui/python/wxgui/waterfall_window.py
+index cd60104..a190899 100644
+--- a/gr-wxgui/python/wxgui/waterfall_window.py
++++ b/gr-wxgui/python/wxgui/waterfall_window.py
+@@ -207,6 +207,7 @@ class waterfall_window(wx.Panel, pubsub.pubsub):
+ 		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
+ 		self.plotter = plotter.waterfall_plotter(self)
+ 		self.plotter.SetSize(wx.Size(*size))
++		self.plotter.SetSizeHints(*size)
+ 		self.plotter.set_title(title)
+ 		self.plotter.enable_point_label(True)
+ 		self.plotter.enable_grid_lines(False)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130606/ceeff04e/attachment.html>


More information about the macports-changes mailing list