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 92994 2012-05-13 18:14:34Z mmoll@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup muniversal 1.0 |
---|
6 | |
---|
7 | set realname hdf5 |
---|
8 | name ${realname}-18 |
---|
9 | version 1.8.9 |
---|
10 | categories science |
---|
11 | maintainers mmoll openmaintainer |
---|
12 | |
---|
13 | description HDF5 general purpose library and file format for storing\ |
---|
14 | scientific data |
---|
15 | long_description HDF5 is a data model, library, and file format for storing\ |
---|
16 | and managing data. It supports an unlimited variety of\ |
---|
17 | datatypes, and is designed for flexible and efficient I/O\ |
---|
18 | and for high volume and complex data. HDF5 is portable and\ |
---|
19 | is extensible, allowing applications to evolve in their use\ |
---|
20 | of HDF5. The HDF5 Technology suite includes tools and\ |
---|
21 | applications for managing, manipulating, viewing, and\ |
---|
22 | analyzing data in the HDF5 format. |
---|
23 | homepage http://www.hdfgroup.org/HDF5/ |
---|
24 | platforms darwin |
---|
25 | conflicts hdf5 |
---|
26 | master_sites \ |
---|
27 | http://www.hdfgroup.org/ftp/HDF5/current/src \ |
---|
28 | ftp://ftp.hdfgroup.org/HDF5/current/src/ \ |
---|
29 | ftp://ftp.hdfgroup.org/HDF5/prev-releases/hdf5-${version}/src/ |
---|
30 | checksums \ |
---|
31 | rmd160 4c1a4160fbac6befa15b2dc039f20858c31db37d \ |
---|
32 | sha256 fafe54856b00f0d6531629f66e2c476ab6ee03458803088f270bbfc4a60966c7 |
---|
33 | distname ${realname}-${version} |
---|
34 | use_bzip2 yes |
---|
35 | depends_lib port:zlib |
---|
36 | use_parallel_build yes |
---|
37 | |
---|
38 | configure.args --with-zlib=yes --enable-filters=all \ |
---|
39 | --enable-production --disable-fortran \ |
---|
40 | --disable-cxx --enable-shared --enable-static \ |
---|
41 | --disable-parallel --disable-threadsafe |
---|
42 | |
---|
43 | # http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/2010-March/002682.html |
---|
44 | license NCSA |
---|
45 | |
---|
46 | default_variants +cxx |
---|
47 | |
---|
48 | post-configure { |
---|
49 | if {[variant_isset universal]} { |
---|
50 | set dirs {} |
---|
51 | foreach arch ${universal_archs_to_use} { |
---|
52 | lappend dirs ${worksrcpath}-${arch} |
---|
53 | } |
---|
54 | } else { |
---|
55 | set dirs ${worksrcpath} |
---|
56 | } |
---|
57 | foreach dir ${dirs} { |
---|
58 | reinplace -E {s|-arch [a-z0-9_]+||g} \ |
---|
59 | ${dir}/tools/misc/h5cc \ |
---|
60 | ${dir}/c++/src/h5c++ \ |
---|
61 | ${dir}/src/libhdf5.settings \ |
---|
62 | ${dir}/fortran/src/h5fc |
---|
63 | } |
---|
64 | } |
---|
65 | |
---|
66 | test.run yes |
---|
67 | test.target check |
---|
68 | |
---|
69 | variant szip description {Enable szip support. (Noncommercial license)} { |
---|
70 | depends_lib-append port:szip |
---|
71 | configure.args-append --with-szlib=yes |
---|
72 | license Noncommercial |
---|
73 | } |
---|
74 | |
---|
75 | variant cxx description { |
---|
76 | Enable c++ interfance. |
---|
77 | +cxx is EXPERIMENTAL with +mpich2, +openmpi, or +threadsafe |
---|
78 | } { |
---|
79 | configure.args-delete --disable-cxx |
---|
80 | configure.args-append --enable-cxx |
---|
81 | } |
---|
82 | |
---|
83 | variant fortran description { |
---|
84 | Enable fortran bindings. If combined with +openmpi or +mpich2, the\ |
---|
85 | respective MPI package must have been built with fortran support. |
---|
86 | Must be combined with +gcc44, +gcc45, +gcc46, +mpich2, or +openmpi |
---|
87 | +fortran is EXPERIMENTAL with +threadsafe |
---|
88 | } { |
---|
89 | configure.args-delete --disable-fortran |
---|
90 | configure.args-append --enable-fortran |
---|
91 | } |
---|
92 | |
---|
93 | if {[ variant_isset fortran ] && |
---|
94 | !([variant_isset mpich2 ] || |
---|
95 | [variant_isset openmpi ] || |
---|
96 | [variant_isset gcc44] || |
---|
97 | [variant_isset gcc45] || |
---|
98 | [variant_isset gcc46]) } { |
---|
99 | ui_error "+fortran requires +mpich2, +openmpi, or +gccNN" |
---|
100 | return -code error |
---|
101 | } |
---|
102 | |
---|
103 | variant threadsafe description { |
---|
104 | Enable threadsafety. |
---|
105 | +threadsafe is EXPERIMENTAL with +cxx, +fortran, +mpich2 or +openmpi |
---|
106 | } { |
---|
107 | configure.args-delete --disable-threadsafe |
---|
108 | configure.args-append --enable-threadsafe --with-pthread |
---|
109 | } |
---|
110 | |
---|
111 | if {[ variant_isset threadsafe ] && ([ variant_isset cxx] || |
---|
112 | [ variant_isset fortran]) || |
---|
113 | ([ variant_isset mpich2 ] || [ variant_isset openmpi ]) && |
---|
114 | ([ variant_isset cxx ] || [ variant_isset threadsafe ]) } { |
---|
115 | |
---|
116 | # Tell hdf5-18 to configure in this experimental configuration |
---|
117 | configure.args-append --enable-unsupported |
---|
118 | |
---|
119 | notes { |
---|
120 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
121 | hdf5-18 has been installed in an unsupported "Experimental" mode due to\ |
---|
122 | selected variants. See "port variants hdf5-18 | grep EXPERIMENTAL" for more\ |
---|
123 | information. |
---|
124 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
125 | } |
---|
126 | |
---|
127 | pre-configure { |
---|
128 | ui_warn { |
---|
129 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
130 | hdf5-18 will been configured in an unsupported "Experimental" mode due to\ |
---|
131 | selected variants. See "port variants hdf5-18 | grep EXPERIMENTAL" for more\ |
---|
132 | information. |
---|
133 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
134 | } |
---|
135 | } |
---|
136 | } |
---|
137 | |
---|
138 | # openmpi conflicts with universal because there is no universal variant for |
---|
139 | # the openmpi port at the moment |
---|
140 | variant openmpi description { |
---|
141 | Enable Parallel HDF5 with openmpi. Uses compiler selected with openmpi. |
---|
142 | +openmpi is EXPERIMENTAL with +cxx or +threadsafe. |
---|
143 | } conflicts universal mpich2 gcc44 gcc45 gcc46 { |
---|
144 | depends_lib-append port:openmpi |
---|
145 | configure.cc ${prefix}/bin/openmpicc |
---|
146 | configure.cxx ${prefix}/bin/openmpicxx |
---|
147 | configure.fc ${prefix}/bin/openmpif90 |
---|
148 | } |
---|
149 | |
---|
150 | # mpich2 port does not support universal |
---|
151 | variant mpich2 description { |
---|
152 | Enable Parallel HDF5 with mpich2. Uses compiler selected with mpich2. |
---|
153 | +mpich2 is EXPERIMENTAL with +cxx or +threadsafe. |
---|
154 | } conflicts universal openmpi gcc44 gcc45 gcc46 { |
---|
155 | depends_lib-append path:bin/mpicc:mpich2 |
---|
156 | configure.cc ${prefix}/bin/mpicc |
---|
157 | configure.cxx ${prefix}/bin/mpicxx |
---|
158 | configure.fc ${prefix}/bin/mpif90 |
---|
159 | } |
---|
160 | |
---|
161 | if {[ variant_isset mpich2 ] || [ variant_isset openmpi ]} { |
---|
162 | # These are compiler wrappers that already have MP's flags built in. |
---|
163 | configure.cflags |
---|
164 | configure.cxxflags |
---|
165 | configure.ldflags |
---|
166 | configure.fcflags |
---|
167 | configure.cc_archflags |
---|
168 | configure.cxx_archflags |
---|
169 | configure.fc_archflags |
---|
170 | configure.ld_archflags |
---|
171 | configure.args-delete --disable-parallel |
---|
172 | configure.args-append --enable-parallel |
---|
173 | } |
---|
174 | |
---|
175 | variant gcc44 description { |
---|
176 | Build with MacPorts' gcc44 compiler. |
---|
177 | } conflicts universal gcc45 gcc46 openmpi mpich2 { |
---|
178 | depends_lib-append port:gcc44 |
---|
179 | configure.compiler macports-gcc-4.4 |
---|
180 | } |
---|
181 | |
---|
182 | variant gcc45 description { |
---|
183 | Build with MacPorts' gcc45 compiler. |
---|
184 | } conflicts universal gcc44 gcc46 openmpi mpich2 { |
---|
185 | depends_lib-append port:gcc45 |
---|
186 | configure.compiler macports-gcc-4.5 |
---|
187 | } |
---|
188 | |
---|
189 | variant gcc46 description { |
---|
190 | Build with MacPorts' gcc46 compiler. |
---|
191 | } conflicts universal gcc44 gcc45 openmpi mpich2 { |
---|
192 | depends_lib-append port:gcc46 |
---|
193 | configure.compiler macports-gcc-4.6 |
---|
194 | } |
---|
195 | |
---|
196 | |
---|
197 | livecheck.type regex |
---|
198 | livecheck.url http://www.hdfgroup.org/HDF5/release/obtain5.html |
---|
199 | livecheck.regex 5-(\[0-9.\]+) |
---|