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

name                py-smisk
version             1.1.6
revision            1
categories-append   www
license             MIT BSD
platforms           darwin

maintainers         rasmus
description         High performance web service framework
long_description    A modern high performance web service framework, written \
                    in C but controlled by Python.
homepage            http://python-smisk.org/

master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}
distname            ${python.rootname}-${version}

checksums           rmd160  2cf089a223e801abb8bcb0fb5589ec7d9401d047 \
                    sha256  6dd79be4d8210151bf4a4d5a30e8a770ee5270d387994bbdf31b33c2e2c0f63b \
                    size    938831

patchfiles          patch-setup.py.diff

python.versions     27

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

    depends_lib-append  port:fcgi \
                        port:py${python.version}-cjson \
                        port:py${python.version}-elixir \
                        port:py${python.version}-mako \
                        port:py${python.version}-gnureadline \
                        port:py${python.version}-yaml

    variant minimal description {Minimize number of dependencies} {
      # Smisk will tell the user when she is trying to use a part of Smisk which
      # requires a certain module which is not available, thus no extra
      # configuration is required.
      depends_lib-delete  port:py${python.version}-cjson \
                          port:py${python.version}-elixir \
                          port:py${python.version}-mako \
                          port:py${python.version}-gnureadline \
                          port:py${python.version}-yaml
    }

    build.env-append  SMISK_BUILD_ID_SUFFIX=:macports:${revision}
    build.args-append -f

    post-destroot {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} LICENSE README.rst CHANGELOG.rst ${destroot}${prefix}/share/doc/${subport}
        copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${subport}/examples
    }
    livecheck.type  none
}
