source: trunk/dports/science/hdf5/Portfile @ 95095

Last change on this file since 95095 was 95095, checked in by cal@…, 8 years ago

hdf5: Fix rev-upgrade problem by not installing offending binary, closes #34494

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 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 95095 2012-07-05 19:29:51Z cal@macports.org $
3
4PortSystem          1.0
5
6name                hdf5
7version             1.6.9
8revision            2
9categories          science
10license             NCSA
11maintainers         nomaintainer
12
13description         HDF5 general purpose library and file format for storing scientific data
14long_description    ${description}
15homepage            http://www.hdfgroup.org/HDF5/
16platforms           darwin
17conflicts           hdf5-18
18master_sites        ftp://ftp.hdfgroup.org/HDF5/current16/src/ \
19                    ftp://ftp.hdfgroup.org/HDF5/prev-releases/hdf5-${version}/src/
20
21checksums           md5 751eb3317a47e7c58978e1c3a13a93fc \
22                    sha1 0481ce8cf2e62b9b10418065901369d4e0dbb4dc \
23                    rmd160 05ca8a3229bdd6e214d0e843afc065d0fe9f47c7
24
25depends_lib         port:zlib
26patchfiles          patch-commence.diff patch-c-commence.diff \
27                    patch-fortran-commence.diff patch-H5f90i.diff \
28                    patch-configure.diff patch-c++_configure.diff \
29                    patch-fortran_configure.diff
30
31universal_variant   no
32
33use_parallel_build  yes
34configure.ccache    no
35
36configure.args      --enable-cxx --with-zlib=yes --with-szlib=no --enable-shared
37configure.ldflags   -L${worksrcpath}/src/.libs -L${prefix}/lib
38
39if {${os.platform} == "darwin" && [string match *64 $build_arch]} {
40    configure.args-append --build=${build_arch}-apple-${os.platform}${os.version}
41}
42
43post-destroot {
44    # remove h5perf, which is pretty useless and would cause a rev-upgrade warning because it links
45    # against libh5test.dylib, which is not being installed
46    file delete ${destroot}${prefix}/bin/h5perf
47}
48
49destroot.destdir    prefix=${destroot}${prefix}
50
51test.run            yes
52test.target         check
53
54
55# variant descriptions
56
57variant fortran description {Include the Fortran interface} {
58    configure.args-delete   --disable-fortran
59    configure.args-append   --enable-fortran
60    pre-fetch {
61        if { ![variant_isset gcc45] && ![variant_isset gcc44] && ![variant_isset gcc43] && ![variant_isset gcc42] && ![variant_isset g95] } {
62            error "You must specify a compiler variant in order to build the Fortran interface"
63        }
64    }
65}
66
67variant szip description {Enable szip compression support} {
68    configure.args-delete       --with-szlib=no
69    configure.args-append       --with-szlib=yes
70    depends_lib-append          port:szip
71}
72
73variant threadsafe description {Enable threadsafety (experimental, fails unit-tests)} {
74    configure.args-delete       --disable-threadsafe
75    configure.args-append       --enable-threadsafe
76}
77
78
79variant gcc42 conflicts g95 gcc43 gcc44 gcc45 description {Compile using GCC 4.2} {
80    depends_lib-append          port:gcc42
81    configure.compiler          macports-gcc-4.2
82}
83
84variant gcc43 conflicts g95 gcc42 gcc44 gcc45 description {Compile using GCC 4.3} {
85    depends_lib-append          port:gcc43
86    configure.compiler          macports-gcc-4.3
87    configure.env-append        LD=${prefix}/bin/g++-mp-4.3
88}
89
90variant gcc44 conflicts g95 gcc42 gcc43 gcc45 description {Compile using GCC 4.4} {
91    depends_lib-append          port:gcc44
92    configure.compiler          macports-gcc-4.4
93    configure.env-append        LD=${prefix}/bin/g++-mp-4.4
94}
95
96variant gcc45 conflicts g95 gcc42 gcc43 gcc44 description {Compile using GCC 4.5} {
97    depends_lib-append          port:gcc45
98    configure.compiler          macports-gcc-4.5
99    configure.env-append        LD=${prefix}/bin/g++-mp-4.5
100}
101
102variant g95 requires fortran conflicts gcc42 gcc43 gcc44 gcc45 description {Use g95 Fortran compiler (unsupported)} {
103    depends_lib-append          port:g95
104    patchfiles-append           patch-powerpc-apple.diff
105    configure.fc                ${prefix}/bin/g95
106}
107
108variant optimized description {Higher compiler optimization for host machine (esp. for gcc43/gcc44)} {
109    configure.optflags-delete     -O2
110    configure.optflags-append     -ftree-vectorize -O3
111    if { [variant_isset gcc43] || [variant_isset gcc44] } {
112        configure.optflags-append     -march=native
113    }
114}
115
116variant mpich2 description {Parallel HDF5 with mpich2 (disables C++)} {
117    depends_lib-append          port:mpich2
118    configure.args-delete       --enable-cxx
119    configure.cc                ${prefix}/bin/mpicc
120    if { [variant_isset fortran] } {
121       configure.fc             ${prefix}/bin/mpif90
122    }
123}
Note: See TracBrowser for help on using the repository browser.