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

name                py-matplotlib-basemap
github.setup        matplotlib basemap 1.2.1 v rel
revision            0

categories-append   graphics math
license             LGPL-2.1
platforms           darwin
maintainers         nomaintainer

description         matplotlib toolkit for plotting data on map projections
long_description    Matplotlib basemap is a matplotlib toolkit python library \
                    for plotting data on map projections

checksums           rmd160  3dc1e39204cbf58b633b90134e3e90903ae18282 \
                    sha256  59b69d2f8ece0d17b0649e604099e84933bc90e1161302dfbefc61e919b75244 \
                    size    132525494

python.versions     27 35 36 37 38

build.env-append    GEOS_DIR=${prefix}
destroot.env-append GEOS_DIR=${prefix}

universal_variant   no

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

    depends_lib-append \
                    port:geos \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-numpy \
                    port:py${python.version}-pyproj \
                    port:py${python.version}-pyshp \
                    port:py${python.version}-six

    post-destroot {
        delete ${destroot}${python.pkgd}/mpl_toolkits/__init__.py
        delete ${destroot}${python.pkgd}/mpl_toolkits/__init__.pyc
    }

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run        yes
    test.cmd        ${python.bin} lib/mpl_toolkits/basemap/test.py
    test.target

    livecheck.type  none
}