Packaging GMT - GenericMappingTools/gmt GitHub Wiki

These recommendations are directed at package maintainers of GMT.

First split off DCW-GMT and GSHHG into separate architecture independent packages, e.g., dcw-gmt and gshhg-gmt, because they have a different development cycle. Files should go into directories /usr/share/dcw-gmt/ and /usr/share/gshhg-gmt/ or /usr/share/gmt/{dcw,gshhg}/. Then configure GMT as shown below.

DCW-GMT

GSHHG

GMT

  • Homepage: https://www.generic-mapping-tools.org/
  • Summary: Generic Mapping Tools
  • License: GPL-3+, LGPL-3+, or Restrictive depending on LICENSE_RESTRICTED setting
  • Source:
  • Description: GMT is an open-source collection of command-line tools for manipulating geographic and Cartesian data sets (including filtering, trend fitting, gridding, projecting, etc.) and producing high-quality illustrations ranging from simple x–y plots via contour maps to artificially illuminated surfaces and 3D perspective views. It supports many map projections and transformations and includes supporting data such as coastlines, rivers, and political boundaries and optionally country polygons.
  • Build dependencies:
    • cmake
    • gcc
    • curl
    • netcdf
    • gdal
    • pcre
    • fftw
    • glib2
    • lapack
    • openblas
    • dcw-gmt
    • gshhg-gmt
  • Runtime dependencies:
    • ghostscript (required)
    • curl (required)
    • netcdf (required)
    • gdal
    • pcre
    • fftw
    • glib2
    • lapack
    • openblas
    • dcw-gmt
    • gshhg-gmt (at least the crude resolution GSHHG files are mandatory)
  • CMake arguments:
    -DCMAKE_C_FLAGS=-fstrict-aliasing
    -DCMAKE_INSTALL_PREFIX=${prefix}
    -DDCW_ROOT=${prefix}/share/gmt/dcw
    -DGSHHG_ROOT=${prefix}/share/gmt/gshhg
    -DNETCDF_ROOT=${prefix}
    -DFFTW3_ROOT=${prefix}
    -DGDAL_ROOT=${prefix}
    -DPCRE_ROOT=${prefix}
    -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off
    -DLICENSE_RESTRICTED=LGPL or -DLICENSE_RESTRICTED=no to include non-free code
    

Note that you have to configure and build out-of-source. It is safe to make a parallel build with make -j. It is expected that the GMT supplements plugin be distributed with the core programs.