# -*- 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 104371 2013-03-24 01:56:37Z sean@macports.org $

PortSystem              1.0
PortGroup               python 1.0

name                    py-nibabel
version                 1.3.0
categories              python
platforms               darwin
license                 MIT
maintainers             nomaintainer
description             Access a cacophony of neuro-imaging file formats

long_description        Nibabel provides read and write access to some common medical and \
    neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2), GIFTI, NIfTI1, MINC, \
    MGH and ECAT as well as PAR/REC. We can read and write Freesurfer geometry, and read \
    Freesurfer morphometry and annotation files. There is some very limited support for \
    DICOM. NiBabel is the successor of PyNIfTI.

homepage                http://nipy.org/nibabel
master_sites            http://pypi.python.org/packages/source/n/nibabel/
distname                nibabel-${version}

checksums               rmd160  cff54439e38e1bdcd726cf45136d01417b7a02b8 \
                        sha256  69b6fe175d4cf24ab6342575753efda5d6ba7f31f840db2da26e17789166159b

python.versions         25 26 27 31 32 33

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

    post-patch {
        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py
    }

    variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {build with gcc 4.3} {
        depends_build-append port:gcc43
        configure.compiler   macports-gcc-4.3
    }

    variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {build with gcc 4.4} {
        depends_build-append port:gcc44
        configure.compiler   macports-gcc-4.4
    }

    variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {build with gcc 4.5} {
        depends_build-append port:gcc45
        configure.compiler   macports-gcc-4.5
    }

    variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {build with gcc 4.6} {
        depends_build-append port:gcc46
        configure.compiler   macports-gcc-4.6
    }

    variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {build with gcc 4.7} {
        depends_build-append port:gcc47
        configure.compiler   macports-gcc-4.7
    }

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

    livecheck.type      none
} else {
    livecheck.url       http://pypi.python.org/pypi/nibabel
    livecheck.regex     nibabel-(\[0-9.\]+)${extract.suffix}
}
