{% set version = "1.17-0" %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-spatstat.utils
  version: {{ version|replace("-", "_") }}

source:
  fn: spatstat.utils_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/spatstat.utils_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/spatstat.utils/spatstat.utils_{{ version }}.tar.gz
  sha256: 39cd683ed7f41d8adc9e28af073d91b244aa1cf5ad966dfbb396ee3ee79f0922

build:
  merge_build_host: True  # [win]
  number: 1
  script: R CMD INSTALL --build .
  skip: True  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix  # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://cran.r-project.org/web/packages/spatstat.utils
  license: GPL (>= 2)
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
  summary: Contains utility functions for the 'spatstat' package which may also be useful for
    other purposes.

extra:
  recipe-maintainers:
    - ocefpaf
