source: trunk/dports/science/hdf5-18/Portfile

Last change on this file was 153822, checked in by takeshi@…, 11 months ago

hdf5 update to 1.10.0-patch1 and df5-18 1.18.17. remove ccache from h5c++

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.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 153822 2016-10-12 13:45:05Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           conflicts_build 1.0
6PortGroup           muniversal 1.0
7PortGroup           mpi 1.0
8
9set realname        hdf5
10name                hdf5-18
11version             1.8.17
12categories          science
13maintainers         takeshi mmoll openmaintainer
14
15description         HDF5 general purpose library and file format for storing\
16                    scientific data
17long_description    HDF5 is a data model, library, and file format for storing\
18                    and managing data. It supports an unlimited variety of\
19                    datatypes, and is designed for flexible and efficient I/O\
20                    and for high volume and complex data. HDF5 is portable and\
21                    is extensible, allowing applications to evolve in their use\
22                    of HDF5. The HDF5 Technology suite includes tools and\
23                    applications for managing, manipulating, viewing, and\
24                    analyzing data in the HDF5 format.
25homepage            http://www.hdfgroup.org/HDF5/
26platforms           darwin
27master_sites \
28    http://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${version}/src/ \
29    ftp://ftp.hdfgroup.org/HDF5/releases/hdf5-${version}/src/
30checksums           rmd160  a7e45f68896d4ad56faff0b94800904e2f377321 \
31                    sha256  fc35dd8fd8d398de6b525b27cc111c21fc79795ad6db1b1f12cb15ed1ee8486a
32mpi.setup           -gcc44 -gcc45
33
34distname            ${realname}-${version}
35dist_subdir         ${realname}
36
37use_bzip2           yes
38depends_lib         port:zlib
39use_parallel_build  yes
40
41# nawk: bailing out at source line 273
42conflicts_build     nawk
43
44# Don't create dylibs with "-flat_namespace -undefined suppress" on
45# Yosemite and later (#44596).
46patchfiles          yosemite-libtool.patch \
47                    patch-tools-misc-h5cc.in.diff
48
49# llvm-gcc-4.2 produced code fails type conversion tests
50# Upstream suggestion is use -O0. Clang-produced code passes all tests.
51compiler.blacklist  llvm-gcc-4.2
52
53# Use lib/hdf5 rather than hdf5/lib plugin directory
54configure.args      --with-zlib=yes \
55                    --enable-production --disable-fortran \
56                    --disable-cxx --disable-hl --enable-shared --enable-static \
57                    --disable-parallel --disable-threadsafe \
58                    --with-default-plugindir=${prefix}/lib/${name} \
59                    --prefix=${prefix}/lib/${name}
60
61# http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/2010-March/002682.html
62license             NCSA
63
64default_variants    +cxx +hl
65
66post-configure {
67    if {[variant_isset universal]} {
68        set dirs {}
69        foreach arch ${universal_archs_to_use} {
70            lappend dirs ${worksrcpath}-${arch}
71        }
72    } else {
73        set dirs ${worksrcpath}
74    }
75    foreach dir ${dirs} {
76        reinplace -E {s|-arch [a-z0-9_]+||g} \
77            ${dir}/tools/misc/h5cc \
78            ${dir}/c++/src/h5c++ \
79            ${dir}/src/libhdf5.settings \
80            ${dir}/fortran/src/h5fc
81        reinplace {s|ccache ||} ${dir}/tools/misc/h5cc
82        reinplace {s|ccache ||} ${dir}/c++/src/h5c++
83    }
84}
85
86pre-activate {
87    if {![catch {set installed [lindex [registry_active hdf5-18] 0]}]} {
88        set _version [lindex $installed 1]
89        if {[vercmp $_version 1.8.15] < 0} {
90            registry_deactivate_composite hdf5-18 "" [list ports_nodepcheck 1]
91        }
92    }
93}
94
95test.run            yes
96test.target         check
97
98variant szip description {Enable szip support. (Noncommercial license)} {
99    depends_lib-append          port:szip
100    configure.args-append       --with-szlib=yes
101    license                     Noncommercial
102}
103
104variant hl description {
105    Enable High Level interface.
106  +hl is EXPERIMENTAL with +threadsafe
107} {
108    configure.args-delete       --disable-hl
109    configure.args-append       --enable-hl
110}
111
112variant cxx description {
113    Enable c++ interfance.
114  +cxx is EXPERIMENTAL with +threadsafe or any mpi variant
115} {
116    configure.args-delete       --disable-cxx
117    configure.args-append       --enable-cxx
118}
119
120variant fortran description {
121    Enable fortran bindings.
122  +fortran is EXPERIMENTAL with +threadsafe
123} {
124    configure.args-delete       --disable-fortran
125    configure.args-append       --enable-fortran --enable-fortran2003
126
127    if {![fortran_variant_isset]} {
128        default_variants +gfortran
129    }
130}
131
132if {[ variant_isset fortran ] && ![ fortran_variant_isset ] } {
133    ui_error "+fortran requires a fortran compiler to be selected"
134    return -code error
135}
136
137if {([ variant_isset gfortran ] || [ variant_isset g95 ]) && ![ variant_isset fortran ]} {
138    default_variants +fortran
139}
140
141variant threadsafe description {
142    Enable threadsafety.
143  +threadsafe is EXPERIMENTAL with +cxx, +fortran, or any mpi variant
144} {
145    configure.args-delete       --disable-threadsafe
146    configure.args-append       --enable-threadsafe --with-pthread
147}
148
149if {[ variant_isset threadsafe ] && ([ variant_isset cxx ] ||
150                                     [ variant_isset hl ] ||
151                                     [ variant_isset fortran ]) ||
152    ([ mpi_variant_isset ])  &&
153    ([ variant_isset cxx ]   || [ variant_isset threadsafe ])  } {
154
155    # Tell hdf5 to configure in this experimental configuration
156    configure.args-append       --enable-unsupported
157
158    notes {
159!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
160hdf5-18 has been installed in an unsupported "Experimental" mode due to\
161selected variants. See "port variants hdf5-18 | grep EXPERIMENTAL" for more\
162information.
163!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
164    }
165
166    pre-configure {
167        ui_warn {
168!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
169hdf5-18 will been configured in an unsupported "Experimental" mode due to\
170selected variants. See "port variants hdf5-18 | grep EXPERIMENTAL" for more\
171information.
172!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
173    }
174    }
175}
176
177if {[ mpi_variant_isset ]} {
178    configure.args-delete       --disable-parallel
179    configure.args-append       --enable-parallel
180}
181
182livecheck.type      regex
183livecheck.url       http://www.hdfgroup.org/HDF5/release/obtain5.html
184livecheck.regex     5-(\[0-9.\]+\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.