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

Last change on this file since 36548 was 36548, checked in by jochen@…, 12 years ago

make threadafe-variant as experimental

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 36548 2008-05-06 09:05:38Z jochen@macports.org $
3
4PortSystem          1.0
5
6# This Portfile still follows 1.6.x, in the spirit of 1.8 not being ready for production.
7# We should provide a hdf5-devel port for 1.8 at this time, I guess.
8name                hdf5
9version             1.6.7
10revision            5
11categories          science
12maintainers         openmaintainer jochen
13
14description         HDF5 general purpose library and file format for storing scientific data
15long_description    ${description}
16homepage            http://www.hdfgroup.org/HDF5/
17platforms           darwin
18master_sites        ftp://ftp.hdfgroup.org/HDF5/current16/src/
19checksums           md5 79027c67188e2e4131c5573771f477ce \
20                    sha1 9c26fe09cdad269c9a6757933f70ca164a47b8e8 \
21                    rmd160 2dbbcccd32986dcd66ce804c5e90ac6c949b71f6
22
23depends_lib         port:zlib
24patchfiles          patch-gnu-flags.diff \
25                    patch-commence.diff patch-c-commence.diff \
26                    patch-fortran-commence.diff patch-H5f90i.diff \
27                    patch-H5PropList.cpp.diff
28
29use_parallel_build  yes
30configure.args      --enable-cxx --with-zlib=yes --with-szlib=no
31configure.ldflags   -L${worksrcpath}/src/.libs -L${prefix}/lib
32destroot.destdir    prefix=${destroot}${prefix}
33test.run            yes
34test.target         check
35
36
37variant fortran description {Include the Fortran interface} {
38    if { [variant_isset gcc43] || [variant_isset gcc42] || [variant_isset g95] } {
39        configure.args-delete   --disable-fortran
40        configure.args-append   --enable-fortran
41    } else {
42        error "You must specify a compiler variant in order to build the Fortran interface"
43    }
44}
45
46variant szip description {Enable szip compression support} {
47    configure.args-delete       --with-szlib=no
48    configure.args-append       --with-szlib=yes
49    depends_lib-append          port:szip
50}
51
52variant threadsafe description {Enable threadsafety (experimental, fails unit-tests)} {
53    configure.args-delete       --disable-threadsafe
54    configure.args-append       --enable-threadsafe
55}
56
57
58variant gcc42 conflicts g95 gcc43 description {Compile using GCC 4.2} {
59    depends_lib-append          port:gcc42
60    configure.compiler          macports-gcc-4.2
61}
62
63variant gcc43 conflicts g95 gcc42 description {Compile using GCC 4.3} {
64    depends_lib-append          port:gcc43
65    configure.compiler          macports-gcc-4.3
66}
67
68variant g95 conflicts gcc42 gcc43 description {Use g95 Fortran compiler} {
69    depends_lib-append          port:g95
70    default_variants-append     fortran
71    patchfiles-append           patch-powerpc-apple.diff
72    configure.fc                ${prefix}/bin/g95
73    configure.fflags            -fno-second-underscore
74}
75
76variant optimized description {Higher compiler optimization for host machine (esp. for gcc43)} {
77    if { [variant_isset gcc43] } {
78        configure.cflags-delete     -O2
79        configure.cxxflags-delete   -O2
80        configure.fflags-delete     -O2
81        configure.cflags-append     -ftree-vectorize -march=native -O3
82        configure.cxxflags-append   -ftree-vectorize -march=native -O3
83        configure.fflags-append     -ftree-vectorize -march=native -O3
84    } else {
85        configure.cflags-delete     -O2
86        configure.cxxflags-delete   -O2
87        configure.fflags-delete     -O2
88        configure.cflags-append     -ftree-vectorize -O3
89        configure.cxxflags-append   -ftree-vectorize -O3
90        configure.fflags-append     -ftree-vectorize -O3
91    }
92}
Note: See TracBrowser for help on using the repository browser.