Hdf4 version 4.2r4 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    version 4.2r4

      View the most recent changes for the hdf4 port at: hdf4.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for hdf4.
      The raw portfile for hdf4 4.2r4 is located here:
      http://hdf4.darwinports.com/dports/science/hdf4/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/hdf4


      # -*- 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
      The hdf4 Portfile 57375 2009-09-10 08:16:41Z ryandesign macports.org $

      PortSystem 1.0

      Name: hdf4
      Version: 4.2r4
      Revision: 1
      Platform: darwin
      Category: science
      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/HDF_Current/src/
      Checksums: md5 cbcfcdb65f27b743c6001c17619704a8 sha1 000fa1be9c355c490cceed786feeb269a0d355a7 rmd160 13274858f1fa0c339fab83b1f9c37314bd10d624

      depends_lib port:zlib port:jpeg port:szip
      distname HDF$version

      Patch Files: patch-hdfi.h.diff
      configure.args --with-szlib=yes --disable-netcdf --disable-fortran
      configure.ldflags "-L${worksrcpath}/src/.libs -L${prefix}/lib"

      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 INSTALL README release_notes/HISTORY.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
      }
      }

      Variant: g95 conflicts gcc43 conflicts universal description {build with g95} {
      configure.args-delete --disable-fortran
      depends_build-append port:g95
      configure.env-append F77=${prefix}/bin/g95
      }

      Variant: gcc43 conflicts g95 conflicts universal description {build with gfortran} {
      configure.args-delete --disable-fortran
      depends_build-append port:gcc43
      configure.env-append F77=${prefix}/bin/gfortran-mp-4.3
      }

      livecheck.type regex
      livecheck.url ${homepage}
      livecheck.regex {The latest Official Release of HDF is ([0-9]+\.[0-9]+r[0-9]+)}

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/hdf4
      % sudo port install hdf4
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching hdf4
      ---> Verifying checksum for hdf4
      ---> Extracting hdf4
      ---> Configuring hdf4
      ---> Building hdf4 with target all
      ---> Staging hdf4 into destroot
      ---> Installing hdf4
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using hdf4 with these commands:
      %  man hdf4
      % apropos hdf4
      % which hdf4
      % locate hdf4

     Where to find more information:

    Darwin Ports



    Lightbox this page.