# -*- 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

PortSystem              1.0
PortGroup               python 1.0

name                    py-pynifti
version                 0.20100607.1
revision                1
categories              python
platforms               darwin
license                 public-domain
maintainers             nomaintainer
description             PyNIfTI aims to provide easy access to NIfTI images from within Python.
long_description        ${description}. It uses SWIG-generated wrappers for the NIfTI reference library and provides the NiftiImage class for Python-style access to the image data.

homepage                http://sourceforge.net/projects/niftilib
master_sites            sourceforge:project/niftilib/pynifti/${version}

checksums               rmd160  f9337ca40681b76432ac362d088034d79ba28556 \
                        sha256  d1607d330e94576d6b0f18690b5b94c75ed1a93722c573e9ea781580f555611a

python.versions         27

if {${name} ne ${subport}} {
    depends_lib         port:py${python.version}-numpy \
                        port:nifticlib \
                        port:swig-python

    build.env           "CCFLAGS=-I${prefix}/include -L${prefix}/lib -I${prefix}/include/nifti"

    distname            pynifti_${version}
    worksrcdir          pynifti-${version}
    patchfiles          patch-setup-py.diff
    post-patch {
        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py
    }

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

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

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

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

    variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {build with gcc 4.7} {
        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
