# $Id: Portfile 120340 2014-05-23 19:01:14Z mmoll@macports.org $

PortSystem 1.0
PortGroup  cmake 1.0
PortGroup  github 1.0

categories          science
maintainers         mmoll openmaintainer
description         A Flexible Collision Library
long_description    $description
github.setup        flexible-collision-library fcl 0.3.1
homepage            http://gamma.cs.unc.edu/FCL
platforms           darwin
license             BSD
depends_build-append port:pkgconfig
depends_lib-append  port:libccd port:boost
checksums           md5     81a5a628f2a226295141d244ade33885 \
                    sha1    2b09a48bbbc56e7935d2d263d27f927dfe33ed55 \
                    rmd160  f2e0c8194ae26f885751e6e1213cd95d2eab96bc

# this just enables "-march=native"
configure.args-append -DFCL_USE_SSE=ON

if {${configure.compiler} eq "gcc-4.0" || [string match *gcc-4.2* ${configure.compiler}]} {
    # this flag disables the compile flag "-march=native",
    # which appears to be unsupported by these compilers
    configure.args-append -DFCL_USE_SSE=OFF
    configure.args-delete -DFCL_USE_SSE=ON
}
