# $Id: Portfile 83327 2011-08-29 20:33:48Z adfernandes@macports.org $

PortSystem 1.0

name                bali-phy
version             2.1.1
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 e72073a1c5b05c797668e476bfd8517594f074e6

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
configure.env       CFLAGS=-DBOOST_FILESYSTEM_VERSION=2 CXXFLAGS=-DBOOST_FILESYSTEM_VERSION=2

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}
