source: trunk/dports/science/netcdf/Portfile

Last change on this file was 153927, checked in by takeshi@…, 13 months ago

netcdf: revbump due to r153822

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 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 153927 2016-10-16 06:07:45Z ryandesign@macports.org $
3
4PortSystem                  1.0
5PortGroup                   mpi 1.0
6PortGroup                   github 1.0
7PortGroup                   cmake 1.0
8PortGroup                   muniversal 1.0
9
10
11github.setup                Unidata netcdf-c 4.4.1 v
12revision                    2
13epoch                       3
14name                        netcdf
15maintainers                 takeshi openmaintainer
16platforms                   darwin
17categories                  science
18license                     Permissive
19
20description                 libraries for array-oriented scientific data
21long_description \
22    NetCDF (network Common Data Form) is a set of software libraries \
23    and machine-independent data formats that support the creation,  \
24    access, and sharing of array-oriented scientific data.
25
26homepage                    http://www.unidata.ucar.edu/software/netcdf/
27
28checksums           rmd160  6418550d9aca73640d819a1bf29687f1fb7eb75d \
29                    sha256  728d62d85c870f0c205ef33d36cdb53cb074f9e0bb212a71ae78f32a829be66e
30
31compilers.choose            cc cpp
32mpi.setup
33
34cmake.out_of_source         yes
35
36patchfiles                  patch-CMakeLists.txt.diff
37
38configure.args-append       -DENABLE_NETCDF_4=OFF \
39                            -DENABLE_DAP=OFF
40
41test.run                    yes
42test.target                 test
43
44default_variants +netcdf4 +dap
45
46
47if {[variant_isset netcdf4]} {
48    mpi.enforce_variant         hdf5-18
49    configure.ldflags-append    -L${prefix}/lib/hdf5-18/lib
50    configure.args-append       -DHDF5_INCLUDE_DIR=${prefix}/lib/hdf5-18/include \
51                                -DHDF5_C_LIBRARY=${prefix}/lib/hdf5-18/lib/libhdf5.dylib \
52                                -DHDF5_HL_LIBRARY=${prefix}/lib/hdf5-18/lib/libhdf5_hl.dylib \
53                                -DHDF5_C_LIBRARIES=${prefix}/lib/hdf5-18/lib/libhdf5.dylib \
54                                -DHDF5_HL_LIBRARIES=${prefix}/lib/hdf5-18/lib/libhdf5_hl.dylib
55}
56
57variant netcdf4 description {enable support for netcdf-4 API} {
58    depends_lib-append      port:hdf5-18
59    configure.args-delete   -DENABLE_NETCDF_4=OFF
60    configure.args-append   -DENABLE_NETCDF_4=ON
61}
62
63variant hdf4 description {enable support for hdf4} {
64    depends_lib-append      port:hdf4 \
65                            port:jpeg
66    patchfiles-append       patch-liblib-CMakeLIsts.txt.diff
67    configure.args-append   -DENABLE_HDF4=ON
68}
69
70variant dap description {enable dap} {
71    depends_lib-append      port:curl
72    configure.args-delete   -DENABLE_DAP=OFF
73    configure.args-append   -DENABLE_DAP=ON \
74                            -DENABLE_DAP_REMOTE_TESTS=OFF
75}
76
77if { [variant_exists universal] && [variant_isset universal] } {
78
79    pre-configure {
80        # record configure date (as cmake does) but ensure date will be the same for achitectures
81        # helps ensure libnetcdf.settings is the same for all architectures
82        set date [exec "/bin/date"]
83        reinplace "s|@CONFIG_DATE@|${date}|g" ${worksrcpath}/libnetcdf.settings.in
84    }
85
86    merger-post-destroot {
87        foreach arch ${universal_archs_to_use} {
88            reinplace "s|${build.dir}-${arch}|${build.dir}|g" ${destroot}-${arch}${prefix}/lib/libnetcdf.settings
89        }
90    }
91}
92
93if {[mpi_variant_isset]} {
94    configure.cflags-append -DHDF5_PARALLEL
95    configure.args-append   -DENABLE_PARALLEL_TESTS=ON
96}
97
98notes "
99As of version 4.2 c++ and fortran interfaces are separate ports,\
100netcdf-cxx and netcdf-fortran, respectively.
101"
102
103livecheck.regex     archive/[join ${github.tag_prefix} ""](\[^"rba\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.