source: trunk/dports/science/netcdf/Portfile @ 92596

Last change on this file since 92596 was 92596, checked in by takeshi@…, 5 years ago

netcdf: enable build with mpich2+gcc4x. fixes #34290

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 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 92596 2012-05-02 02:24:19Z takeshi@macports.org $
3
4PortSystem                  1.0
5
6name                        netcdf
7epoch                       1
8version                     4.2
9revision                    1
10maintainers                 takeshi openmaintainer
11platforms                   darwin
12categories                  science
13license                     Permissive
14
15description                 libraries for array-oriented scientific data
16long_description \
17    NetCDF (network Common Data Form) is a set of software libraries \
18    and machine-independent data formats that support the creation,  \
19    access, and sharing of array-oriented scientific data.
20
21homepage                    http://www.unidata.ucar.edu/software/netcdf/
22
23master_sites                ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
24                            http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/ \
25                            ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/
26checksums           md5     b920a6c3a30e9cd46fe96d9fb65ef17e \
27                    sha1    949df89cd05ab8386e5f8080a183dc63c2f2f3bd \
28                    rmd160  2cc9064e96df98e82a328c8984bbb4aaf8e4d698
29
30pre-configure {
31    if {[variant_isset openmpi]} {
32        set hdf5cc [exec grep "C Compiler" ${prefix}/lib/libhdf5.settings | awk {BEGIN{FS="/"}{print $NF}}]
33        if {${hdf5cc}!="openmpicc"} {
34            ui_error "Install hdf5-18 +openmpi"
35            return -code error "hdf5-18 +openmpi not installed"
36        }
37    }
38}
39
40configure.cppflags-append   -DNDEBUG
41configure.cflags-append     -fno-common
42configure.args              --disable-doxygen \
43                            --disable-netcdf-4 \
44                            --disable-dap
45
46test.run                    yes
47test.target                 check
48
49destroot.destdir            prefix=${destroot}${prefix} \
50                            MANDIR=\\\${prefix}/share/man
51
52post-destroot {
53    file delete -force ${destroot}${prefix}/share/man/whatis.db
54}
55
56default_variants +netcdf4 +dap
57
58variant openmpi conflicts mpich2 description {compile with openmpi} {
59    depends_lib-append      port:openmpi
60    configure.cc            openmpicc
61}
62
63variant mpich2 conflicts openmpi description {compile with mpich2} {
64    depends_lib-append      port:mpich2
65    configure.cc            mpicc
66    configure.cc_archflags  ""
67    configure.ld_archflags  ""
68}
69
70variant netcdf4 description {enable support for netcdf-4 API} {
71    depends_lib-append      port:hdf5-18 port:szip
72    configure.args-delete   --disable-netcdf-4
73    configure.args-append   --enable-netcdf-4
74}
75
76variant hdf4 description {enable support for hdf4} {
77    depends_lib-append    port:hdf4
78    configure.args-append --enable-hdf4 \
79                          --disable-hdf4-file-tests
80}
81 
82variant dap description {enable dap} {
83    depends_lib-append      port:curl
84    configure.args-delete   --disable-dap
85}
86
87variant static description {dummy. obsolete option} {
88}
89
90notes "
91As of version 4.2 c++ and fortran interfaces are separate ports,\
92netcdf-cxx and netcdf-fortran, respectively.
93"
Note: See TracBrowser for help on using the repository browser.