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

github.setup        EliasOenal multimon-ng 1.2.0
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball

categories          science comms
license             GPL-2
maintainers         {ra1nb0w @ra1nb0w} openmaintainer

description         multimon-ng decodes radio digital transmission signals
long_description    multimon-ng is the successor of multimon. \
    It decodes the following digital transmission modes: \
    POCSAG512 POCSAG1200 POCSAG2400 FLEX EAS UFSK1200 CLIPFSK \
    AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 \
    DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW X10

checksums           rmd160  e4e5f27667022ed4463adc27eecbd72764d1190a \
                    sha256  83ed3963901b9def0be044ec680c3c6db88a83ce8c70ba1c8f35ec19d6367168 \
                    size    2447574

configure.args-append \
    -DPULSE_AUDIO_SUPPORT=0 \
    -DX11_SUPPORT=0

variant pulseaudio description {Enable Pulseaudio support} {
    depends_lib-append \
        port:pulseaudio

    configure.args-replace \
        -DPULSE_AUDIO_SUPPORT=0  -DPULSE_AUDIO_SUPPORT=1
}

variant x11 {
    depends_lib-append \
        port:xorg-libsm \
        port:xorg-libice \
        port:xorg-libX11

    configure.args-replace \
        -DX11_SUPPORT=0 -DX11_SUPPORT=1
}

#  add some examples and documentation
post-destroot {
    xinstall -d ${destroot}${prefix}/etc/${name}
    file copy ${worksrcpath}/example ${destroot}${prefix}/etc/${name}/
}

test.run    yes
test.cmd    ./multimon-ng
