# $Id: Portfile 74991 2011-01-11 08:14:47Z ryandesign@macports.org $

PortSystem 1.0

name                bali-phy
version             2.1.0
revision            1
description         Bayesian Alignment and Phylogeny estimation
long_description    BAli-Phy can estimate phylogenetic trees from sequence data when the alignment \
                    is uncertain. Instead of conditioning on a single alignment estimate, BAli-Phy \
                    accounts for alignment uncertainty by integrating over all alignments. \
                    BAli-Phy does not rely on a guide tree because the alignment and the tree are \
                    co-estimated. Therefore it can construct phylogeny estimates of widely \
                    divergent sequences without bias toward a guide tree.
categories          science
platforms           darwin
maintainers         adfernandes
homepage            http://www.biomath.ucla.edu/msuchard/bali-phy/

master_sites        ${homepage}
checksums           sha1 0fd83d876d2ef1d0f2676c14ad10ff93621a8530

patchfiles          configure.patch scripts.patch src-tools-draw-tree.patch

depends_lib         port:gsl port:boost path:lib/pkgconfig/cairo.pc:cairo
depends_build       port:pkgconfig

configure.args      --with-system-boost --enable-cairo

variant no_cairo description {disable drawing routines} {
    depends_lib-delete      path:lib/pkgconfig/cairo.pc:cairo
    configure.args-delete   --enable-cairo
    patchfiles-delete       src-tools-draw-tree.patch
}

variant openmpi description {enable OpenMPI parallelization} {
    depends_lib-append      port:openmpi
    configure.args-append   --with-mpi
}

variant gcc43 conflicts gcc44 gcc45 description {build using macports-gcc-4.3} {
    depends_lib-append  port:gcc43
    configure.compiler  macports-gcc-4.3
}

variant gcc44 conflicts gcc43 gcc45 description {build using macports-gcc-4.4} {
    depends_lib-append  port:gcc44
    configure.compiler  macports-gcc-4.4
}

variant gcc45 conflicts gcc43 gcc44 description {build using macports-gcc-4.5} {
    depends_lib-append  port:gcc45
    configure.compiler  macports-gcc-4.5
}

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex {BAli-Phy (\d+\.\d+\.\d+) released}
