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 121952 2014-07-12 05:25:04Z sean@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup compilers 1.0 |
---|
6 | |
---|
7 | name hdf4 |
---|
8 | version 4.2.10 |
---|
9 | platforms darwin |
---|
10 | categories science |
---|
11 | license NCSA |
---|
12 | maintainers takeshi |
---|
13 | |
---|
14 | description file format for storing scientific data and utilities |
---|
15 | long_description ${description} |
---|
16 | homepage http://www.hdfgroup.org/products/hdf4/index.html |
---|
17 | master_sites ftp://ftp.hdfgroup.org/HDF/prev-releases/HDF${version}/src/ \ |
---|
18 | http://www.hdfgroup.org/ftp/HDF/prev-releases/HDF${version}/src/ |
---|
19 | distname hdf-${version} |
---|
20 | use_bzip2 yes |
---|
21 | checksums md5 bf26b3caaf3c0090965c8995578375bd \ |
---|
22 | sha1 5163543895728dabb536a0659b3d965d55bccf74 \ |
---|
23 | rmd160 4345dc9621980a3fe972eaf9aaedaa1ebe127657 |
---|
24 | |
---|
25 | compilers.choose fc f77 f90 |
---|
26 | compilers.setup |
---|
27 | |
---|
28 | depends_lib port:zlib port:jpeg |
---|
29 | |
---|
30 | patchfiles patch-hdf-examples-Makefile.in.diff \ |
---|
31 | patch-mfhdf-examples-Makefile.in.diff |
---|
32 | |
---|
33 | configure.args --disable-netcdf --disable-fortran \ |
---|
34 | --with-jpeg=${prefix} --enable-shared \ |
---|
35 | --without-szlib |
---|
36 | configure.cppflags-delete -I${prefix}/include |
---|
37 | configure.ldflags-delete -L${prefix}/lib |
---|
38 | |
---|
39 | post-configure { |
---|
40 | # remove -arch from h4cc to fix failure of h4cc -E with +universal |
---|
41 | reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/hdf/util/h4cc |
---|
42 | } |
---|
43 | |
---|
44 | test.run yes |
---|
45 | test.target check |
---|
46 | |
---|
47 | post-destroot { |
---|
48 | file mkdir ${destroot}${prefix}/share/doc/${name} |
---|
49 | file copy ${worksrcpath}/hdf/util/testfiles ${destroot}${prefix}/share/doc/${name}/samples |
---|
50 | foreach f {COPYING release_notes/HISTORY.txt release_notes/RELEASE.txt} { |
---|
51 | file copy ${worksrcpath}/$f ${destroot}${prefix}/share/doc/${name}/ |
---|
52 | } |
---|
53 | foreach f {bin/ncdump bin/ncgen lib/libudport.a \ |
---|
54 | include/netcdf.h include/netcdf.inc include/netcdf.f90 \ |
---|
55 | share/man/man1/ncgen.1 share/man/man1/ncdump.1} { |
---|
56 | file delete ${destroot}${prefix}/$f |
---|
57 | } |
---|
58 | } |
---|
59 | |
---|
60 | if {[fortran_variant_isset]} { |
---|
61 | patchfiles-append patch-hdf-fortran-examples-Makefile.in.diff \ |
---|
62 | patch-mfhdf-fortran-examples-Makefile.in.diff |
---|
63 | configure.args-delete --disable-fortran --enable-shared |
---|
64 | } |
---|
65 | |
---|
66 | if {[variant_isset g95]} { |
---|
67 | configure.fflags-append -fno-second-underscore |
---|
68 | } |
---|
69 | |
---|
70 | variant szip description {build with szip} { |
---|
71 | depends_lib-append port:szip |
---|
72 | configure.args-delete --without-szlib |
---|
73 | configure.args-append --with-szlib=${prefix} |
---|
74 | } |
---|
75 | |
---|
76 | livecheck.type regex |
---|
77 | livecheck.url ${homepage} |
---|
78 | livecheck.regex {Release of HDF is ([0-9]+\.[0-9]+\.[0-9]+)} |
---|