source: trunk/dports/science/hdfeos5/Portfile @ 124736

Last change on this file since 124736 was 124736, checked in by takeshi@…, 6 years ago

hdfeos, hdfeos5: corrected the use of active_variants as in its doc in the source

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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 124736 2014-08-27 20:33:01Z takeshi@macports.org $
3
4PortSystem          1.0
5PortGroup           active_variants 1.1
6PortGroup           mpi 1.0
7
8name                hdfeos5
9version             1.15
10revision            2
11categories          science
12platforms           darwin
13license             public-domain
14maintainers         takeshi
15description         HDF-EOS library built on HDF5
16long_description \
17    library designed built on HDF5 to support the same Grid/Point/Swath \
18    functionality in HDF-EOS 2 and to the extent possible it will be    \
19    built with the same calling sequences as the original HDF-EOS 2 library.
20homepage            http://hdfeos.org/
21master_sites        ftp://edhs1.gsfc.nasa.gov/edhs/${name}/latest_release/ \
22                    ftp://edhs1.gsfc.nasa.gov/edhs/${name}/previous_releases/
23
24distname            HDF-EOS5.${version}
25
26checksums           md5     5d607a13dd42e559bfc90e278a8ec919 \
27                    sha1    35a288cd1bfdde92a4ef9d68f8ee55b536b0f8c3 \
28                    rmd160  34df5cdb6bdc4d06a7658d38aae6fed0b5671557
29
30# prevent setting configure.cc by choosing cxx only
31mpi.choose          cxx
32mpi.setup
33
34depends_build       port:libtool
35depends_lib         port:hdf5
36worksrcdir          ${name}
37extract.suffix      .tar.Z
38fetch.use_epsv      no
39
40set v [mpi_active_variant_name bin:h5pcc:hdf5]
41if {${v} != "" } {
42    set h5cc h5pcc
43    default_variants +${v}
44} else {
45    set h5cc h5cc
46}
47if {![catch {set result [active_variants port:hdf5 szip]}]} {
48    if {$result} {
49        default_variants-append +szip
50    }
51}
52configure.cc            ${prefix}/bin/${h5cc}
53configure.cflags-append -DH5_USE_16_API
54configure.cc_archflags ""
55configure.ld_archflags ""
56configure.args      --prefix=${prefix}/lib/${name} \
57                    --enable-shared \
58                    --with-hdf5=${prefix} \
59                    --with-zlib=${prefix} \
60                    --disable-dependency-tracking
61
62post-configure {
63    file copy -force ${prefix}/bin/glibtool ${worksrcpath}/libtool
64    reinplace "s|\\\\\$CC|${prefix}/bin/${h5cc}|" ${worksrcpath}/libtool
65}
66
67variant szip description {enables szip support} {
68    require_active_variants     hdf5 szip
69    depends_lib-append          port:szip
70    configure.args-append       --with-szlib=${prefix} \
71}
72
73post-destroot {
74    set incdir ${destroot}${prefix}/lib/${name}/include
75    xinstall -d -m 755 ${incdir}
76    xinstall -m 644 ${worksrcpath}/include/HE5_GctpFunc.h ${incdir}
77    xinstall -m 644 ${worksrcpath}/include/HE5_HdfEosDef.h ${incdir}
78}
79
80livecheck.type      regex
81livecheck.url       ${homepage}/software/hdfeos.php
82livecheck.regex     {HDF-EOS 5.([0-9]+.[0-9]+) is the latest version}
Note: See TracBrowser for help on using the repository browser.