{% set version = "1.3-2" %}
{% 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: 940a22add254fbb5ebd80a380f4777fcd1af282975ebad400d177f3a20d6f24e

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
