<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[134164] trunk/dports/science/gnuradio</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/134164">134164</a></dd>
<dt>Author</dt> <dd>michaelld@macports.org</dd>
<dt>Date</dt> <dd>2015-03-19 09:13:59 -0700 (Thu, 19 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>gnuradio:
+ move to using cmake.out_of_source;
+ add temporary patch for various bugs and warnings, for devel and next.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportssciencegnuradioPortfile">trunk/dports/science/gnuradio/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportssciencegnuradiofilespatchvariousdiff">trunk/dports/science/gnuradio/files/patch-various.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportssciencegnuradioPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/science/gnuradio/Portfile (134163 => 134164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/gnuradio/Portfile        2015-03-19 16:06:54 UTC (rev 134163)
+++ trunk/dports/science/gnuradio/Portfile        2015-03-19 16:13:59 UTC (rev 134164)
</span><span class="lines">@@ -92,6 +92,7 @@
</span><span class="cx">     name                gnuradio-devel
</span><span class="cx">     github.setup        gnuradio gnuradio 892629a3f7624029cd8e7b1555c52adc4177db13
</span><span class="cx">     version             20150313
</span><ins>+    revision            1
</ins><span class="cx"> 
</span><span class="cx">     conflicts           gnuradio-legacy gnuradio gnuradio-next
</span><span class="cx"> 
</span><span class="lines">@@ -109,6 +110,7 @@
</span><span class="cx">     name                gnuradio-next
</span><span class="cx">     github.setup        gnuradio gnuradio f4f47c1c7cd4db7aab116ce76d616f02c7c42a4b
</span><span class="cx">     version             20150313
</span><ins>+    revision            1
</ins><span class="cx"> 
</span><span class="cx">     conflicts           gnuradio-legacy gnuradio gnuradio-devel
</span><span class="cx"> 
</span><span class="lines">@@ -149,6 +151,9 @@
</span><span class="cx">         patchfiles-append \
</span><span class="cx">             patch-cmake-expand.devel.diff
</span><span class="cx"> 
</span><ins>+        # temporary misc patches for warnings and some bug fixes
+        patchfiles-append \
+            patch-various.diff
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # 3.7 API variants
</span><span class="lines">@@ -233,12 +238,9 @@
</span><span class="cx">     port:cppunit \
</span><span class="cx">     port:fftw-3-single
</span><span class="cx"> 
</span><del>-# do VPATH build
</del><ins>+# do VPATH (out of source tree) build
</ins><span class="cx"> 
</span><del>-set vpath           ${workpath}/build
-pre-configure       { file mkdir ${vpath} }
-configure.dir       ${vpath}
-build.dir           ${vpath}
</del><ins>+cmake.out_of_source yes
</ins><span class="cx"> 
</span><span class="cx"> # remove top-level library path, such that internal libraries are used
</span><span class="cx"> # instead of any already-installed ones.
</span></span></pre></div>
<a id="trunkdportssciencegnuradiofilespatchvariousdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/science/gnuradio/files/patch-various.diff (0 => 134164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/gnuradio/files/patch-various.diff                                (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-various.diff        2015-03-19 16:13:59 UTC (rev 134164)
</span><span class="lines">@@ -0,0 +1,256 @@
</span><ins>+--- gr-audio/lib/osx/circular_buffer.h.orig
++++ gr-audio/lib/osx/circular_buffer.h
+@@ -199,9 +199,9 @@ public:
+       n_now_I = bufLen_I;
+     else if (n_now_I &lt; bufLen_I)
+       n_start_I = bufLen_I - n_now_I;
+-    bcopy (buf, &amp;(d_buffer[d_writeNdx_I]), n_now_I * sizeof (T));
++    memcpy (&amp;(d_buffer[d_writeNdx_I]), buf, n_now_I * sizeof (T));
+     if (n_start_I) {
+-      bcopy (&amp;(buf[n_now_I]), d_buffer, n_start_I * sizeof (T));
++      memcpy (d_buffer, &amp;(buf[n_now_I]), n_start_I * sizeof (T));
+       d_writeNdx_I = n_start_I;
+     } else
+       d_writeNdx_I += n_now_I;
+@@ -295,9 +295,9 @@ public:
+       n_now_I = l_bufLen_I;
+     else if (n_now_I &lt; l_bufLen_I)
+       n_start_I = l_bufLen_I - n_now_I;
+-    bcopy (&amp;(d_buffer[d_readNdx_I]), buf, n_now_I * sizeof (T));
++    memcpy (buf, &amp;(d_buffer[d_readNdx_I]), n_now_I * sizeof (T));
+     if (n_start_I) {
+-      bcopy (d_buffer, &amp;(buf[n_now_I]), n_start_I * sizeof (T));
++      memcpy (&amp;(buf[n_now_I]), d_buffer, n_start_I * sizeof (T));
+       d_readNdx_I = n_start_I;
+     } else
+       d_readNdx_I += n_now_I;
+--- gr-audio/lib/osx/osx_impl.cc.orig
++++ gr-audio/lib/osx/osx_impl.cc
+@@ -42,9 +42,9 @@ operator&lt;&lt;
+ (std::ostream&amp; s,
+  const AudioStreamBasicDescription&amp; asbd)
+ {
+-  char format_id[5];
+-  *((UInt32*)format_id) = asbd.mFormatID;
+-  format_id[4] = 0;
++  char format_id[sizeof(asbd.mFormatID)+1];
++  memcpy((void*)(&amp;asbd.mFormatID), format_id, sizeof(asbd.mFormatID));
++  format_id[sizeof(asbd.mFormatID)] = 0;
+   s &lt;&lt; &quot;  Sample Rate      : &quot; &lt;&lt; asbd.mSampleRate &lt;&lt; std::endl;
+   s &lt;&lt; &quot;  Format ID        : &quot; &lt;&lt; format_id &lt;&lt; std::endl;
+   s &lt;&lt; &quot;  Format Flags     : &quot; &lt;&lt; asbd.mFormatFlags &lt;&lt; std::endl;
+@@ -166,10 +166,6 @@ find_audio_devices

+   OSStatus err = noErr;

+-  // set the default audio device id to &quot;unknown&quot;
+-
+-  AudioDeviceID d_ad_id = kAudioDeviceUnknown;
+-
+   // retrieve the size of the array of known audio device IDs

+   UInt32 prop_size = 0;
+--- gr-blocks/lib/multiply_matrix_ff_impl.cc.orig
++++ gr-blocks/lib/multiply_matrix_ff_impl.cc
+@@ -141,7 +141,7 @@ namespace gr {
+           GR_LOG_ALERT(d_logger, &quot;Invalid message to set A (wrong type).&quot;);
+           return;
+       }
+-      if (!pmt::length(A) == d_A.size()) {
++      if (pmt::length(A) != d_A.size()) {
+           GR_LOG_ALERT(d_logger, &quot;Invalid message to set A (wrong size).&quot;);
+           return;
+       }
+@@ -181,7 +181,7 @@ namespace gr {
+     void
+     multiply_matrix_ff_impl::set_tag_propagation_policy(gr::block::tag_propagation_policy_t tpp)
+     {
+-      if (tpp == TPP_SELECT_BY_MATRIX) {
++      if (((int) tpp) == TPP_SELECT_BY_MATRIX) {
+         set_tag_propagation_policy(TPP_DONT);
+         d_tag_prop_select = true;
+       } else {
+--- gr-digital/lib/glfsr.cc.orig
++++ gr-digital/lib/glfsr.cc
+@@ -59,7 +59,7 @@ namespace gr {
+       0x10000002,                // x^29 + x^2 + 1
+       0x20000029,                // x^30 + x^4 + x^1 + 1
+       0x40000004,                // x^31 + x^3 + 1
+-      0x80000057                // x^32 + x^7 + x^5 + x^3 + x^2 + x^1 + 1
++      (int) 0x80000057                // x^32 + x^7 + x^5 + x^3 + x^2 + x^1 + 1
+     };

+     glfsr::~glfsr()
+--- gr-fcd/lib/hid/hidmac.c.orig
++++ gr-fcd/lib/hid/hidmac.c
+@@ -444,7 +444,6 @@ struct hid_device_info  HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
+                 if ((vendor_id == 0x0 &amp;&amp; product_id == 0x0) ||
+                     (vendor_id == dev_vid &amp;&amp; product_id == dev_pid)) {
+                         struct hid_device_info *tmp;
+-                        size_t len;

+                             /* VID/PID match. Create the record. */
+                         tmp = malloc(sizeof(struct hid_device_info));
+@@ -462,7 +461,7 @@ struct hid_device_info  HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,

+                         /* Fill out the record */
+                         cur_dev-&gt;next = NULL;
+-                        len = make_path(dev, cbuf, sizeof(cbuf));
++                        (void) make_path(dev, cbuf, sizeof(cbuf));
+                         cur_dev-&gt;path = strdup(cbuf);

+                         /* Serial Number */
+@@ -709,10 +708,9 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path)
+         CFSetGetValues(device_set, (const void **) device_array);
+         for (i = 0; i &lt; num_devices; i++) {
+                 char cbuf[BUF_LEN];
+-                size_t len;
+                 IOHIDDeviceRef os_dev = device_array[i];

+-                len = make_path(os_dev, cbuf, sizeof(cbuf));
++                (void) make_path(os_dev, cbuf, sizeof(cbuf));
+                 if (!strcmp(cbuf, path)) {
+                         // Matched Paths. Open this Device.
+                         IOReturn ret = IOHIDDeviceOpen(os_dev, kIOHIDOptionsTypeNone);
+--- gr-filter/lib/pfb_channelizer_ccf_impl.cc.orig
++++ gr-filter/lib/pfb_channelizer_ccf_impl.cc
+@@ -61,7 +61,7 @@ namespace gr {
+       // requirement within a few significant figures.
+       const double srate = nfilts / oversample_rate;
+       const double rsrate = round(srate);
+-      if(fabsf(srate - rsrate) &gt; 0.00001)
++      if(fabs(srate - rsrate) &gt; 0.00001)
+         throw std::invalid_argument(&quot;pfb_channelizer: oversample rate must be N/i for i in [1, N]&quot;);

+       set_relative_rate(oversample_rate);
+--- gr-pager/lib/flex_modes.cc.orig
++++ gr-pager/lib/flex_modes.cc
+@@ -28,11 +28,11 @@ namespace gr {
+     const flex_mode_t
+     flex_modes[] =
+       {
+-        { 0x870C78F3, 1600, 2 },
+-        { 0xB0684F97, 1600, 4 },
+-        { 0x7B1884E7, 3200, 2 },
+-        { 0xDEA0215F, 3200, 4 },
+-        { 0x4C7CB383, 3200, 4 }
++        { (int32_t) 0x870C78F3, 1600, 2 },
++        { (int32_t) 0xB0684F97, 1600, 4 },
++        { (int32_t) 0x7B1884E7, 3200, 2 },
++        { (int32_t) 0xDEA0215F, 3200, 4 },
++        { (int32_t) 0x4C7CB383, 3200, 4 }
+       };

+     const int num_flex_modes = sizeof(flex_modes)/sizeof(flex_modes[0]);
+--- gr-qtgui/lib/SpectrumGUIClass.cc.orig
++++ gr-qtgui/lib/SpectrumGUIClass.cc
+@@ -359,15 +359,17 @@ SpectrumGUIClass::getFFTSizeIndex()
+ {
+   gr::thread::scoped_lock lock(d_mutex);
+   int fftsize = getFFTSize();
++  int rv = 0;
+   switch(fftsize) {
+-  case(1024): return 0; break;
+-  case(2048): return 1; break;
+-  case(4096): return 2; break;
+-  case(8192): return 3; break;
+-  case(16384): return 3; break;
+-  case(32768): return 3; break;
+-  default: return 0;
++  case(1024): rv = 0; break;
++  case(2048): rv = 1; break;
++  case(4096): rv = 2; break;
++  case(8192): rv = 3; break;
++  case(16384): rv = 3; break;
++  case(32768): rv = 3; break;
++  default: rv = 0; break;
+   }
++  return rv;
+ }

+ void
+--- volk/include/volk/volk_prefs.h.orig
++++ volk/include/volk/volk_prefs.h
+@@ -14,7 +14,8 @@ typedef struct volk_arch_pref
+ } volk_arch_pref_t;

+ ////////////////////////////////////////////////////////////////////////
+-// get path to volk_config profiling info
++// get path to volk_config profiling info;
++// returns \0 in the argument on failure.
+ ////////////////////////////////////////////////////////////////////////
+ VOLK_API void volk_get_config_path(char *);

+--- volk/kernels/volk/volk_32f_log2_32f.h.orig
++++ volk/kernels/volk/volk_32f_log2_32f.h
+@@ -330,3 +330,5 @@ static inline void volk_32f_log2_32f_u_sse4_1(float* bVector, const float* aVect
+ #endif /* LV_HAVE_SSE4_1 for unaligned */

+ #endif /* INCLUDED_volk_32f_log2_32f_u_H */
++
++#undef LOG_POLY_DEGREE
+--- volk/kernels/volk/volk_32f_x2_pow_32f.h.orig
++++ volk/kernels/volk/volk_32f_x2_pow_32f.h
+@@ -296,3 +296,5 @@ static inline void volk_32f_x2_pow_32f_u_sse4_1(float* cVector, const float* bVe
+ #endif /* LV_HAVE_SSE4_1 for unaligned */

+ #endif /* INCLUDED_volk_32f_x2_log2_32f_u_H */
++
++#undef LOG_POLY_DEGREE
+--- volk/kernels/volk/volk_64u_popcnt.h.orig
++++ volk/kernels/volk/volk_64u_popcnt.h
+@@ -36,7 +36,7 @@ static inline void volk_64u_popcnt_generic(uint64_t* ret, const uint64_t value)

+   // This is faster than a lookup table
+   //uint32_t retVal = valueVector[0];
+-  uint32_t retVal = (uint32_t)(value &amp; 0x00000000FFFFFFFF);
++  uint32_t retVal = (uint32_t)(value &amp; 0x00000000FFFFFFFFull);

+   retVal = (retVal &amp; 0x55555555) + (retVal &gt;&gt; 1 &amp; 0x55555555);
+   retVal = (retVal &amp; 0x33333333) + (retVal &gt;&gt; 2 &amp; 0x33333333);
+@@ -46,7 +46,7 @@ static inline void volk_64u_popcnt_generic(uint64_t* ret, const uint64_t value)
+   uint64_t retVal64  = retVal;

+   //retVal = valueVector[1];
+-  retVal = (uint32_t)((value &amp; 0xFFFFFFFF00000000) &gt;&gt; 31);
++  retVal = (uint32_t)((value &amp; 0xFFFFFFFF00000000ull) &gt;&gt; 31);
+   retVal = (retVal &amp; 0x55555555) + (retVal &gt;&gt; 1 &amp; 0x55555555);
+   retVal = (retVal &amp; 0x33333333) + (retVal &gt;&gt; 2 &amp; 0x33333333);
+   retVal = (retVal + (retVal &gt;&gt; 4)) &amp; 0x0F0F0F0F;
+--- volk/lib/qa_utils.cc.orig
++++ volk/lib/qa_utils.cc
+@@ -295,7 +295,7 @@ bool icompare(t *in1, t *in2, unsigned int vlen, unsigned int tol) {
+     bool fail = false;
+     int print_max_errs = 10;
+     for(unsigned int i=0; i&lt;vlen; i++) {
+-        if(abs(int(((t *)(in1))[i]) - int(((t *)(in2))[i])) &gt; tol) {
++      if(((unsigned int)abs(int(((t *)(in1))[i]) - int(((t *)(in2))[i]))) &gt; tol) {
+             fail=true;
+             if(print_max_errs-- &gt; 0) {
+                 std::cout &lt;&lt; &quot;offset &quot; &lt;&lt; i &lt;&lt; &quot; in1: &quot; &lt;&lt; static_cast&lt;int&gt;(t(((t *)(in1))[i])) &lt;&lt; &quot; in2: &quot; &lt;&lt; static_cast&lt;int&gt;(t(((t *)(in2))[i])) &lt;&lt; std::endl;
+--- volk/lib/volk_prefs.c.orig
++++ volk/lib/volk_prefs.c
+@@ -9,12 +9,13 @@

+ void volk_get_config_path(char *path)
+ {
++    if (!path) return;
+     const char *suffix = &quot;/.volk/volk_config&quot;;
+     char *home = NULL;
+     if (home == NULL) home = getenv(&quot;HOME&quot;);
+     if (home == NULL) home = getenv(&quot;APPDATA&quot;);
+     if (home == NULL){
+-        path = NULL;
++        path[0] = 0;
+         return;
+     }
+     strcpy(path, home);
+@@ -30,7 +31,7 @@ size_t volk_load_preferences(volk_arch_pref_t **prefs_res)

+     //get the config path
+     volk_get_config_path(path);
+-    if (path == NULL) return n_arch_prefs; //no prefs found
++    if (!path[0]) return n_arch_prefs; //no prefs found
+     config_file = fopen(path, &quot;r&quot;);
+     if(!config_file) return n_arch_prefs; //no prefs found

</ins></span></pre>
</div>
</div>

</body>
</html>