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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/spatial_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/spatial/spatial_{{ version }}.tar.gz
  sha256: cc46693d69745af8ec95b557e7a8ee4e1865df69dc0d25723629fd8e9ea43055

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 }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: http://www.stats.ox.ac.uk/pub/MASS4/
  license: GPL-2.0-or-later
  summary: Functions for kriging and point pattern analysis.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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