...
- A wiki on installing Xcode via the App Store can be found here: Installing Xcode Tools and X11
- Upon completing these steps Prior to running these commands you should have:
- Installed Xcode
Installed Xcode Command Line Tools.
Code Block sudo xcode-select --install sudo xcodebuild -license (type "agree" to accept license). open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg (10.14 and later)
Installing Macports
- Download and install Macports from http://www.macports.org/ .
Sync your local software tree with the master repository using this command:
Code Block sudo port -v selfupdate
- This installs all the ports used at IGPP:
gcc5 +universalCode Block 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
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.
...