[113003] trunk/dports/science

michaelld at macports.org michaelld at macports.org
Wed Nov 6 10:50:12 PST 2013


Revision: 113003
          https://trac.macports.org/changeset/113003
Author:   michaelld at macports.org
Date:     2013-11-06 10:50:12 -0800 (Wed, 06 Nov 2013)
Log Message:
-----------
gr-fosphor: new port.

Added Paths:
-----------
    trunk/dports/science/gr-fosphor/
    trunk/dports/science/gr-fosphor/Portfile

Added: trunk/dports/science/gr-fosphor/Portfile
===================================================================
--- trunk/dports/science/gr-fosphor/Portfile	                        (rev 0)
+++ trunk/dports/science/gr-fosphor/Portfile	2013-11-06 18:50:12 UTC (rev 113003)
@@ -0,0 +1,148 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           cmake 1.0
+PortGroup           wxWidgets 1.0
+PortGroup           active_variants 1.1
+
+wxWidgets.use       wxPython-3.0
+
+name                gr-fosphor
+maintainers         michaelld openmaintainer
+
+categories          science comms
+homepage            http://sdr.osmocom.org/trac/wiki/fosphor
+license             GPL-3
+platforms           darwin macosx
+
+description         gr-fosphor provides a GNU Radio block for RTSA-like spectrum visualization using GPU acceleration.
+
+long_description    ${description}  \
+    This port is kept up with the gr-fosphor GIT 'master' branch, which is typically updated weekly to monthly, providing compatibility with GNU Radio release 3.7 API: the gnuradio and gnuradio-devel ports.
+
+version             20131106
+
+fetch.type          git
+git.url             git://git.osmocom.org/gr-fosphor
+git.branch          dfb5081b914f0589039a7bb2c5630507601e0199
+
+depends_lib-append \
+    port:boost \
+    port:cppunit \
+    port:freetype \
+    port:glfw \
+    port:qt4-mac \
+    port:swig-python \
+    port:${wxWidgets.port}
+
+depends_build-append \
+    port:pkgconfig \
+    port:doxygen
+
+# do VPATH build
+
+set vpath           ${workpath}/build
+pre-configure       { file mkdir ${vpath} }
+configure.dir       ${vpath}
+build.dir           ${vpath}
+
+# set last configure argument to the reletive path
+# to the top-level cmake source
+
+configure.post_args ../${worksrcdir}
+
+# remove top-level include path, such that internal headers are used
+# instead of any already-installed ones.
+
+configure.cppflags-delete -I${prefix}/include
+configure.cflags-delete -I${prefix}/include
+configure.cxxflags-delete -I${prefix}/include
+
+# remove top-level library path, such that internal libraries are used
+# instead of any already-installed ones.
+
+configure.ldflags-delete -L${prefix}/lib
+
+# be verbose when building, for debugging purposes
+
+build.post_args VERBOSE=1
+
+# set Python variants
+
+set pythons_suffixes {26 27}
+global chosen_python_suffix
+set chosen_python_suffix ""
+
+set pythons_ports {}
+foreach s ${pythons_suffixes} {
+    lappend pythons_ports python${s}
+}
+
+foreach s ${pythons_suffixes} {
+    set p python${s}
+    set v [join [split ${s} ""] "."]
+    set i [lsearch -exact ${pythons_ports} ${p}]
+    set c [lreplace ${pythons_ports} ${i} ${i}]
+    eval [subst {
+        variant ${p} description "Build ${name} using Python ${v}" \
+            conflicts ${c} {
+
+            set chosen_python_suffix ${s}
+
+            # specify the Python dependencies
+
+            depends_lib-append \
+                port:${p}
+
+            depends_run-append \
+                port:py${s}-wxpython-3.0
+
+            # specify the Python version to use
+
+            configure.args-append \
+                -DPYTHON_EXECUTABLE=${prefix}/bin/python${v} \
+                -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/${v}/Headers \
+                -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/${v}/Python \
+                -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}/site-packages
+
+        }
+    }]
+}
+
+# Python is required; default to 2.7
+
+if {![variant_isset python26] && ![variant_isset python27]} {
+    default_variants +python27
+}
+
+# Make sure -python27 was not specified alone
+
+if {![variant_isset python26] && ![variant_isset python27]} {
+    ui_error "This port requires a Python to be selected; you cannot use -python27 as a variant alone."
+    return -code error "Invalid variant selection"
+}
+
+# allow gr-osmosdr 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-osmosdr 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-osmosdr 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"
+    }
+}
+
+livecheck.url       http://cgit.osmocom.org/gr-fosphor/log/?h=master
+livecheck.version   ${git.branch}
+livecheck.regex     id=(\[a-f0-9\]+).*>HEAD<


Property changes on: trunk/dports/science/gr-fosphor/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131106/2e18992c/attachment.html>


More information about the macports-changes mailing list