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

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

source:
  fn: mapproj_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/mapproj_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mapproj/mapproj_{{ version }}.tar.gz
  sha256: f0081281b08bf3cc7052c4f1360d6d3c20d9063be57754448ad9b48ab0d34c5b

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-maps >=2.3_0
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-maps >=2.3_0

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

about:
  home: https://CRAN.R-project.org/package=mapproj
  license: Lucent Public
  summary: Converts latitude/longitude into projected coordinates.
  license_family: OTHER

extra:
  recipe-maintainers:
    - conda-forge/r
