# -*- 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 # $Id: Portfile 153691 2016-10-08 06:53:27Z takeshi@macports.org $ PortSystem 1.0 PortGroup compilers 1.0 name hdf4 version 4.2.12 platforms darwin categories science license NCSA maintainers takeshi description file format for storing scientific data and utilities long_description ${description} homepage http://www.hdfgroup.org/products/hdf4/index.html master_sites ftp://ftp.hdfgroup.org/HDF/releases/HDF${version}/src/ \ http://www.hdfgroup.org/ftp/HDF/releases/HDF${version}/src/ distname hdf-${version} use_bzip2 yes checksums rmd160 97057b2c2761a7c522f9630b677a112b40cbe7d1 \ sha256 2d224a57a711d853d71b92ef0875d295b410454b005144ebd3dd4b3d4c811208 compilers.choose fc f77 f90 compilers.setup depends_lib port:zlib port:jpeg patchfiles patch-hdf-examples-Makefile.in.diff \ patch-mfhdf-examples-Makefile.in.diff configure.args --disable-netcdf --disable-fortran \ --with-jpeg=${prefix} --enable-shared \ --without-szlib configure.cppflags-delete -I${prefix}/include configure.ldflags-delete -L${prefix}/lib post-configure { # remove -arch from h4cc to fix failure of h4cc -E with +universal reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/hdf/util/h4cc # remove ccache reinplace {s|ccache ||} ${worksrcpath}/hdf/util/h4cc } test.run yes test.target check post-destroot { file mkdir ${destroot}${prefix}/share/doc/${name} file copy ${worksrcpath}/hdf/util/testfiles ${destroot}${prefix}/share/doc/${name}/samples foreach f {COPYING release_notes/HISTORY.txt release_notes/RELEASE.txt} { file copy ${worksrcpath}/$f ${destroot}${prefix}/share/doc/${name}/ } foreach f {bin/ncdump bin/ncgen lib/libudport.a \ include/netcdf.h include/netcdf.inc include/netcdf.f90 \ share/man/man1/ncgen.1 share/man/man1/ncdump.1} { file delete ${destroot}${prefix}/$f } } if {[fortran_variant_isset]} { patchfiles-append patch-hdf-fortran-examples-Makefile.in.diff \ patch-mfhdf-fortran-examples-Makefile.in.diff configure.args-delete --disable-fortran --enable-shared } if {[variant_isset g95]} { configure.fflags-append -fno-second-underscore } variant szip description {build with szip} { depends_lib-append port:szip configure.args-delete --without-szlib configure.args-append --with-szlib=${prefix} } livecheck.type regex livecheck.url ${homepage} livecheck.regex {Release of HDF is ([0-9]+\.[0-9]+\.[0-9]+)}