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

PortSystem          1.0
PortGroup           cmake 1.1
PortGroup           github 1.0
PortGroup           boost 1.0

github.setup        MITHaystack digital_rf 2.6.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            17

categories          science
license             BSD
maintainers         {mit.edu:rvolz @ryanvolz} {mit.edu:swoboj @jswoboda} openmaintainer

description         Read, write, and interact with data in the Digital RF and Digital Metadata formats.
long_description    {*}${description} The Digital RF project encompasses a standardized HDF5 format\
                    for reading and writing of radio frequency data and the software \
                    for doing so. The format is designed to be self-documenting \
                    for data archive and to allow rapid random access for data \
                    processing. For details on the format, refer to the 'documents' \
                    directory in the source tree.

checksums           rmd160  a8885c5e2976a6f904c59fa4debf4062ae8760c3 \
                    sha256  c6e62d959b6716c953196dc33f47dc0dd81945379683b206762ca74e0888151e \
                    size    4537334

compiler.cxx_standard 2011

boost.version       1.71

configure.ldflags-delete    -L${prefix}/lib

depends_build-append \
                    port:py27-pkgconfig

depends_lib-append  port:hdf5 \
                    port:py27-mako \
                    port:py27-numpy

depends_run-append  path:lib/pkgconfig/gnutls.pc:gnutls \
                    port:py27-dateutil \
                    port:py27-matplotlib \
                    port:py27-packaging \
                    port:py27-pandas \
                    port:py27-scipy \
                    port:py27-six \
                    port:py27-tz \
                    port:py27-watchdog

depends_run-append  path:lib/libgnuradio-runtime.dylib:gnuradio \
                    path:lib/libuhd.dylib:uhd

# CMAKE configuration
configure.args-append \
    -DDRF_INSTALL_PREFIX_PYTHON=${frameworks_dir}/Python.framework/Versions/2.7\
    -DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7\
    -DDRF_DATA_PREFIX_PYTHON=${prefix} \
    -DDRF_SCRIPT_PREFIX_PYTHON=${prefix}/bin
