Ticket #35457: Portfile.2.diff

File Portfile.2.diff, 8.8 KB (added by eborisch (Eric A. Borisch), 12 years ago)

The diff for ease of discussion...

  • Portfile

     
    1010categories          science
    1111maintainers         mmoll openmaintainer
    1212
    13 description         HDF5 general purpose library and file format for storing scientific data
    14 long_description    ${description}
     13description         HDF5 general purpose library and file format for storing\
     14                    scientific data
     15long_description    HDF5 is a data model, library, and file format for storing\
     16                    and managing data. It supports an unlimited variety of\
     17                    datatypes, and is designed for flexible and efficient I/O\
     18                    and for high volume and complex data. HDF5 is portable and\
     19                    is extensible, allowing applications to evolve in their use\
     20                    of HDF5. The HDF5 Technology suite includes tools and\
     21                    applications for managing, manipulating, viewing, and\
     22                    analyzing data in the HDF5 format.
    1523homepage            http://www.hdfgroup.org/HDF5/
    1624platforms           darwin
    1725conflicts           hdf5
    18 master_sites        http://www.hdfgroup.org/ftp/HDF5/current/src \
    19                     ftp://ftp.hdfgroup.org/HDF5/current/src/ \
    20                     ftp://ftp.hdfgroup.org/HDF5/prev-releases/hdf5-${version}/src/
    21 checksums           md5     33e105583417eff1c57fff910a53cd6f \
    22                     sha1    7d5e5e8caa5970c65e70a5b4ad6787efe0bf70bb \
    23                     rmd160  4c1a4160fbac6befa15b2dc039f20858c31db37d
     26master_sites \
     27    http://www.hdfgroup.org/ftp/HDF5/current/src \
     28    ftp://ftp.hdfgroup.org/HDF5/current/src/ \
     29    ftp://ftp.hdfgroup.org/HDF5/prev-releases/hdf5-${version}/src/
     30checksums \
     31    rmd160  4c1a4160fbac6befa15b2dc039f20858c31db37d \
     32    sha256  fafe54856b00f0d6531629f66e2c476ab6ee03458803088f270bbfc4a60966c7
    2433distname            ${realname}-${version}
    2534use_bzip2           yes
    2635depends_lib         port:zlib
     
    2837
    2938configure.args      --with-zlib=yes --enable-filters=all \
    3039                    --enable-production --disable-fortran \
    31                     --enable-cxx --enable-shared --enable-static \
    32                     --disable-parallel
     40                    --disable-cxx --enable-shared --enable-static \
     41                    --disable-parallel --disable-threadsafe
    3342
    3443# http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/2010-March/002682.html
    3544license             NCSA
    3645
     46default_variants    +cxx
     47
    3748post-configure {
    3849    if {[variant_isset universal]} {
    3950        set dirs {}
     
    6172    license                     Noncommercial
    6273}
    6374
     75variant cxx description {
     76    Enable c++ interfance.
     77  +cxx is EXPERIMENTAL with +mpich2, +openmpi, or +threadsafe
     78} {
     79    configure.args-delete       --disable-cxx
     80    configure.args-append       --enable-cxx
     81}
    6482
    65 variant threadsafe description {Enable threadsafety (experimental and un-supported, disables cxx support)} conflicts openmpi {
    66     configure.args-delete       --disable-threadsafe --enable-cxx
    67     configure.args-append       --enable-threadsafe --disable-cxx
     83variant fortran description {
     84    Enable fortran bindings. If combined with +openmpi or +mpich2, the\
     85    respective MPI package must have been built with fortran support.
     86  Must be combined with +gcc44, +gcc45, +gcc46, +mpich2, or +openmpi
     87  +fortran is EXPERIMENTAL with +threadsafe
     88} {
     89    configure.args-delete       --disable-fortran
     90    configure.args-append       --enable-fortran
    6891}
    6992
     93if {[ variant_isset fortran ] &&
     94    !([variant_isset mpich2 ]  ||
     95      [variant_isset openmpi ] ||
     96      [variant_isset gcc44]    ||
     97      [variant_isset gcc45]    ||
     98      [variant_isset gcc46]) } {
     99    ui_error "+fortran requires +mpich2, +openmpi, or +gccNN"
     100    return -code error
     101}
     102
     103variant threadsafe description {
     104    Enable threadsafety.
     105  +threadsafe is EXPERIMENTAL with +cxx, +fortran, +mpich2 or +openmpi
     106} {
     107    configure.args-delete       --disable-threadsafe
     108    configure.args-append       --enable-threadsafe --with-pthread
     109}
     110
     111if {[ variant_isset threadsafe ] && ([ variant_isset cxx] ||
     112                                     [ variant_isset fortran]) ||
     113    ([ variant_isset mpich2 ] || [ variant_isset openmpi ]) &&
     114    ([ variant_isset cxx ]    || [ variant_isset threadsafe ])  } {
     115   
     116    # Tell hdf5-18 to configure in this experimental configuration
     117    configure.args-append       --enable-unsupported
     118
     119    notes {
     120!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     121hdf5-18 has been installed in an unsupported "Experimental" mode due to\
     122selected variants. See "port variants hdf5-18 | grep EXPERIMENTAL" for more\
     123information.
     124!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     125    }
     126
     127    pre-configure {
     128        ui_warn {
     129!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     130hdf5-18 will been configured in an unsupported "Experimental" mode due to\
     131selected variants. See "port variants hdf5-18 | grep EXPERIMENTAL" for more\
     132information.
     133!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     134    }
     135    }
     136}
     137
    70138# openmpi conflicts with universal because there is no universal variant for
    71139# the openmpi port at the moment
    72 variant openmpi description {Enable Parallel HDF5} conflicts threadsafe universal {
     140variant openmpi description {
     141    Enable Parallel HDF5 with openmpi. Uses compiler selected with openmpi.
     142  +openmpi is EXPERIMENTAL with +cxx or +threadsafe.
     143} conflicts universal mpich2 gcc44 gcc45 gcc46 {
    73144    depends_lib-append          port:openmpi
    74145    configure.cc                ${prefix}/bin/openmpicc
    75     configure.args-delete       --disable-parallel --enable-cxx
    76     configure.args-append       --enable-parallel --disable-cxx
     146    configure.cxx               ${prefix}/bin/openmpicxx
     147    configure.fc                ${prefix}/bin/openmpif90
    77148}
    78149
     150# mpich2 port does not support universal
     151variant mpich2 description {
     152    Enable Parallel HDF5 with mpich2. Uses compiler selected with mpich2.
     153  +mpich2 is EXPERIMENTAL with +cxx or +threadsafe.
     154} conflicts universal openmpi gcc44 gcc45 gcc46 {
     155    depends_lib-append          path:bin/mpicc:mpich2
     156    configure.cc                ${prefix}/bin/mpicc
     157    configure.cxx               ${prefix}/bin/mpicxx
     158    configure.fc                ${prefix}/bin/mpif90
     159}
    79160
    80 variant gcc44 description {Enable Fortran bindings (gfortran 4.4)} conflicts threadsafe universal gcc45 gcc46 {
     161if {[ variant_isset mpich2 ] || [ variant_isset openmpi ]} {
     162    # These are compiler wrappers that already have MP's flags built in.
     163    configure.cflags
     164    configure.cxxflags
     165    configure.ldflags
     166    configure.fcflags
     167    configure.cc_archflags
     168    configure.cxx_archflags
     169    configure.fc_archflags
     170    configure.ld_archflags
     171    configure.args-delete       --disable-parallel
     172    configure.args-append       --enable-parallel
     173}
     174
     175variant gcc44 description {
     176    Build with MacPorts' gcc44 compiler.
     177} conflicts universal gcc45 gcc46 openmpi mpich2 {
    81178    depends_lib-append          port:gcc44
    82     configure.fc                ${prefix}/bin/gfortran-mp-4.4
    83     if { [variant_isset openmpi] } {
    84         configure.fcflags-append    -I${prefix}/include/openmpi -L${prefix}/lib -lmpi_f90 -lmpi_f77 -lmpi
    85     }
    86     configure.args-delete       --disable-fortran
    87     configure.args-append       --enable-fortran
    88     configure.post_args LDFLAGS="-L${prefix}/lib"
     179    configure.compiler          macports-gcc-4.4
    89180}
    90181
    91 variant gcc45 description {Enable Fortran bindings (gfortran 4.5)} conflicts threadsafe universal gcc44 gcc46 {
     182variant gcc45 description {
     183    Build with MacPorts' gcc45 compiler.
     184} conflicts universal gcc44 gcc46 openmpi mpich2 {
    92185    depends_lib-append          port:gcc45
    93     configure.fc                ${prefix}/bin/gfortran-mp-4.5
    94     if { [variant_isset openmpi] } {
    95         configure.fcflags-append    -I${prefix}/include/openmpi -L${prefix}/lib -lmpi_f90 -lmpi_f77 -lmpi
    96     }
    97     configure.args-delete       --disable-fortran
    98     configure.args-append       --enable-fortran
    99     configure.post_args LDFLAGS="-L${prefix}/lib"
     186    configure.compiler          macports-gcc-4.5
    100187}
    101188
    102 variant gcc46 description {Enable Fortran bindings (gfortran 4.6)} conflicts threadsafe universal gcc44 gcc45 {
     189variant gcc46 description {
     190    Build with MacPorts' gcc46 compiler.
     191} conflicts universal gcc44 gcc45 openmpi mpich2 {
    103192    depends_lib-append          port:gcc46
    104     configure.fc                ${prefix}/bin/gfortran-mp-4.6
    105     if { [variant_isset openmpi] } {
    106         configure.fcflags-append    -I${prefix}/include/openmpi -L${prefix}/lib -lmpi_f90 -lmpi_f77 -lmpi
    107     }
    108     configure.args-delete       --disable-fortran
    109     configure.args-append       --enable-fortran
    110     configure.post_args LDFLAGS="-L${prefix}/lib"
     193    configure.compiler          macports-gcc-4.6
    111194}
    112195
     196
    113197livecheck.type      regex
    114198livecheck.url       http://www.hdfgroup.org/HDF5/release/obtain5.html
    115199livecheck.regex     5-(\[0-9.\]+)