<!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>[134251] trunk/dports/science</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/134251">134251</a></dd>
<dt>Author</dt> <dd>michaelld@macports.org</dd>
<dt>Date</dt> <dd>2015-03-20 09:31:42 -0700 (Fri, 20 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>gr-ieee802-15-4: new port.</pre>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/science/gr-ieee802-15-4/</li>
<li><a href="#trunkdportssciencegrieee802154Portfile">trunk/dports/science/gr-ieee802-15-4/Portfile</a></li>
<li>trunk/dports/science/gr-ieee802-15-4/files/</li>
<li><a href="#trunkdportssciencegrieee802154filespatchvariousdiff">trunk/dports/science/gr-ieee802-15-4/files/patch-various.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportssciencegrieee802154Portfile"></a>
<div class="addfile"><h4>Added: trunk/dports/science/gr-ieee802-15-4/Portfile (0 => 134251)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/gr-ieee802-15-4/Portfile                                (rev 0)
+++ trunk/dports/science/gr-ieee802-15-4/Portfile        2015-03-20 16:31:42 UTC (rev 134251)
</span><span class="lines">@@ -0,0 +1,98 @@
</span><ins>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           cmake 1.0
+PortGroup           github 1.0
+PortGroup           active_variants 1.1
+
+github.setup        bastibl gr-ieee802-15-4 985b5ec8d3fc0dcbe3b5d2d02e65e7a14a323079
+version             20150320
+checksums           rmd160 82a5411a12f087efbe20919f2d78ddab145e3750 \
+                    sha256 5516d5a02de9af5c6e4d62cbefb28f8236e657e3b841f5ccb36ce3ecbccccb76
+
+# allow gr-ieee802-15-4 to work with both gnuradio and gnuradio-devel ...
+
+depends_lib-append  path:lib/libgnuradio-runtime.dylib:gnuradio
+
+# ... but not with gnuradio-legacy or gnuradio-next
+
+pre-fetch {
+    if {![catch {set installed [lindex [registry_active gnuradio-legacy] 0]}]} {
+        # gnuradio-legacy is installed; this version of gr-ieee802-15-4 does not work with gnuradio-legacy
+        ui_msg &quot;\nError: ${name} requires the gnuradio or gnuradio-devel port, and will not work with the gnuradio-legacy port.  deactivate gnuradio-legacy, and then install or activate gnuradio or gnuradio-devel.\n&quot;
+        return -code error &quot;Invalid port dependency: gnuradio-legacy&quot;
+    }
+    if {![catch {set installed [lindex [registry_active gnuradio-next] 0]}]} {
+        # gnuradio-next is installed; this version of gr-ieee802-15-4 does not work with gnuradio-next
+        ui_msg &quot;\nError: ${name} requires the gnuradio or gnuradio-devel port, and will not work with the gnuradio-next port.  deactivate gnuradio-next, and then install or activate gnuradio or gnuradio-devel.\n&quot;
+            return -code error &quot;Invalid port dependency: gnuradio-next&quot;
+    }
+}
+
+categories          science comms
+maintainers         michaelld openmaintainer
+description         Provides augmented functionality (blocks, GRC definitions, apps, etc) for GNU Radio.
+long_description    ${description}
+license             GPL-3
+platforms           darwin
+
+depends_build-append port:pkgconfig
+depends_lib-append        port:boost
+
+# do VPATH (out of source tree) build
+
+cmake.out_of_source yes
+
+# fix logging, Volk, and C++11
+
+patchfiles-append   patch-various.diff
+
+# remove top-level library path, such that internal libraries are used
+# instead of any already-installed ones.
+
+configure.ldflags-delete -L${prefix}/lib
+
+# specify the Python dependencies
+
+depends_lib-append port:python27
+
+# specify that Python version to use
+
+configure.args-append \
+    -DPYTHON_EXECUTABLE=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 \
+    -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Headers \
+    -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Python \
+    -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
+
+# require c++11
+
+#post-patch {
+#    reinplace &quot;s/c++0x/c++11/&quot; ${worksrcpath}/CMakeLists.txt
+#}
+
+if {${configure.cxx_stdlib} eq &quot;libstdc++&quot;} {
+
+    # *clang* when using libstdc++ do not seem to support C++11;
+    # C++11 support seems to need GCC 4.7+ when using libstdc++;
+    # could use C++0x support on GCC4.[56], but just ignore it since
+    # there are newer compilers already in place as defaults.
+
+    # Blacklist GCC compilers not supporting C++11 and all CLANG.
+    # This is probably not necessary, but it's good practice.
+
+    compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
+
+    # and whitelist those we do want to use. wish there were a better way.
+    # these will be used in the order provided.
+
+    compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
+
+} else {
+
+    # using libc++;
+    # Blacklist Clang not supporting C++11 in some form and all GCC.
+
+    compiler.blacklist-append *gcc* {clang &lt; 500}
+
+}
</ins><span class="cx">Property changes on: trunk/dports/science/gr-ieee802-15-4/Portfile
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdportssciencegrieee802154filespatchvariousdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/science/gr-ieee802-15-4/files/patch-various.diff (0 => 134251)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/gr-ieee802-15-4/files/patch-various.diff                                (rev 0)
+++ trunk/dports/science/gr-ieee802-15-4/files/patch-various.diff        2015-03-20 16:31:42 UTC (rev 134251)
</span><span class="lines">@@ -0,0 +1,121 @@
</span><ins>+--- /dev/null
++++ cmake/Modules/FindLog4cpp.cmake
+@@ -0,0 +1,53 @@
++# - Find Log4cpp
++# Find the native LOG4CPP includes and library
++#
++#  LOG4CPP_INCLUDE_DIR - where to find LOG4CPP.h, etc.
++#  LOG4CPP_LIBRARIES   - List of libraries when using LOG4CPP.
++#  LOG4CPP_FOUND       - True if LOG4CPP found.
++
++
++if (LOG4CPP_INCLUDE_DIR)
++  # Already in cache, be silent
++  set(LOG4CPP_FIND_QUIETLY TRUE)
++endif ()
++
++find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh
++  /opt/local/include
++  /usr/local/include
++  /usr/include
++)
++
++set(LOG4CPP_NAMES log4cpp)
++find_library(LOG4CPP_LIBRARY
++  NAMES ${LOG4CPP_NAMES}
++  PATHS /usr/lib /usr/local/lib /opt/local/lib
++)
++
++
++if (LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)
++  set(LOG4CPP_FOUND TRUE)
++  set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY} CACHE INTERNAL &quot;&quot; FORCE)
++  set(LOG4CPP_INCLUDE_DIRS ${LOG4CPP_INCLUDE_DIR} CACHE INTERNAL &quot;&quot; FORCE)
++else ()
++  set(LOG4CPP_FOUND FALSE CACHE INTERNAL &quot;&quot; FORCE)
++  set(LOG4CPP_LIBRARY &quot;&quot; CACHE INTERNAL &quot;&quot; FORCE)
++  set(LOG4CPP_LIBRARIES &quot;&quot; CACHE INTERNAL &quot;&quot; FORCE)
++  set(LOG4CPP_INCLUDE_DIR &quot;&quot; CACHE INTERNAL &quot;&quot; FORCE)
++  set(LOG4CPP_INCLUDE_DIRS &quot;&quot; CACHE INTERNAL &quot;&quot; FORCE)
++endif ()
++
++if (LOG4CPP_FOUND)
++  if (NOT LOG4CPP_FIND_QUIETLY)
++    message(STATUS &quot;Found LOG4CPP: ${LOG4CPP_LIBRARIES}&quot;)
++  endif ()
++else ()
++  if (LOG4CPP_FIND_REQUIRED)
++    message(STATUS &quot;Looked for LOG4CPP libraries named ${LOG4CPPS_NAMES}.&quot;)
++    message(FATAL_ERROR &quot;Could NOT find LOG4CPP library&quot;)
++  endif ()
++endif ()
++
++mark_as_advanced(
++  LOG4CPP_LIBRARIES
++  LOG4CPP_INCLUDE_DIRS
++)
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -37,7 +37,7 @@
+ if(NOT WIN32)
+     #http://gcc.gnu.org/wiki/Visibility
+     add_definitions(-fvisibility=hidden)
+-    add_definitions(-std=c++0x)
++    add_definitions(-std=c++11)
+ endif()

