# -*- 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$ PortSystem 1.0 PortGroup python26 1.0 name py26-nio version 1.3.0b1 revision 1 platforms darwin maintainers nomaintainer license PyNIO categories-append science description I/O library for scientific data formats homepage http://www.pyngl.ucar.edu/Nio.shtml master_sites http://www.pyngl.ucar.edu/Download/ distname PyNIO-${version} checksums md5 c881b552cf914549f46d65a61f2d8cb0 \ sha1 288b70d83828e1cb99d3d7c61bd32b5c406c8b1a \ rmd160 b33d00041783ba259ae95f772c7fde0cf37d7303 long_description \ PyNIO is a Python package that allows read and/or write access to \ a variety of data formats using an interface modeled on netCDF. \ PyNIO is composed of a C library called libnio along with a Python module \ based on and with an interface similar to the Scientific.IO.NetCDF module \ written by Konrad Hinsen. fetch { if {![file exists ${distpath}/${distfiles}]} { xinstall -d ${distpath} ui_error "Download ${distfiles} manually and place it in ${distpath}.\n \ See instructions on ${master_sites}" } } patch { reinplace "s|__init__(obj)|__init__()|" ${worksrcpath}/Nio.py } # ncarg is not universal (and thus py26-nio is not universal) universal_variant no depends_lib-append port:ncarg \ port:szip \ port:py26-numpy build.env-append HAS_GRIB2=1 GRIB2_PREFIX=${prefix} \ HAS_HDFEOS=1 HDFEOS_PREFIX=${prefix} \ HAS_NETCDF4=1 NETCDF4_PREFIX=${prefix} \ NCARG_ROOT=${prefix} destroot.env NCARG_ROOT=${prefix} set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9} set default_fortran_variant +gcc48 set g95_conflicts {} foreach ver ${gcc_versions} { set ver_no_dot [join [split ${ver} "."] ""] set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95} foreach over ${gcc_versions} { if {${ver} == ${over}} { continue } set over_no_dot [join [split ${over} "."] ""] append variant_line " conflicts gcc${over_no_dot}" } append variant_line { {}} eval $variant_line append g95_conflicts " conflicts gcc${ver_no_dot}" if {[variant_isset gcc${ver_no_dot}]} { if {${default_fortran_variant} != "+gcc${ver_no_dot}"} { set default_fortran_variant "" } } } eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}] if {[variant_isset g95]} { if {${default_fortran_variant} != "+g95"} { set default_fortran_variant "" } } if {${default_fortran_variant} != ""} { default_variants-append "${default_fortran_variant}" } foreach ver ${gcc_versions} { set ver_no_dot [join [split ${ver} "."] ""] if {[variant_isset gcc${ver_no_dot}]} { depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc depends_build-append port:gcc${ver_no_dot} configure.fc ${prefix}/bin/gfortran-mp-${ver} configure.f77 ${prefix}/bin/gfortran-mp-${ver} configure.f90 ${prefix}/bin/gfortran-mp-${ver} build.env-append F2CLIBS=gfortran \ F2CLIBS_PREFIX=${prefix}/lib/gcc${ver_no_dot} \ CC=${configure.cc} } } if {[variant_isset g95]} { depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc depends_build-append port:g95 configure.fc ${prefix}/bin/g95 configure.f77 ${prefix}/bin/g95 configure.f90 ${prefix}/bin/g95 configure.fflags-append -fno-second-underscore build.env-append F2CLIBS=f95 \ F2CLIBS_PREFIX=${prefix}/lib/ \ CC=${configure.cc} } livecheck.type regex livecheck.url ${master_sites} livecheck.regex {The current version of PyNGL and PyNIO is ([0-9]\.[0-9]\.[0-9][a-z]+[0-9]+)}