source: trunk/dports/science/hdf5/Portfile

Last change on this file was 153822, checked in by takeshi@…, 12 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: 5.9 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
9name                hdf5
10version             1.10.0-patch1
11set shortversion    [join [lrange [split ${version} .] 0 1] .]
12categories          science
13maintainers         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-${shortversion}/hdf5-${version}/src
29checksums           rmd160  ff1cb4eba1751585a4c8f589c09b56ef917659c8 \
30                    sha256  f772264dd853dceb18855418a81c63c9cdcca7bcd075b9c54eb516af006fdfba
31mpi.setup           -gcc44 -gcc45
32
33use_bzip2           yes
34depends_lib         port:zlib
35use_parallel_build  yes
36
37# nawk: bailing out at source line 273
38conflicts_build     nawk
39
40# llvm-gcc-4.2 produced code fails type conversion tests
41# Upstream suggestion is use -O0. Clang-produced code passes all tests.
42compiler.blacklist  llvm-gcc-4.2
43
44# Use lib/hdf5 rather than hdf5/lib plugin directory
45configure.args      --with-zlib=yes \
46                    --enable-build-mode=production --disable-fortran \
47                    --disable-cxx --disable-hl --enable-shared --enable-static \
48                    --disable-parallel --disable-threadsafe \
49                    --with-default-plugindir=${prefix}/lib/hdf5
50
51# http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/2010-March/002682.html
52license             NCSA
53
54default_variants    +cxx +hl
55
56post-configure {
57    if {[variant_isset universal]} {
58        set dirs {}
59        foreach arch ${universal_archs_to_use} {
60            lappend dirs ${worksrcpath}-${arch}
61        }
62    } else {
63        set dirs ${worksrcpath}
64    }
65    foreach dir ${dirs} {
66        reinplace -E {s|-arch [a-z0-9_]+||g} \
67            ${dir}/tools/misc/h5cc \
68            ${dir}/c++/src/h5c++ \
69            ${dir}/src/libhdf5.settings \
70            ${dir}/fortran/src/h5fc
71        reinplace {s|ccache ||} ${dir}/tools/misc/h5cc
72        reinplace {s|ccache ||} ${dir}/c++/src/h5c++
73    }
74}
75
76post-destroot {
77    xinstall -d ${destroot}${prefix}/share/hdf5/
78    xinstall -m 444 ${worksrcpath}/COPYING\
79      ${destroot}${prefix}/share/hdf5/
80}
81
82pre-activate {
83    if {![catch {set installed [lindex [registry_active hdf5-18] 0]}]} {
84        set _version [lindex $installed 1]
85        if {[vercmp $_version 1.8.15] < 0} {
86            registry_deactivate_composite hdf5-18 "" [list ports_nodepcheck 1]
87        }
88    }
89}
90
91test.run            yes
92test.target         check
93
94variant szip description {Enable szip support. (Noncommercial license)} {
95    depends_lib-append          port:szip
96    configure.args-append       --with-szlib=yes
97    license                     Noncommercial
98}
99
100variant hl description {
101    Enable High Level interface.
102  +hl is EXPERIMENTAL with +threadsafe
103} {
104    configure.args-delete       --disable-hl
105    configure.args-append       --enable-hl
106}
107
108variant cxx description {
109    Enable c++ interfance.
110  +cxx is EXPERIMENTAL with +threadsafe or any mpi variant
111} {
112    configure.args-delete       --disable-cxx
113    configure.args-append       --enable-cxx
114}
115
116variant fortran description {
117    Enable fortran bindings.
118  +fortran is EXPERIMENTAL with +threadsafe
119} {
120    configure.args-delete       --disable-fortran
121    configure.args-append       --enable-fortran --enable-fortran2003
122
123    if {![fortran_variant_isset]} {
124        default_variants +gfortran
125    }
126}
127
128if {[ variant_isset fortran ] && ![ fortran_variant_isset ] } {
129    ui_error "+fortran requires a fortran compiler to be selected"
130    return -code error
131}
132
133if {([ variant_isset gfortran ] || [ variant_isset g95 ]) && ![ variant_isset fortran ]} {
134    default_variants +fortran
135}
136
137variant threadsafe description {
138    Enable threadsafety.
139  +threadsafe is EXPERIMENTAL with +cxx, +fortran, or any mpi variant
140} {
141    configure.args-delete       --disable-threadsafe
142    configure.args-append       --enable-threadsafe --with-pthread
143}
144
145if {[ variant_isset threadsafe ] && ([ variant_isset cxx ] ||
146                                     [ variant_isset hl ] ||
147                                     [ variant_isset fortran ]) ||
148    ([ mpi_variant_isset ])  &&
149    ([ variant_isset cxx ]   || [ variant_isset threadsafe ])  } {
150
151    # Tell hdf5 to configure in this experimental configuration
152    configure.args-append       --enable-unsupported
153
154    notes {
155!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
156hdf5 has been installed in an unsupported "Experimental" mode due to\
157selected variants. See "port variants hdf5 | grep EXPERIMENTAL" for more\
158information.
159!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
160    }
161
162    pre-configure {
163        ui_warn {
164!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
165hdf5 will been configured in an unsupported "Experimental" mode due to\
166selected variants. See "port variants hdf5 | grep EXPERIMENTAL" for more\
167information.
168!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
169    }
170    }
171}
172
173if {[ mpi_variant_isset ]} {
174    configure.args-delete       --disable-parallel
175    configure.args-append       --enable-parallel
176}
177
178livecheck.type      regex
179livecheck.url       http://www.hdfgroup.org/HDF5/release/obtain5.html
180livecheck.regex     5-(\[0-9.\]+\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.