+ ########################################################################
+@@ -85,6 +85,7 @@
+ find_package(Gnuradio)
+ find_package(CppUnit)
+ find_package(PythonLibs 2)
++find_package(Volk)

+ if(NOT GNURADIO_RUNTIME_FOUND)
+     message(FATAL_ERROR &quot;GnuRadio Runtime required to compile ieee802_15_4&quot;)
+@@ -98,6 +99,17 @@
+     message(FATAL_ERROR &quot;Python required to compile ieee802_15_4&quot;)
+ endif()

++if(NOT VOLK_FOUND)
++    message(FATAL_ERROR &quot;Volk required to compile ieee802_15_4&quot;)
++endif()
++
++########################################################################
++# Setup logging options
++########################################################################
++
++include(GrMiscUtils)
++GR_LOGGING()
++
+ ########################################################################
+ # On Apple only, set install name and use rpath correctly, if not already set
+ ########################################################################
+@@ -126,12 +138,16 @@
+     ${Boost_INCLUDE_DIRS}
+     ${CPPUNIT_INCLUDE_DIRS}
+     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
++    ${VOLK_INCLUDE_DIRS}
++    ${LOG4CPP_INCLUDE_DIRS}
+ )

+ link_directories(
+     ${Boost_LIBRARY_DIRS}
+     ${CPPUNIT_LIBRARY_DIRS}
+     ${GNURADIO_RUNTIME_LIBRARY_DIRS}
++    ${VOLK_LIBRARY_DIRS}
++    ${LOG4CPP_LIBRARY_DIRS}
+ )

+ set(GR_IEEE802_15_4_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL &quot;&quot; FORCE)
+--- lib/CMakeLists.txt.orig
++++ lib/CMakeLists.txt
+@@ -55,6 +55,8 @@
+ list(APPEND ieee802_15_4_libs
+     ${Boost_LIBRARIES}
+     ${GNURADIO_ALL_LIBRARIES}
++    ${VOLK_LIBRARIES}
++    ${LOG4CPP_LIBRARIES}
+ )

+ add_library(gnuradio-ieee802_15_4 SHARED ${ieee802_15_4_sources})
</ins></span></pre>
</div>
</div>

</body>
</html>