Revision
118227
Author
michaelld@macports.org
Date
2014-03-26 11:11:47 -0700 (Wed, 26 Mar 2014)

Log Message

gnuradio: for 3.7 API (non-legacy), add a non-default variant to enable performance counter support.  Works for me in testing, but is not ready for prime time yet.

Modified Paths

Diff

Modified: trunk/dports/science/gnuradio/Portfile (118226 => 118227)


--- trunk/dports/science/gnuradio/Portfile	2014-03-26 18:03:29 UTC (rev 118226)
+++ trunk/dports/science/gnuradio/Portfile	2014-03-26 18:11:47 UTC (rev 118227)
@@ -146,6 +146,20 @@
 
     }
 
+    variant performance_counters description {Enable support for performance counters (EXPERIMENTAL)} {}
+
+    if {[variant_isset performance_counters]} {
+
+        configure.args-append \
+            -DENABLE_PERFORMANCE_COUNTERS=ON
+
+    } else {
+
+        configure.args-append \
+            -DENABLE_PERFORMANCE_COUNTERS=OFF
+
+    }
+
     if {${subport} ne "gnuradio"} {
 
         # patches for devel and next (which are kept aligned for now)
@@ -224,7 +238,7 @@
 default_variants -full
 
 # per user concensus: enable all variants except +debug and +universal
-# (and, for next, except +ctrlport);
+# (and, for next, except +ctrlport and +performance_counters);
 
 default_variants +docs +grc +qtgui +wxgui +uhd +orc +wavelet \
     +jack +portaudio +swig +sdl
@@ -329,14 +343,24 @@
             }
 
             if {[variant_exists ctrlport] && \
-                    [variant_isset ctrlport]} {
+                [variant_isset ctrlport]} {
 
                 # pyice is not checked for at configure, but is
                 # required for runtime; so use depends_run.
 
-                depends_run-append port:py${s}-zeroc-ice35
+                depends_run-append \
+                    port:py${s}-zeroc-ice35
 
             }
+
+            if {[variant_exists performance_counters] && \
+                [variant_isset performance_counters]} {
+
+                depends_run-append \
+                    port:py${s}-pygraphviz \
+                    port:py${s}-networkx
+
+            }
         }
     }]
 }