# -*- 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 103316 2013-02-21 14:23:24Z mmoll@macports.org $

PortSystem 1.0
PortGroup python 1.0

name            py-biopython
version         1.61
categories-append     science
maintainers     mmoll openmaintainer
platforms       darwin
description     python tools for computational molecular biology
long_description    python tools for computational molecular biology: \
                parsers for various file formats, interfaces for programs, \
                tools for performing common operations on sequences, etc.

homepage        http://www.biopython.org/
license         MIT
master_sites    ${homepage}/DIST
distname        biopython-${version}
checksums           md5     cea235813a0a31b578b38d71f6dbaf53 \
                    sha1    fea0a48606b6085b861f31276d012036e4c8a425 \
                    rmd160  eeefb1e556b6d06054167142afb949a0ca13f832

# Note that python31 and python32 support are in beta,
# but reportlab does not seem available for python3

python.versions         25 26 27
python.default_version  27

if { ${subport} != ${name} } {
    depends_lib-append  port:py${python.version}-numpy \
                        port:py${python.version}-reportlab \
                        port:flex

    post-destroot {
        file delete -force ${destroot}${prefix}/share/doc/${subport}
        file copy ${worksrcpath}/Doc ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} CONTRIB DEPRECATED LICENSE NEWS README \
            ${destroot}${prefix}/share/doc/${subport}
    }

    build.env   CFLAGS=-I${python.include}

    test.run        no
    test.cmd        ${build.cmd}
    test.target     test

    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   http://biopython.org/wiki/Download
    livecheck.regex biopython-(\[0-9\.\]+).tar.gz
}
