# -*- 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-gfdm
maintainers         {michaelld @michaelld} openmaintainer
description         Provides augmented functionality for GNU Radio: Generalized Frequency Division Multiplexing.
long_description    {*}${description}
license             GPL-3

if {${subport} eq ${name}} {

    github.setup    jdemel gr-gfdm df94a58da883e796c18a0a5679d4992e94158c8c
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    version         20200409-[string range ${github.version} 0 7]
    revision        4

    conflicts       gr37-gfdm

    patchfiles-append \
        patch-fix_build38.diff

}

subport gr37-gfdm {

    name            gr37-gfdm

    github.setup    jdemel gr-gfdm 4cc5b5c4f3814f9e6a32c5f732412b70393127c6
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    git.branch      maint-3.7
    version         20190416-[string range ${github.version} 0 7]
    revision        4

    conflicts       gr-gfdm

    patchfiles-append \
        patch-fix_build37.diff

}

# Fetch from git instead of distfile because it needs submodules
fetch.type git
post-fetch {
    system -W "${worksrcpath}" "git submodule update --init --recursive"
}

depends_lib-append \
    port:py${active_python_version_no_dot}-pybind11

# unfortunately, for the moment it needs internal pybind11
# too much effort to move out only avoid installation
configure.args-append \
    -DPYBIND11_INSTALL=OFF \
    -DPYBIND11_TEST=OFF

# documentation - fail -> disable
default_variants-append \
    -docs
