# -*- 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 111008 2013-09-13 12:35:03Z mww@macports.org $

PortSystem          1.0

name                whizard
version             2.1.1
revision            1
categories          science
platforms           darwin
maintainers         mail.desy.de:whizard
license             GPL-2+

description         Generator of high-energy physics events

long_description    WHIZARD is a program system designed for the efficient \
                    calculation of multi-particle scattering cross sections \
                    and simulated event samples. Tree-level matrix elements \
                    are generated automatically for arbitrary partonic \
                    processes by using the Optimized Matrix Element Generator O'Mega. \
                    Matrix elements obtained by alternative methods (e.g., \
                    including loop corrections) may be interfaced as well. \
                    The program is able to calculate numerically stable signal \
                    and background cross sections and generate unweighted \
                    event samples with reasonable efficiency for processes \
                    with up to eight final-state particles\; more particles are \
                    possible. For more particles, there is the option to generate \
                    processes as decay cascades including complete spin correlations.

homepage            http://whizard.hepforge.org/
master_sites        http://www.hepforge.org/archive/whizard/

checksums           rmd160  812dbde7087bc1dfa75f9897e106d71ab3e96985 \
                    sha256  d83bbc6f4c82b5e5b11f72706918776ee2a359fdf42be33004f45b55609873b3

depends_build       port:ocaml

configure.args      --enable-fc-openmp

use_parallel_build  yes

test.run            yes
test.target         check

variant gcc45 conflicts gcc46 gcc47 description {Use GCC 4.5} {
    configure.compiler          macports-gcc-4.5
}

variant gcc46 conflicts gcc45 gcc47 description {Use GCC 4.6} {
    configure.compiler          macports-gcc-4.6
}

variant gcc47 conflicts gcc45 gcc46 description {Use GCC 4.7} {
    configure.compiler          macports-gcc-4.7
}

if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
    default_variants            +gcc47
}

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
