Cdf version 32 - How to Download and Install on Mac OS X
Sunday the 22nd of November, 2009

    version 32

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


      The cdf Portfile 53319 2009-07-03 06:31:52Z gwright macports.org $

      PortSystem 1.0

      Name: cdf
      Version: 32
      Maintainers: nomaintainer
      Platform: darwin
      Category: science

      Description: CDF: Common Data Format
      Long Description: The Common Data Format (CDF) is a self-describing data format for the storage and manipulation of scalar and multidimensional data in a platform and discipline independent fashion.

      Homepage: http://cdf.gsfc.nasa.gov/
      Master Sites: http://distfiles.macports.org/${dist_subdir} ftp://cdaweb.gsfc.nasa.gov/pub/cdf/dist/${name}${version}/unix

      distfiles ${name}${version}-dist-all${extract.suffix}

      Checksums: sha1 c24a88dee108ab3ae7787697350f77ca3e9bd776

      depends_build port:gcc42

      fetch.use_epsv no
      use_configure no
      worksrcdir ${name}${version}-dist-readonly

      platform darwin i386 {
      global cdf_arch
      set cdf_arch i386
      }

      platform darwin powerpc {
      global cdf_arch
      set cdf_arch ppc
      }

      Patch Files: patch-Makefile

      post-patch {
      reinplace "s|-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1|`gcc-mp-4.2 -print-libgcc-file-name`|g" Makefile
      reinplace "s|-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/ppc64|`gcc-mp-4.2 -print-libgcc-file-name`|g" Makefile
      reinplace "s|-L/usr/lib/gcc/i686-apple-darwin8/4.0.1|`gcc-mp-4.2 -print-libgcc-file-name`|g" Makefile

      reinplace "s|/Developer/SDKs/MacOSX10.4u.sdk/usr/lib|${prefix}/lib|g" Makefile
      }

      pre-build {
      build.pre_args OS=macosx ENV=${cdf_arch} FORTRAN=yes FC=gfortran-mp-4.2 ${build.target}
      }

      destroot.destdir INSTALLDIR=${destroot}${prefix}
      pre-destroot {
      reinplace "s|(INSTALLDIR)/bin/definitions.B|/${prefix}/bin/definitions.B|" ${worksrcpath}/Makefile
      reinplace "s|(INSTALLDIR)/bin/definitions.C|/${prefix}/bin/definitions.C|" ${worksrcpath}/Makefile
      reinplace "s|(INSTALLDIR)/bin/definitions.K|/${prefix}/bin/definitions.K|" ${worksrcpath}/Makefile
      }

      post-destroot {
      reinplace "s|${destroot}${prefix}|${prefix}|" ${destroot}${prefix}/bin/definitions.B
      reinplace "s|${destroot}${prefix}|${prefix}|" ${destroot}${prefix}/bin/definitions.C
      reinplace "s|${destroot}${prefix}|${prefix}|" ${destroot}${prefix}/bin/definitions.K

      system "install_name_tool -id ${prefix}/lib/libcdf.dylib ${destroot}${prefix}/lib/libcdf.dylib"
      }


    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/cdf
      % sudo port install cdf
      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 cdf
      ---> Verifying checksum for cdf
      ---> Extracting cdf
      ---> Configuring cdf
      ---> Building cdf with target all
      ---> Staging cdf into destroot
      ---> Installing cdf
    - 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 cdf with these commands:
      %  man cdf
      % apropos cdf
      % which cdf
      % locate cdf

     Where to find more information:

    Darwin Ports



    Lightbox this page.