# -*- 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           cmake 1.1
PortGroup           legacysupport 1.1

# _strnlen
legacysupport.newest_darwin_requires_legacy 10

github.setup        theori-io nrsc5 3.0.1 v
github.tarball_from archive

categories          audio
maintainers         {@trodemaster icloud.com:manuals-unread2u} openmaintainer

license             GPL-3+

description         This program receives NRSC-5 digital radio stations using an RTL-SDR dongle
long_description    {*}${description}. It offers a command-line interface \
                    as well as an API upon which other applications can be built.

checksums           rmd160  c34f475365429c50ce33e9f8c90f231c077fe27e \
                    sha256  6c7608a5da2e26b8940ca55423e9fa45c61ca9f6fe816b6dd298029ff419a91e \
                    size    23182772
                                        
patchfiles          CMakeLists.txt.diff

# cc1: error: unrecognized command line option "-std=gnu11"
compiler.c_standard 2011

configure.args-append \
                    -DUSE_FAAD2=ON

if {${configure.build_arch} ni [list ppc ppc64]} {
    configure.args-append \
                    -DUSE_NEON=ON \
                    -DUSE_SSE=ON
}

depends_build-append \
                    port:libtool \
                    port:autoconf \
                    port:automake

depends_lib-append  port:rtl-sdr \
                    port:libao \
                    port:fftw-3-single
