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

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

source:
  fn: sp_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/sp_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sp/sp_{{ version }}.tar.gz
  sha256: 07da2a6d71bb9432b3807912c38a5b48bbffbc5e4c361cefbb0a9b1d37cdf255

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-lattice
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-lattice

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

about:
  home: https://github.com/edzer/sp/ https://edzer.github.io/sp/
  license: GPL (>= 2)
  summary: Classes and methods for spatial data; the classes document where the spatial location
    information resides, for 2D or 3D data. Utility functions are provided, e.g. for
    plotting data as maps, spatial selection, as well as methods for retrieving coordinates,
    for subsetting, print, summary, etc.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - ocefpaf
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
