# -*- 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 67506 2010-05-11 11:33:19Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                py26-polygon
version             2.0.2
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/1853/
distname            Polygon-${version}
use_zip             yes

checksums           md5     96a28a5fa6c9b8ab3fbe56d7bdf97bd0 \
                    sha1    f49b8b117a47f3ac3e0643626295dfd63795ab73 \
                    rmd160  ff47e099e2300adaf53ab8cd06efe3406226c448

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}"
