# -*- 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           python 1.0
PortGroup           select 1.0

github.setup        ioflo ioflo 1.7.6 v
name                py-ioflo
revision            0

categories-append   lang
platforms           darwin
supported_archs     noarch
license             Apache-2
maintainers         nomaintainer

description         ioflo is a framework and DSL for building reasoning \
                    automation systems.
long_description    IoFlo is a magically powerful open interoperable software \
                    framework that enables non experts to intelligently \
                    automate their own programmable world. IoFlo has its roots \
                    in the research and development of autonomous underwater \
                    vehicles, autonomic ships, and automated buildings. These \
                    are cool applications that can be scarily complex. That \
                    complexity was the prime motivation for IoFlo and its \
                    ancestors, to make programming autonomous/autonomic systems \
                    easy even for people without PhDs.

homepage            https://ioflo.com

checksums           rmd160  e4dcfa3fe2422e0e12702a46b9e107d089f8fa23 \
                    sha256  810f73fe9785b7010fd23dda72d91913c88ca774b632a354165befdfde861c24 \
                    size    838598

python.versions     27 35 36

if {${name} ne ${subport}} {
    depends_build-append  \
                    port:py${python.version}-setuptools-git

    depends_lib-append \
                    port:py${python.version}-setuptools

    depends_run     port:ioflo_select

    post-destroot {
        delete ${destroot}${prefix}/bin/ioflo[string range ${python.version} 0 end-1]-${python.branch}
        delete ${destroot}${prefix}/bin/ioflo${python.branch}-${python.branch}

        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.txt LICENSE \
            LICENSE-2.0.txt ChangeLog.md LEGAL ${destroot}${docdir}
    }

    select.group    ${python.rootname}
    select.file     ${filespath}/${python.rootname}${python.version}

    notes "
    To make the Python ${python.branch} version of ioflo the one that is run \
    when you execute the commands without a version suffix, e.g. 'ioflo', run:

    sudo port select --set ${select.group} [file tail ${select.file}]
    "

    livecheck.type  none
}