source: trunk/dports/science/hdf4/Portfile @ 133427

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

hdf4: update to 4.2.11, closing #46872

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 133427 2015-03-01 13:05:50Z takeshi@macports.org $
3
4PortSystem          1.0
5PortGroup compilers 1.0
6
7name                hdf4
8version             4.2.11
9platforms           darwin
10categories          science
11license             NCSA
12maintainers         takeshi
13
14description         file format for storing scientific data and utilities
15long_description    ${description}
16homepage            http://www.hdfgroup.org/products/hdf4/index.html
17master_sites        ftp://ftp.hdfgroup.org/HDF/prev-releases/HDF${version}/src/ \
18                    http://www.hdfgroup.org/ftp/HDF/prev-releases/HDF${version}/src/
19distname            hdf-${version}
20use_bzip2           yes
21checksums           md5     192a0320ef06f657523c2efaee0ccdcf \
22                    sha1    3b98d9ef6ff1fbc569e53432bddc14c148da8274 \
23                    rmd160  e733492876d4d15e8b674f34e7692f43fc0bb3e2 \
24                    sha256  bb0e900b8cc6bc89a5730abc97e654e7705e8e1fbc4e0d4477f417822428d99b
25
26compilers.choose    fc f77 f90
27compilers.setup
28
29depends_lib         port:zlib port:jpeg
30
31patchfiles          patch-hdf-examples-Makefile.in.diff \
32                    patch-mfhdf-examples-Makefile.in.diff
33
34configure.args      --disable-netcdf --disable-fortran \
35                    --with-jpeg=${prefix} --enable-shared \
36                    --without-szlib
37configure.cppflags-delete   -I${prefix}/include
38configure.ldflags-delete    -L${prefix}/lib
39
40post-configure {
41# remove -arch from h4cc to fix failure of h4cc -E with +universal
42    reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/hdf/util/h4cc
43}
44
45test.run            yes
46test.target         check
47
48post-destroot {
49    file mkdir ${destroot}${prefix}/share/doc/${name}
50    file copy ${worksrcpath}/hdf/util/testfiles ${destroot}${prefix}/share/doc/${name}/samples
51    foreach f {COPYING release_notes/HISTORY.txt release_notes/RELEASE.txt} {
52        file copy ${worksrcpath}/$f ${destroot}${prefix}/share/doc/${name}/
53    }
54    foreach f {bin/ncdump bin/ncgen lib/libudport.a                   \
55             include/netcdf.h include/netcdf.inc include/netcdf.f90 \
56             share/man/man1/ncgen.1 share/man/man1/ncdump.1} {
57        file delete ${destroot}${prefix}/$f
58    }
59}
60
61if {[fortran_variant_isset]} {
62    patchfiles-append   patch-hdf-fortran-examples-Makefile.in.diff \
63                        patch-mfhdf-fortran-examples-Makefile.in.diff
64    configure.args-delete   --disable-fortran --enable-shared
65}
66
67if {[variant_isset g95]} {
68    configure.fflags-append -fno-second-underscore
69}
70
71variant szip description {build with szip} {
72    depends_lib-append      port:szip
73    configure.args-delete   --without-szlib
74    configure.args-append   --with-szlib=${prefix}
75}
76
77livecheck.type   regex
78livecheck.url    ${homepage}
79livecheck.regex  {Release of HDF is ([0-9]+\.[0-9]+\.[0-9]+)}
Note: See TracBrowser for help on using the repository browser.