Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Installing Macports

Paul Dean updated October 5 at 6:50 PM


What is Macports?


  • Macports is a software repository that ports Linux open-source software to be compatible with Macs.
  • Examples of such software are gmt, nedit, ghostscript and gv.

...

Installing Macports on your Mac will allow you to have access to their repository and install ported Linux tools. You can also update any Macports software you installed via the appropriate port command.


Do I Need Macports?


  • Macports is installed on every managed machine at IGPP.
  • If you have a self-managed machine and need software like gmt, nedit, gv, etc. then you should follow this wiki.

...

  • szip
  • gdal +curl +geos +hdf5 +netcdf
  • gmt5
  • gmt4
  • gawk
  • ghostscript
  • gv
  • xorg-libXt +flat_namespace
  • nedit
  • g95
  • xpdf
  • rsync
  • sshfs
  • geographiclib
  • py27-obspy
  • py27-numpy
  • py27-scipy
  • py27-matplotlib
  • netcdf
  • hdf5-18
  • ncarg
  • gcc5 +universal

Wiki Markup A comprehensive list of available ports can be found at \[found at http://www.macports.org/\] \\ \\



Prerequisite: Install Xcode and Xcode Command Line Tools

...

  1. A wiki on installing Xcode via the App Store can be found here: https: //igppwiki.ucsd.edu/groups/publichelpwiki/wiki/36ac6/Installing _ Xcode _ Tools _ and _ X11.html
  2. Upon completing these steps you should have:
  3. Installed Xcode
  4. Installed Xcode Command Line Tools.

      Wiki Markup
      \[Installing Xcode Tools and X11\]

      1. Installed Xcode
      2. Installed Xcode Command Line Tools.
        1. sudo xcode-select --install

      ...

      1. Accepted the Xcode License Agreement
        1. sudo xcodebuild -license

      ...

        1.  (type "agree" to accept license).


      Installing Macports


      1. Download and install Macports from http://www.macports.org/ .
      2. Sync your local software tree with the master repository using this command:

          ...

            1. sudo port -v selfupdate

          ...

          Wiki Markup
          sudo port install \[port\]   sudo port install \[port\]

          ...

          1. This installs all the ports used at IGPP:
            1. sudo port install szip gdal +curl +geos +hdf5 +netcdf gmt5 gmt4 gawk ghostscript gv xorg-libXt +flat_namespace nedit g95 xpdf rsync sshfs geographiclib py27-obspy py27-numpy py27-scipy py27-matplotlib netcdf hdf5-18 ncarg gcc5 +universal sudo port install szip gdal +curl +geos +hdf5 +netcdf gmt5 gmt4 gawk ghostscript gv xorg-libXt +flat_namespace nedit g95 xpdf rsync sshfs geographiclib py27-obspy py27-numpy py27-scipy py27-matplotlib netcdf hdf5-18 ncarg gcc5 +universal


          THE ABOVE COMMANDS IN ONE LINE: sudo port -v selfupdate; sudo xcode-select --install; sudo xcodebuild -license; sudo port install szip gdal +curl +geos +hdf5 +netcdf gmt5 gmt4 gawk ghostscript gv xorg-libXt +flat_namespace nedit g95 xpdf rsync sshfs geographiclib py27-obspy py27-numpy py27-scipy py27-matplotlib netcdf hdf5-18 ncarg gcc5 +universal


          Installing GMT: An additional step is required for installing gmt4. Add the following line to your ~/.profile:
          export PATH=/opt/local/lib/gmt4/bin:$PATH

          Explanation: By default, Macports and most ports install in /opt/local/bin and /opt/local/sbin. To let the computer know where to look for Macports and installed ports, a path is created in ~/.profile as such:

          export PATH=/opt/local/bin:/opt/local/sbin:$PATH

          This is automatically done for you when you install Macports.

          However, gmt4 is installed in /opt/local/lib/gmt4/. Since this path isn't installed by default, you must manually create it in your ~/.profile so your computer knows where to look for it.

          ...

          Macports must be installed for the port command to work.


          port command

          Function

          sudo port selfupdate

          Sync local tree with Macports repository. Do this before installing or upgrading ports.

          <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="85ea480b-ff24-4134-993c-db0c46bfa8e9"><ac:plain-text-body><![CDATA[

          sudo port install [port]

          Install ports

          ]]></ac:plain-text-body></ac:structured-macro>


          sudo port upgrade

          installedUpgrade

          installed

          ports

          ...

          ...

          Upgrade

          ...

          installed

          ...

          ports

          ...



          Resources

          ...

          Official documentation can be found at \[found at http://www.macports.org/\] . \\ \\ If you need further assistance, please \[contactIGPPNetOps\] . \\ \\ \[Contact IGPP Help Desk / Network Operations\] *contact IGPP Net Ops* .


          If you need further assistance, please contact IGPP Net Ops.