{% set version = "3.4.2.1" %}
{% set posix = 'm2-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/maps_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/maps/maps_{{ version }}.tar.gz
  sha256: 0be35c7c48f6fcd9ea05e8b280f3bd4d7efa13c3f67cac863ca3493cc9944bef

build:
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ stdlib("c") }}          # [not win]
    - {{ compiler('m2w64_c') }}    # [win]
    - {{ stdlib("m2w64_c") }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=maps
  license: GPL-2.0-only
  summary: Display of maps.  Projection code and larger maps are in separate packages ('mapproj' and 'mapdata').
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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