# -*- 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 79469 2011-06-14 15:45:16Z pixilla@macports.org $

PortSystem          1.0

name                splash
version             1.14.1
categories          science graphics
platforms           darwin
maintainers         monash.edu:daniel.price
description         Smoothed Particle Hydrodynamics visualisation tool
long_description    SPLASH is a tool for visualisation of (mainly astrophysical) \
                    Smoothed Particle Hydrodynamics simulations
                    
homepage            http://users.monash.edu.au/~dprice/splash
master_sites        ${homepage}/download/
license             GPL-2+

worksrcdir          ${name}

checksums           rmd160  fab3970055412a026ae7ace6907af678a215784b \
                    sha256  91d3594ecad7537d72e8f16fe25fac6afbe093bb43ec9c82f4fd566e6096088e

depends_build       

default_variants    +gcc44 +pgplot

use_configure       no

build.cmd           make SYSTEM=gfortran

destroot.args       PREFIX=${prefix}
use_parallel_build  no

variant pgplot description {use PGPLOT as the backend graphics library} {
   depends_lib      port:pgplot
   build.env        PGPLOT_DIR=${prefix}/lib \
                    PGPLOT_DEV=/xw
}

variant gcc46 description {build with gfortran/gcc v4.6} conflicts gcc42 gcc43 gcc44 gcc45 {
   depends_build    port:gcc46
   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.6
}

variant gcc45 description {build with gfortran/gcc v4.5} conflicts gcc42 gcc43 gcc44 gcc46 {
   depends_build    port:gcc45
   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.5
}

variant gcc44 description {build with gfortran/gcc v4.4} conflicts gcc42 gcc43 gcc45 gcc46 {
   depends_build    port:gcc44
   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.4
}

variant gcc43 description {build with gfortran/gcc v4.3} conflicts gcc42 gcc44 gcc45 gcc46 {
   depends_build    port:gcc43
   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.3
}

variant gcc42 description {build with gfortran/gcc v4.2} conflicts gcc43 gcc44 gcc45 gcc46 {
   depends_build    port:gcc42
   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.2
}

variant read_hdf5formats description {compiles data reads that depend on HDF5} conflicts read_extraformats1 {
   build.args       flash HDF5ROOT=${prefix}
   depends_lib      port:hdf5
}

variant read_extraformats1 description {compiles additional data reads: foulkes, mbatesph, oilonwater, rsph, urban (f/b/o/r/usplash)} conflicts read_extraformats2 {
   build.args       all foulkes mbatesph oilonwater rsph urban
}

variant read_extraformats2 description {compiles additional data reads: Bauswein, UCLA, vanaverbeke data read (bsplash, usplash, vsplash)} conflicts read_extraformats1 {
   build.args       all bauswein ucla vanaverbeke
}
