source: trunk/dports/python/py-netcdf4/Portfile

Last change on this file was 152193, checked in by sean@…, 15 months ago

py-netcdf: fix compilation with hdf5; fixes #51850

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
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: Portfile 152193 2016-08-31 20:59:10Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           mpi 1.0
7
8name                py-netcdf4
9version             1.2.4
10revision            1
11categories-append   science
12platforms           darwin
13maintainers         sean \
14                    fastmail.fm:jswhit \
15                    openmaintainer
16license             MIT
17
18description         Python/numpy interface to netCDF
19long_description    netCDF version 4 has many features not found in \
20                    earlier versions of the library and is implemented \
21                    on top of HDF5. This module can read and write files \
22                    in both the new netCDF 4 and the old netCDF \
23                    3 format, and can create files that are readable by \
24                    HDF5 clients.
25homepage            http://code.google.com/p/netcdf4-python/
26
27master_sites        pypi:n/netCDF4
28distname            netCDF4-${version}
29
30checksums           rmd160  1127a3aeb794ea69a1ed9d340f7bbda240648500 \
31                    sha256  a6737eef106b75fe99b4b60e596666f86aeedc086c0037863382c1967a945351
32
33mpi.enforce_variant netcdf
34mpi.setup
35
36patchfiles-append   patch-hdf5path.diff
37
38build.env-append    USE_NCCONFIG=1
39destroot.env-append USE_NCCONFIG=1
40
41python.versions     26 27 33 34 35
42
43if {${name} ne ${subport}} {
44    depends_lib-append  port:netcdf \
45                        port:py${python.version}-numpy \
46                        port:py${python.version}-cython
47
48    post-patch {
49        reinplace -W ${worksrcpath} "s,@@PREFIX@@,${prefix}," setup.py
50    }
51
52    pre-configure {
53        # py-netcdf4's setup.py uses nc-config for flags and libs but not compiler
54        configure.cc    {*}[exec ${prefix}/bin/nc-config --cc]
55    }
56
57    livecheck.type      none
58} else {
59    livecheck.type      regex
60    livecheck.url       https://pypi.python.org/pypi/netCDF4
61    livecheck.regex     >netCDF4-(.*)${extract.suffix}<
62}
Note: See TracBrowser for help on using the repository browser.