{% set version = "3.3.0" %}

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

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

source:
  fn: maps_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/maps_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/maps/maps_{{ version }}.tar.gz
  sha256: 199afe19a4edcef966ae79ef802f5dcc15a022f9c357fcb8cae8925fe8bd2216

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
  run:
    - r-base

test:
  commands:
    - $R -e "library('maps')"  # [not win]
    - "\"%R%\" -e \"library('maps')\""  # [win]
    - conda inspect linkages -p $PREFIX r-maps  # [not win]
    - conda inspect objects -p $PREFIX r-maps  # [osx]

about:
  home: https://CRAN.R-project.org/package=maps
  license: GPL-2
  summary: Display of maps.  Projection code and larger maps are in separate packages ('mapproj'
    and 'mapdata').
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - ocefpaf
