Install dependencies on macOS via MacPorts - GenericMappingTools/gmt GitHub Wiki

For macOS with MacPorts installed, you can install the dependencies with:

# Install necessary dependencies
sudo port install cmake curl netcdf

# Install optional dependencies
sudo port install gdal +hdf5 +netcdf +openjpeg
sudo port install ninja pcre2 fftw-3-single glib2 ghostscript

# to enable movie-making
sudo port install GraphicsMagick ffmpeg

# to enable testing
sudo port install GraphicsMagick

# to build the documentation
sudo port install py38-sphinx
sudo port select --set python python38
sudo port select --set sphinx py38-sphinx