# -*- 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-ofdm
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}} {
    version         20180306
    revision        16
    replaced_by     gr37-ofdm
    PortGroup       obsolete 1.0
}


subport gr37-ofdm {

    name            gr37-ofdm

    github.setup    rwth-ti gr-ofdm a40720c708b75ad4c12ff09e49931879e9f90e78
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    version         20180306
    revision        4
    checksums       rmd160 ee1f3054e00e57986fa7536d9691018c69e9e68a \
                    sha256 b053745b3590f1842a35c9914b344db295c2a479ce65711cc3112dc848427e7b \
                    size   3257234

    conflicts \
        gr-ofdm

    # patch to allow building using Clang and C++11
    # should also be backward compatible with GCC.
    # adds boost::thread and volk finding.
    # fixes ITPP finding.
    patchfiles-append \
        patch-build-clang_c++11.diff
    patch.pre_args-replace  -p0 -p1

    # specify ITPP to use
    configure.args-append \
        -DITPP_DIR=${prefix}

}

depends_lib-append \
    path:lib/libitpp.dylib:itpp \
    port:py${active_python_version_no_dot}-pyqt4 \
    port:py${active_python_version_no_dot}-pyqwt \
    path:lib/libuhd.dylib:uhd \
    path:lib/libzmq.dylib:zmq
