# -*- 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 073726340ede83c596187f89d4442ab8d5180b77
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball

revision            0
version             1.0-20240327
categories          audio
maintainers         {netjibbing.com:blake @trodemaster} \
                    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  75f0e0458de45d23ab8e010505ae967c3c0f455d \
                    sha256  a325d36638aed27e211235d98bf7675bb3d63c6df67ce14cab524bb86fe947fa \
                    size    23170595

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 \
                    port:faad2
