[109181] trunk/dports/science

michaelld at macports.org michaelld at macports.org
Fri Aug 9 06:53:14 PDT 2013


Revision: 109181
          https://trac.macports.org/changeset/109181
Author:   michaelld at macports.org
Date:     2013-08-09 06:53:14 -0700 (Fri, 09 Aug 2013)
Log Message:
-----------
gqrx: initial checkin, version 2.2.0 + legacy + devel.

Added Paths:
-----------
    trunk/dports/science/gqrx/
    trunk/dports/science/gqrx/Portfile
    trunk/dports/science/gqrx/files/
    trunk/dports/science/gqrx/files/patch-gqrx.pro-devel.diff
    trunk/dports/science/gqrx/files/patch-gqrx.pro-legacy.diff
    trunk/dports/science/gqrx/files/patch-gqrx.pro.diff

Added: trunk/dports/science/gqrx/Portfile
===================================================================
--- trunk/dports/science/gqrx/Portfile	                        (rev 0)
+++ trunk/dports/science/gqrx/Portfile	2013-08-09 13:53:14 UTC (rev 109181)
@@ -0,0 +1,153 @@
+# -*- 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           qmake 1.0
+PortGroup           active_variants 1.1
+PortGroup           github 1.0
+
+name                gqrx
+maintainers         michaelld openmaintainer
+
+description         Gqrx is a software defined radio (SDR) receiver using GNU Radio and Qt4.
+
+categories          science comms
+homepage            http://gqrx.dk/
+license             GPL-3 BSD
+platforms           darwin macosx
+
+set description_common {Gqrx is a software defined radio receiver for Funcube Dongle (FCD), RTL2832U-based DVB-T devices (RTL-SDR), Universal Software Radio Peripherals (USRP) and Osmo SDR devices.  Gqrx is powered by GNU Radio and the Qt GUI toolkit.  Gqrx is free and open source software and anyone is invited to hack the source code to suit their needs.}
+
+configure.post_args gqrx.pro
+
+post-patch {
+
+    # set install location
+
+    reinplace "s|@APPSDIR@|${qt_apps_dir}|g" ${worksrcpath}/gqrx.pro
+
+    # set version
+
+    reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/gqrx.pro
+
+    # set arch type(s)
+
+    reinplace "s|@ARCHES@|${qt_arch_types}|g" ${worksrcpath}/gqrx.pro
+
+}
+
+post-destroot {
+
+    # link the executable back to $qt_bins_dir
+
+    ln -s ${qt_apps_dir}/Gqrx.app/Contents/MacOS/Gqrx \
+        ${destroot}${qt_bins_dir}
+
+}
+
+if {${subport} == ${name}} {
+
+    long_description    ${description}  \
+        This port is kept up with the Gqrx 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.  ${description_common}
+
+    set full_commit     796ca0b077ef864185dc1ebf475dbbd2ed317a1a
+    github.setup        csete gqrx [string range ${full_commit} 0 7]
+
+    version             2.2.0
+
+    checksums           rmd160  e832f384f2760ed23d4d640adb288130a5e3af80 \
+                        sha256  9612e8e421613078c2ce4dbec7b9b05e47a2be45df704ac0dbf899651860718c
+
+    conflicts           gqrx-legacy gqrx-devel
+
+    patchfiles          patch-gqrx.pro.diff
+
+}
+
+subport gqrx-devel {
+
+    long_description    ${description}  \
+        This port is kept up with the Gqrx 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.  ${description_common}
+
+    set full_commit     796ca0b077ef864185dc1ebf475dbbd2ed317a1a
+    github.setup        csete gqrx [string range ${full_commit} 0 7]
+
+    # fix port name set by github PortGroup
+
+    name                gqrx-devel
+
+    version             2.2.1_20130808
+
+    checksums           rmd160  e832f384f2760ed23d4d640adb288130a5e3af80 \
+                        sha256  9612e8e421613078c2ce4dbec7b9b05e47a2be45df704ac0dbf899651860718c
+
+    conflicts           gqrx-legacy gqrx
+
+    patchfiles          patch-gqrx.pro.devel.diff
+
+}
+
+subport gqrx-legacy {
+
+    long_description    ${description}  \
+        This port is for the last Gqrx commit providing compatibility with GNU Radio release 3.6 API: the gnuradio-legacy port.  ${description_common}
+
+    github.setup        csete gqrx 90ea4cfd
+
+    # fix port name set by github PortGroup
+
+    name                gqrx-legacy
+
+    version             2.0_20130703
+
+    checksums           rmd160  eba005dfad221997a7d80a8d8cd132cfea209667 \
+                        sha256  83403f9d2c05d10a8d8df76a4282c41b9d3547ceccaebecc92c1d3f0835a6f59
+
+    conflicts           gqrx gqrx-devel
+
+    # gqrx-legacy works with *-legacy only
+
+    depends_lib-append  port:gnuradio-legacy \
+                        port:gr-osmosdr-legacy
+
+    patchfiles          patch-gqrx.pro-legacy.diff
+
+    # no version checking for now
+
+    livecheck.type      none
+
+}
+
+if {${subport} != "gqrx-legacy"} {
+
+    # disable debug for now
+
+    patchfiles          patch-gqrx.pro.diff
+
+    # allow gqrx to work with both gnuradio and gnuradio-devel ...
+
+    depends_lib-append  port:gr-osmosdr \
+        path:lib/libgnuradio-audio.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"
+        }
+    }
+
+    # fix livecheck to look for commits, not tags
+
+    livecheck.url       https://github.com/csete/gqrx/commits/master
+    livecheck.version   ${full_commit}
+    livecheck.regex     .*permalink.*commits/(\[a-f0-9\]+).>
+
+}

