# -*- 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 116773 2014-02-06 23:54:15Z macsforever2000@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

name                gmsh
conflicts           gmsh-devel
version             2.8.3
categories          science
platforms           darwin
license             GPL-2+
maintainers         nomaintainer
description         Finite element mesh generator in 1D, 2D and 3D
long_description    \
        Gmsh is an automatic 3D finite element mesh generator (primarily   \
        Delaunay) with build-in CAD and post-processing facilities. Its     \
        design goal is to provide a simple meshing tool for academic test   \
        cases with parametric input and up to date visualization            \
        capabilities.

homepage            http://www.geuz.org/gmsh/
master_sites        http://www.geuz.org/gmsh/src/
distname            gmsh-${version}-source
extract.suffix      .tgz

checksums           rmd160  7c418370ff2fb0b3ff737b8ce6816d9d7aa6c5fb \
                    sha256  44ef0fc74cf89f3270b65a01a0eab296d947ac9cf442499b35e9db99d3c2312e

# TODO: Fix these missing includes in the appropriate files
configure.cxxflags-append -include /usr/include/stdlib.h

configure.args-append \
    -DENABLE_OS_SPECIFIC_INSTALL=OFF \
    -DENABLE_NATIVE_FILE_CHOOSER=OFF \
    -DENABLE_OCC=OFF \
    -DENABLE_FLTK=ON \
    -DENABLE_GRAPHICS=ON \
    -DENABLE_APP_BUNDLE=OFF \
    -DENABLE_METIS=OFF \
    -DENABLE_TAUCS=OFF

depends_lib  \
    path:lib/libfltk.dylib:fltk \
    port:libpng \
    port:jpeg \
    port:mesa \
    port:texinfo \
    port:zlib
