{% set version = "6.1.0" %}

package:
  name: gmt
  version: {{ version }}

source:
  url: https://github.com/GenericMappingTools/gmt/releases/download/{{ version }}/gmt-{{ version }}-src.tar.gz
  sha256: 5cc6c38848079b9df3c94ecb53a5d2a4a685775f51e7a884aa5807b7f6fdfd6f

build:
  number: 1
  skip: True  # [win and vc<14]

requirements:
  build:
    - cmake
    - {{ compiler('c') }}
  host:
    - libblas
    - libcblas
    - liblapack
    - fftw
    - gdal
    - ghostscript
    - libnetcdf
    - hdf5
    - zlib
    - curl
    - pcre
    - gshhg-gmt
    - dcw-gmt
  run:
    - libblas
    - libcblas
    - liblapack
    - fftw
    - gdal
    - ghostscript
    - libnetcdf
    - hdf5
    - zlib
    - curl
    - pcre
    - gshhg-gmt  # [not win]
    - dcw-gmt  # [not win]
    - ffmpeg
    - graphicsmagick

test:
  commands:
    - gmt defaults -Vd
    - gmt psbasemap -R10/70/-3/8 -JX4i/3i -Ba -B+glightred+t"TEST" -P -Vd > test0.ps
    - gmt pscoast -R0/10/0/10 -JM6i -Ba -Ggray -ENG+p1p,blue -P -Vd > test1.ps
    - gmt begin -Vd
    - gmt coast -R0/10/0/10 -JM6i -Ba -Ggray -ENG+p1p,blue -Vd
    - gmt end

about:
  home: https://www.generic-mapping-tools.org
  license: LGPL-3.0
  license_file: LICENSE.TXT
  summary: 'The Generic Mapping Tools.'
  description: |
      GMT is an open source collection of about 80 command-line tools for
      manipulating geographic and Cartesian data sets (including filtering,
      trend fitting, gridding, projecting, etc.) and producing PostScript
      illustrations ranging from simple x–y plots via contour maps to
      artificially illuminated surfaces and 3D perspective views; the GMT
      supplements add another 40 more specialized and discipline-specific
      tools. GMT supports over 30 map projections and transformations

extra:
  recipe-maintainers:
    - ocefpaf
    - leouieda
    - seisman
