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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/splancs_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/splancs/splancs_{{ version }}.tar.gz
  sha256: b351565e1f69f6c86a29d921d3a18d5896c4586e2ab8c73bb3df8e75630fc448

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_fortran') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-sp >=0.9
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-sp >=0.9

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

about:
  home: http://www.maths.lancs.ac.uk/~rowlings/Splancs/
  license: GPL-2.0-or-later
  summary: 'The Splancs package was written as an enhancement to S-Plus for display and analysis of spatial point pattern data; it has been ported to R and is in "maintenance mode". '
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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