{% set version = '2.4-0' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-geomap
  version: {{ version|replace("-", "_") }}

source:
  fn: GEOmap_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/GEOmap_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/GEOmap/GEOmap_{{ version }}.tar.gz
  sha256: cfd728c534caef5eefed6bb915c2577284bdc1fb832b5b4531f908e2cad51f4a

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-mba
    - r-rpmg
    - r-fields
    - r-splancs
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-mba
    - r-rpmg
    - r-fields
    - r-splancs
    - libgcc  # [not win]

test:
  commands:
    - $R -e "library('GEOmap')"  # [not win]
    - "\"%R%\" -e \"library('GEOmap')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=GEOmap
  license: GPL (>= 2)
  summary: Set of routines for making Map Projections (forward and inverse), Topographic Maps,
    Perspective plots, Geological Maps, geological map symbols, geological databases,
    interactive plotting and selection of focus regions.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
