[134249] trunk/dports/science
michaelld at macports.org
michaelld at macports.org
Fri Mar 20 08:30:02 PDT 2015
Revision: 134249
https://trac.macports.org/changeset/134249
Author: michaelld at macports.org
Date: 2015-03-20 08:30:02 -0700 (Fri, 20 Mar 2015)
Log Message:
-----------
gr-ieee802-11: new port.
Added Paths:
-----------
trunk/dports/science/gr-ieee802-11/
trunk/dports/science/gr-ieee802-11/Portfile
trunk/dports/science/gr-ieee802-11/files/
trunk/dports/science/gr-ieee802-11/files/patch-logging.diff
Added: trunk/dports/science/gr-ieee802-11/Portfile
===================================================================
--- trunk/dports/science/gr-ieee802-11/Portfile (rev 0)
+++ trunk/dports/science/gr-ieee802-11/Portfile 2015-03-20 15:30:02 UTC (rev 134249)
@@ -0,0 +1,98 @@
+# -*- 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-11 7805bae220ec4a05d8e31ef848464d6a93b0de18
+version 20141009
+checksums rmd160 65aa2726987e9e4cff450538c678eb568cb50ddf \
+ sha256 39a456b5bf64711e23c4739c2371ed2d5c26693456cf4514ccdef36898954a07
+
+# allow gr-ieee802-11 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-11 does not work with gnuradio-legacy
+ ui_msg "\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"
+ return -code error "Invalid port dependency: gnuradio-legacy"
+ }
+ if {![catch {set installed [lindex [registry_active gnuradio-next] 0]}]} {
+ # gnuradio-next is installed; this version of gr-ieee802-11 does not work with gnuradio-next
+ ui_msg "\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"
+ return -code error "Invalid port dependency: gnuradio-next"
+ }
+}
+
+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 port:itpp
+
+# do VPATH (out of source tree) build
+
+cmake.out_of_source yes
+
+# fix logging
+
+patchfiles-append patch-logging.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 "s/c++0x/c++11/" ${worksrcpath}/CMakeLists.txt
+}
+
+if {${configure.cxx_stdlib} eq "libstdc++"} {
+
+ # *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 < 500}
+
+}
Property changes on: trunk/dports/science/gr-ieee802-11/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/science/gr-ieee802-11/files/patch-logging.diff
===================================================================
--- trunk/dports/science/gr-ieee802-11/files/patch-logging.diff (rev 0)
+++ trunk/dports/science/gr-ieee802-11/files/patch-logging.diff 2015-03-20 15:30:02 UTC (rev 134249)
@@ -0,0 +1,97 @@
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -98,6 +98,13 @@ if(NOT ITPP_FOUND)
+ endif()
+
+ ########################################################################
++# Setup logging options
++########################################################################
++
++include(GrMiscUtils)
++GR_LOGGING()
++
++########################################################################
+ # On Apple only, set install name and use rpath correctly, if not already set
+ ########################################################################
+ if(APPLE)
+@@ -128,12 +135,14 @@ include_directories(
+ ${CPPUNIT_INCLUDE_DIRS}
+ ${ITPP_INCLUDE_DIR}
+ ${GNURADIO_RUNTIME_INCLUDE_DIRS}
++ ${LOG4CPP_INCLUDE_DIRS}
+ )
+
+ link_directories(
+ ${Boost_LIBRARY_DIRS}
+ ${CPPUNIT_LIBRARY_DIRS}
+ ${GNURADIO_RUNTIME_LIBRARY_DIRS}
++ ${LOG4CPP_LIBRARY_DIRS}
+ )
+
+ ########################################################################
+--- /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 "" FORCE)
++ set(LOG4CPP_INCLUDE_DIRS ${LOG4CPP_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
++else ()
++ set(LOG4CPP_FOUND FALSE CACHE INTERNAL "" FORCE)
++ set(LOG4CPP_LIBRARY "" CACHE INTERNAL "" FORCE)
++ set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
++ set(LOG4CPP_INCLUDE_DIR "" CACHE INTERNAL "" FORCE)
++ set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
++endif ()
++
++if (LOG4CPP_FOUND)
++ if (NOT LOG4CPP_FIND_QUIETLY)
++ message(STATUS "Found LOG4CPP: ${LOG4CPP_LIBRARIES}")
++ endif ()
++else ()
++ if (LOG4CPP_FIND_REQUIRED)
++ message(STATUS "Looked for LOG4CPP libraries named ${LOG4CPPS_NAMES}.")
++ message(FATAL_ERROR "Could NOT find LOG4CPP library")
++ endif ()
++endif ()
++
++mark_as_advanced(
++ LOG4CPP_LIBRARIES
++ LOG4CPP_INCLUDE_DIRS
++)
+--- lib/CMakeLists.txt.orig
++++ lib/CMakeLists.txt
+@@ -114,6 +114,7 @@ list(APPEND gr_ieee802_11_libs
+ ${Boost_LIBRARIES}
+ ${GNURADIO_ALL_LIBRARIES}
+ ${ITPP_LIBRARIES}
++ ${LOG4CPP_LIBRARIES}
+ )
+
+ add_library(gnuradio-ieee802_11 SHARED ${gr_ieee802_11_sources})
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150320/9d7f5b98/attachment-0001.html>
More information about the macports-changes
mailing list