source: trunk/dports/science/hdf4/Portfile

Last change on this file was 153691, checked in by takeshi@…, 14 months ago

hdf4: update to 4.2.12

  • 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 153691 2016-10-08 06:53:27Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup compilers 1.0
6
7name                hdf4
8version             4.2.12
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/releases/HDF${version}/src/ \
18                    http://www.hdfgroup.org/ftp/HDF/releases/HDF${version}/src/
19distname            hdf-${version}
20use_bzip2           yes
21checksums           rmd160  97057b2c2761a7c522f9630b677a112b40cbe7d1 \
22                    sha256  2d224a57a711d853d71b92ef0875d295b410454b005144ebd3dd4b3d4c811208
23
24compilers.choose    fc f77 f90
25compilers.setup
26
27depends_lib         port:zlib port:jpeg
28
29patchfiles          patch-hdf-examples-Makefile.in.diff \
30                    patch-mfhdf-examples-Makefile.in.diff
31
32configure.args      --disable-netcdf --disable-fortran \
33                    --with-jpeg=${prefix} --enable-shared \
34                    --without-szlib
35configure.cppflags-delete   -I${prefix}/include
36configure.ldflags-delete    -L${prefix}/lib
37
38post-configure {
39# remove -arch from h4cc to fix failure of h4cc -E with +universal
40    reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/hdf/util/h4cc
41# remove ccache
42    reinplace {s|ccache ||} ${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.