# -*- 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

PortSystem          1.0
PortGroup           github 1.0
PortGroup           gnuradio 1.0

name                gr-air-modes
maintainers         {michaelld @michaelld} openmaintainer
description         Provides augmented functionality (blocks, GRC definitions, apps, etc) for GNU Radio.
long_description    ${description}
license             GPL-3

if {${subport} eq ${name}} {

    github.setup    bistromath gr-air-modes a2f2627c5421368b8af1b57ca9818e1c79d4f4f0
    version         20191015-[string range ${github.version} 0 7]
    checksums       rmd160  c217e9a5da47bf639f94fed4d2490d88717ca40a \
                    sha256  ec716122fd2c7e6e3f66a1d5c887b4433990c1036d2bdd4d7424808cca5a5a4e \
                    size    186306
    revision        4

    # NOTE: py3*-pyqwt is not available

    conflicts gr37-air-modes

}

subport gr37-air-modes {

    name            gr37-air-modes

    github.setup    bistromath gr-air-modes 0b6c3835062fc371d79fcb3cf3a6076d4a5ee36d
    version         20170928
    checksums       rmd160 1ebd3db9ceb68d6d12a0f84c944ad4c9ace14d31 \
                    sha256 83faacb86e42033773f333d1c488efb9d0cd0e4a26217c93b2f45a828363fc7f
    revision        2

    # temporary patch to fix CMake stuff on OSX
    patchfiles-append \
        patch-CMakeLists.txt.diff

    # temporary patch to fix Python handling
    patchfiles-append \
        patch-cmake_Modules_GrPython.cmake.diff

    # temporary patch to fix use of pyuic
    patchfiles-append \
        patch-cmake_Modules_FindPyQt4.cmake.diff

    conflicts gr-air-modes

    depends_lib-append \
        port:qwt52 \
        port:py27-pyqwt \
        port:py27-pyqt4

    livecheck none

}

if {${subport} eq "gr37-air-modes"} {
    configure.args-append \
        -DPYUIC4_EXECUTABLE=${python_framework_dir}/bin/pyuic4
}

depends_run-append \
    port:py${active_python_version_no_dot}-zmq