# -*- 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 77637 2011-04-07 11:29:30Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                py26-polygon
version             2.0.4
maintainers         stromnov openmaintainer

description         Python bindings for General Polygon Clipping Library

long_description    \
    Polygon is a python package that simplifies the handling of polygons \
    in 2D. It contains Python bindings for gpc, the excellent General \
    Polygon Clipping Library by Alan Murta and some extensions written \
    in C and pure Python.

platforms           darwin

homepage            http://polygon.origo.ethz.ch/
master_sites        http://download.origo.ethz.ch/polygon/2890/
distname            Polygon-${version}
use_zip             yes

checksums           md5     9a036b22d1ee9568b8cbfa40b0bfa721 \
                    sha1    aa734572c911c0ddb4b39d1bf21f8ecbfa3685c8 \
                    rmd160  dfb26325998f3e8b44ac36f6ef2c0be30b8d9fd9

variant numpy description {Build with NumPy support} {
    depends_lib-append  port:py26-numpy
    patchfiles-append   patch-setup.py.diff
}

post-destroot {
    xinstall -m 644 -W ${worksrcpath}/doc \
        Examples.py Polygon.txt testpoly.gpf \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}/download
livecheck.regex     "Polygon-(2+(?:\\.\\d+)*)${extract.suffix}"
