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

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

Revbump everything which could've been built with gcc44 or gcc45. Remove gcc42 variants since gcc42 only builds on Tiger (#33919).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 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 97763 2012-09-14 18:56:08Z jeremyhu@macports.org $
3
4PortSystem          1.0
5
6name                hdf5
7version             1.6.9
8revision            3
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 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 gcc43 conflicts g95 gcc44 gcc45 description {Compile using GCC 4.3} {
80    depends_lib-append          port:gcc43
81    configure.compiler          macports-gcc-4.3
82    configure.env-append        LD=${prefix}/bin/g++-mp-4.3
83}
84
85variant gcc44 conflicts g95 gcc43 gcc45 description {Compile using GCC 4.4} {
86    depends_lib-append          port:gcc44
87    configure.compiler          macports-gcc-4.4
88    configure.env-append        LD=${prefix}/bin/g++-mp-4.4
89}
90
91variant gcc45 conflicts g95 gcc43 gcc44 description {Compile using GCC 4.5} {
92    depends_lib-append          port:gcc45
93    configure.compiler          macports-gcc-4.5
94    configure.env-append        LD=${prefix}/bin/g++-mp-4.5
95}
96
97variant g95 requires fortran conflicts gcc43 gcc44 gcc45 description {Use g95 Fortran compiler (unsupported)} {
98    depends_lib-append          port:g95
99    patchfiles-append           patch-powerpc-apple.diff
100    configure.fc                ${prefix}/bin/g95
101}
102
103variant optimized description {Higher compiler optimization for host machine (esp. for gcc43/gcc44)} {
104    configure.optflags-delete     -O2
105    configure.optflags-append     -ftree-vectorize -O3
106    if { [variant_isset gcc43] || [variant_isset gcc44] } {
107        configure.optflags-append     -march=native
108    }
109}
110
111variant mpich2 description {Parallel HDF5 with mpich2 (disables C++)} {
112    depends_lib-append          port:mpich2
113    configure.args-delete       --enable-cxx
114    configure.cc                ${prefix}/bin/mpicc
115    if { [variant_isset fortran] } {
116       configure.fc             ${prefix}/bin/mpif90
117    }
118}
Note: See TracBrowser for help on using the repository browser.