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.
Macports at IGPP
Below is a list of ports that are installed on every managed IGPP computer:
- gdal +curl +geos +hdf5 +netcdf
- xorg-libXt +flat_namespace
- gcc5 +universal
A comprehensive list of available ports can be found at http://www.macports.org/
Prerequisite: Install Xcode and Xcode Command Line Tools
- A wiki on installing Xcode via the App Store can be found here: Installing Xcode Tools and X11
- Prior to running these commands you should have:
- Installed Xcode
Installed Xcode Command Line Tools.
- Download and install Macports from http://www.macports.org/ .
Sync your local software tree with the master repository using this command:
- This installs all the ports used at IGPP:
Installing GMT: An additional step is required for installing gmt4. Add the following line to your ~/.profile:
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:
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.
These commands would be done if you wanted to keep your installed ports updated to the latest version.
- sudo port selfupdate
- sudo port upgrade installed
Macports Cheat Sheet
Macports must be installed for the port command to work.
sudo port selfupdate
Sync local tree with Macports repository. Do this before installing or upgrading ports.
sudo port install [port]
sudo port upgrade installed
Upgrade installed ports
Official documentation can be found at http://www.macports.org/.
If you need further assistance, please contact IGPP Net Ops.