# $Id: Portfile 92430 2012-04-28 09:05:49Z vince@macports.org $

PortSystem       1.0

name             geos
version          3.3.2
license          LGPL-2.1
categories       science
platforms        darwin
maintainers      gaige.net:opendarwin

description      GEOS Geometry Engine - Open Source
long_description \
  A C++ port of the Java Topology Suite, providing OpenGIS Simple \
  Features for SQL spatial predicate functions and spatial operators, \
  as well as specific JTS topology functions. Used by PostGIS.

homepage         http://trac.osgeo.org/geos/
master_sites     http://download.osgeo.org/geos/
use_bzip2        yes

checksums           sha1    942b0bbc61a059bd5269fddd4c0b44a508670cb3 \
                    rmd160  168e12e29c3d7a9408753f19397440f20d321715

if {${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler clang
}

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
        TODO ${destroot}${docdir}
}

test.run         yes
test.cmd         make
test.target      check

use_parallel_build yes

livecheck.type   regex
livecheck.url    ${homepage}
livecheck.regex  {geos-(\d+(?:\.\d+)*)}
