- get FreeBSD ports collection:
# portsnap fetch
# portsnap extract
- enter
/usr/ports/graphics/gmt5/
- check information in
Makeflie
(*), and entermake install clean
.
check path for DCW_ROOT and GSHHG_ROOT is correct
- Install Build Dependencies
# pkg install \
devel/cmake \
science/netcdf \
ftp/curl \
devel/pcre \
math/fftw3-float \
graphics/gdal \
shells/bash \
graphics/gmt5-dcw \
graphics/gmt5-gshhg \
devel/git
- Download files
$ git clone https://github.com/GenericMappingTools/gmt.git
$ cd gmt
$ mkdir build && cd build
$ cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_FLAGS=-fstrict-aliasing \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DDCW_ROOT=/usr/local/share/dcw-gmt \
-DGSHHG_ROOT=/usr/local/share/gshhg-gmt \
-DGMT_INSTALL_MODULE_LINKS=off \
-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off \
-DGMT_DATADIR=share/gmtx \
-DGMT_DOCDIR=share/doc/gmtx \
-DGMT_MANDIR=share/doc/gmtx/man \
-DGMT_INSTALL_NAME_SUFFIX=-gmtx \
..
$ make -j4
# make install
# /usr/local/share/gmtx/tools/gmt_uninstall.sh