{% set version = '7.3-17' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' 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: f1003ed8cff2a47169a4787c8be46e8c2c501cc06c8b1e5f97bf62507e5f5dd7

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: MASS
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

  run:
    - r-base
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('spatial')"           # [not win]
    - "\"%R%\" -e \"library('spatial')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

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

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: spatial
# Priority: recommended
# Version: 7.3-17
# Date: 2023-07-20
# Depends: R (>= 3.0.0), graphics, stats, utils
# Suggests: MASS
# Authors@R: c(person("Brian", "Ripley", role = c("aut", "cre", "cph"), email = "ripley@stats.ox.ac.uk"), person("Roger", "Bivand", role = "ctb"), person("William", "Venables", role = "cph"))
# Description: Functions for kriging and point pattern analysis.
# Title: Functions for Kriging and Point Pattern Analysis
# LazyLoad: yes
# ByteCompile: yes
# License: GPL-2 | GPL-3
# URL: http://www.stats.ox.ac.uk/pub/MASS4/
# NeedsCompilation: yes
# Packaged: 2023-07-20 14:41:40 UTC; ripley
# Author: Brian Ripley [aut, cre, cph], Roger Bivand [ctb], William Venables [cph]
# Maintainer: Brian Ripley <ripley@stats.ox.ac.uk>
# Repository: CRAN
# Date/Publication: 2023-07-20 15:08:46 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
