Ticket #37227: 1.patch

File 1.patch, 2.9 KB (added by seanfarley (Sean Farley), 12 years ago)

py-nibabel: new port copied from py-pynifti

  • new file dports/python/py-nibabel/Portfile

    # HG changeset patch
    # User Sean Farley <sean.michael.farley@gmail.com>
    # Date 1354650792 21600
    # Node ID f19641430e96f731616de72a6720bf6d0f160bd6
    # Parent  acdedcb5735cf7990c16d75a7ceeb39eba480ed0
    py-nibabel: new port copied from py-pynifti
    
    diff --git a/dports/python/py-nibabel/Portfile b/dports/python/py-nibabel/Portfile
    new file mode 100644
    - +  
     1# -*- 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
     2# $Id$
     3
     4PortSystem              1.0
     5PortGroup               python 1.0
     6
     7name                    py-pynifti
     8version                 0.20100607.1
     9categories              python
     10platforms               darwin
     11maintainers             jameskyle
     12description             PyNIfTI aims to provide easy access to NIfTI images from within Python.
     13long_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.
     14
     15homepage                http://sourceforge.net/projects/niftilib
     16master_sites            sourceforge:project/niftilib/pynifti/${version}
     17
     18checksums               rmd160  f9337ca40681b76432ac362d088034d79ba28556 \
     19                        sha256  d1607d330e94576d6b0f18690b5b94c75ed1a93722c573e9ea781580f555611a
     20
     21python.versions         25 26 27
     22python.default_version  27
     23
     24if {$subport != $name} {
     25    depends_lib         port:py${python.version}-numpy \
     26                        port:nifticlib \
     27                        port:swig-python
     28
     29    build.env           CCFLAGS="-I${prefix}/include -L${prefix}/lib -I${prefix}/include/nifti"
     30
     31    distname            pynifti_${version}
     32    worksrcdir          pynifti-${version}
     33    patchfiles          patch-setup-py.diff
     34    post-patch {
     35        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py
     36    }
     37
     38    variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {build with gcc 4.3} {
     39        depends_build-append port:gcc43
     40        configure.compiler   macports-gcc-4.3
     41    }
     42
     43    variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {build with gcc 4.4} {
     44        depends_build-append port:gcc44
     45        configure.compiler   macports-gcc-4.4
     46    }
     47
     48    variant gcc45 conflicts gcc43 gcc44 gcc46 gc47 description {build with gcc 4.5} {
     49        depends_build-append port:gcc45
     50        configure.compiler   macports-gcc-4.5
     51    }
     52
     53    variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {build with gcc 4.6} {
     54        depends_build-append port:gcc46
     55        configure.compiler   macports-gcc-4.6
     56    }
     57
     58    variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {build with gcc 4.7} {
     59        depends_build-append port:gcc47
     60        configure.compiler   macports-gcc-4.7
     61    }
     62
     63    if {![variant_isset gcc43] && ![variant_isset gcc44]} {
     64        default_variants +gcc47
     65    }
     66
     67}
     68
     69livecheck.type      none