# -*- 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 102822 2013-02-09 00:51:24Z jmr@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

fetch.type          svn
fetch.user          gmsh
fetch.password      gmsh
svn.url             https://geuz.org/svn/gmsh/trunk
svn.revision        12036
svn.method          export
svn.post_args       --username ${fetch.user} --password ${fetch.password}

name                gmsh-devel
version             2.5.1-svn-${svn.revision}
revision            2
categories          science
platforms           darwin
license             GPL-2+
maintainers         ujf-grenoble.fr:Christophe.Prudhomme
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/
worksrcdir          trunk
conflicts           gmsh

# https://trac.macports.org/ticket/33925
compiler.blacklist  clang

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

post-build {
    # lib and shared targets are not handled by default target
    system "cd ${worksrcpath} && make lib shared"
}

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