Added: trunk/dports/science/gqrx/files/patch-gqrx.pro-devel.diff
===================================================================
--- trunk/dports/science/gqrx/files/patch-gqrx.pro-devel.diff	                        (rev 0)
+++ trunk/dports/science/gqrx/files/patch-gqrx.pro-devel.diff	2013-08-09 13:53:14 UTC (rev 109181)
@@ -0,0 +1,52 @@
+--- gqrx.pro.orig	2013-08-08 16:32:53.000000000 -0400
++++ gqrx.pro	2013-08-08 16:38:08.000000000 -0400
+@@ -45,31 +45,27 @@
+     PREFIX=/usr/local
+ }
+ 
+-target.path  = $$PREFIX/bin
++target.path  = @APPSDIR@
+ INSTALLS    += target 
+ 
+-#CONFIG += debug
++CONFIG -= debug
++VER = @VERSION@
++CONFIG += @ARCHES@
+ 
+ # disable debug messages in release
+ CONFIG(debug, debug|release) {
+     # Use for valgrind
+     #QMAKE_CFLAGS_DEBUG += '-g -O0'
+ 
+-    # Define version string (see below for releases)
+-    VER = $$system(git describe --abbrev=8)
+-
+ } else {
+     DEFINES += QT_NO_DEBUG
+     DEFINES += QT_NO_DEBUG_OUTPUT
+-    VER = $$system(git describe --abbrev=1)
+ 
+     # Release binaries with gr bundled
+     # QMAKE_RPATH & co won't work with origin
+     ## QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN/lib\''
+ }
+ 
+-VER = '2.2'
+-
+ # Tip from: http://www.qtcentre.org/wiki/index.php?title=Version_numbering_using_QMake
+ VERSTR = '\\"$${VER}\\"'          # place quotes around the version string
+ DEFINES += VERSION=\"$${VERSTR}\" # create a VERSION macro containing the version string
+@@ -204,12 +200,7 @@
+ }
+ 
+ macx {
+-    # macports
+-    INCLUDEPATH += /opt/local/include
+-
+-    # local stuff
+-    INCLUDEPATH += /Users/alexc/gqrx/runtime/include
+-    LIBS += -L/opt/local/lib -L/Users/alexc/gqrx/runtime/lib
++    INCLUDEPATH += $$PREFIX/include
+ 
+     LIBS += -lboost_system-mt -lboost_program_options-mt
+     LIBS += -lgnuradio-runtime -lgnuradio-pmt -lgnuradio-audio -lgnuradio-analog

Added: trunk/dports/science/gqrx/files/patch-gqrx.pro-legacy.diff
===================================================================
--- trunk/dports/science/gqrx/files/patch-gqrx.pro-legacy.diff	                        (rev 0)
+++ trunk/dports/science/gqrx/files/patch-gqrx.pro-legacy.diff	2013-08-09 13:53:14 UTC (rev 109181)
@@ -0,0 +1,37 @@
+--- gqrx.pro.orig	2013-08-08 16:58:04.000000000 -0400
++++ gqrx.pro	2013-08-08 17:01:33.000000000 -0400
+@@ -28,7 +28,12 @@
+ # make clean target
+ QMAKE_CLEAN += gqrx
+ 
+-#CONFIG += debug
++CONFIG -= debug
++VER = @VERSION@
++CONFIG += @ARCHES@
++
++target.path  = @APPSDIR@
++INSTALLS    += target
+ 
+ # disable debug messages in release
+ CONFIG(debug, debug|release) {
+@@ -36,11 +41,9 @@
+     #QMAKE_CFLAGS_DEBUG += '-g -O0'
+ 
+     # Define version string (see below for releases)
+-    VER = $$system(git describe --abbrev=8)
+ } else {
+     DEFINES += QT_NO_DEBUG
+     DEFINES += QT_NO_DEBUG_OUTPUT
+-    VER = 0.0
+ 
+     # Release binaries with gr bundled
+     # QMAKE_RPATH & co won't work with origin
+@@ -170,7 +173,7 @@
+     LIBS += -lrt  # need to include on some distros
+ }
+ 
+-macx-g++ {
++macx {
+      LIBS += -lboost_system-mt -lboost_program_options-mt
+ #    INCLUDEPATH += /usr/local/include
+ #    INCLUDEPATH += /usr/local/include/gnuradio

Added: trunk/dports/science/gqrx/files/patch-gqrx.pro.diff
===================================================================
--- trunk/dports/science/gqrx/files/patch-gqrx.pro.diff	                        (rev 0)
+++ trunk/dports/science/gqrx/files/patch-gqrx.pro.diff	2013-08-09 13:53:14 UTC (rev 109181)
@@ -0,0 +1,52 @@
+--- gqrx.pro.orig	2013-08-08 16:32:53.000000000 -0400
++++ gqrx.pro	2013-08-08 16:38:08.000000000 -0400
+@@ -45,31 +45,27 @@
+     PREFIX=/usr/local
+ }
+ 
+-target.path  = $$PREFIX/bin
++target.path  = @APPSDIR@
+ INSTALLS    += target 
+ 
+-#CONFIG += debug
++CONFIG -= debug
++VER = @VERSION@
++CONFIG += @ARCHES@
+ 
+ # disable debug messages in release
+ CONFIG(debug, debug|release) {
+     # Use for valgrind
+     #QMAKE_CFLAGS_DEBUG += '-g -O0'
+ 
+-    # Define version string (see below for releases)
+-    VER = $$system(git describe --abbrev=8)
+-
+ } else {
+     DEFINES += QT_NO_DEBUG
+     DEFINES += QT_NO_DEBUG_OUTPUT
+-    VER = $$system(git describe --abbrev=1)
+ 
+     # Release binaries with gr bundled
+     # QMAKE_RPATH & co won't work with origin
+     ## QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN/lib\''
+ }
+ 
+-VER = '2.2'
+-
+ # Tip from: http://www.qtcentre.org/wiki/index.php?title=Version_numbering_using_QMake
+ VERSTR = '\\"$${VER}\\"'          # place quotes around the version string
+ DEFINES += VERSION=\"$${VERSTR}\" # create a VERSION macro containing the version string
+@@ -204,12 +200,7 @@
+ }
+ 
+ macx {
+-    # macports
+-    INCLUDEPATH += /opt/local/include
+-
+-    # local stuff
+-    INCLUDEPATH += /Users/alexc/gqrx/runtime/include
+-    LIBS += -L/opt/local/lib -L/Users/alexc/gqrx/runtime/lib
++    INCLUDEPATH += $$PREFIX/include
+ 
+     LIBS += -lboost_system-mt -lboost_program_options-mt
+     LIBS += -lgnuradio-runtime -lgnuradio-pmt -lgnuradio-audio -lgnuradio-analog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130809/42e9714e/attachment.html>


More information about the macports-changes mailing list