# -*- 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
# $Id: Portfile 117927 2014-03-17 12:13:40Z mojca@macports.org $

PortSystem          1.0
PortGroup           python 1.0

set _name           saga-python
set _n              [string index ${_name} 0]

name                py-saga
version             0.13
categories-append   net science
platforms           darwin
supported_archs     noarch
license             MIT

maintainers         bo.ingv.it:Peter.Danecek openmaintainer

description         A Simple API for Grid and Distributed Applications

long_description    \
    SAGA (Simple API for Grid Applications) defines a high-level interface to \
    the most commonly used distributed computing functionality. SAGA-Python \
    provides a Python module that is compliant with the OGF GFD.90 SAGA \
    specification. Its main focus is ease of use and simple user-space \
    deployment in heterogeneous distributed computing environments. \
    It supports a wide range of application use-cases from simple, uncoupled \
    tasks to complex workflows.

homepage            http://saga-project.github.io/${_name}/

distname            ${_name}-${version}
master_sites        https://pypi.python.org/packages/source/${_n}/${_name}/

checksums           md5     3c4b069b98f8f4c7cf4cea56ea834182 \
                    rmd160  31e27128904de5c1db275cfa896155ee1ad0fb7c \
                    sha256  adc2ffd995a8aefd1e437e1343a45110c0e30464063853617fbd09facf0513d7

python.versions     26 27

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

    depends_lib-append      port:py${python.version}-colorama \
                            port:py${python.version}-radical-utils \
                            port:py${python.version}-libcloud

    # Adding documentation
    post-destroot {
        set dest_doc ${destroot}${prefix}/share/doc/${subport}
        xinstall -d  ${dest_doc}
        xinstall -m 755 -W ${worksrcpath} \
            CHANGES.md \
            LICENSE.md \
            README.md \
                ${dest_doc}
    }

    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   [lindex ${master_sites} 0]
    livecheck.regex ">${_name}-(\\d+(\\.\\d+)+)\\${extract.suffix}<"
}
