{% set version = '2.0-5' %}

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

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

source:
  fn: SpatialExtremes_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/SpatialExtremes_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/SpatialExtremes/SpatialExtremes_{{ version }}.tar.gz
  sha256: 3fae5c8d24cb12f79024f3b9e7b2a6998fdc7dc8cbca96ddfe7dbdb69a80a65c

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
    - r-fields
    - r-maps

  run:
    - r-base
    - r-fields
    - r-maps

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

about:
  home: http://spatialextremes.r-forge.r-project.org/
  license: GPL (>= 2)
  summary: 'Tools for the statistical modelling of spatial extremes using max-stable processes,
    copula or Bayesian hierarchical models. More precisely, this package allows (conditional)
    simulations from various parametric max-stable models, analysis of the extremal
    spatial dependence, the fitting of such processes using composite likelihoods or
    least square (simple max-stable processes only), model checking and selection and
    prediction. Other approaches (although not completely in agreement with the extreme
    value theory) are available such as the use of (spatial) copula and Bayesian hierarchical
    models assuming the so-called conditional assumptions. The latter approaches is
    handled through an (efficient) Gibbs sampler. Some key references: Davison et al.
    (2012) <doi:10.1214/11-STS376>, Padoan et al. (2010) <doi:10.1198/jasa.2009.tm08577>,
    Dombry et al. (2013) <doi:10.1093/biomet/ass067>.'

  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
