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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/copula_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/copula/copula_{{ version }}.tar.gz
  sha256: 9ab76e6256534db2a18d3880143b8c67e385767010de861bbde25212aa75d924

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-adgoftest
    - r-matrix
    - r-colorspace
    - r-gsl
    - r-lattice
    - r-mvtnorm
    - r-numderiv
    - r-pcapp
    - r-pspline
    - r-stabledist >=0.6_4
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-adgoftest
    - r-matrix
    - r-colorspace
    - r-gsl
    - r-lattice
    - r-mvtnorm
    - r-numderiv
    - r-pcapp
    - r-pspline
    - r-stabledist >=0.6_4

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

about:
  home: http://copula.r-forge.r-project.org/
  license: GPL-3.0-or-later
  summary: Classes (S4) of commonly used elliptical, Archimedean, extreme value and some more copula families.  Methods for density, distribution, random number generation, bivariate dependence measures, perspective and contour plots.  Fitting copula models including variance estimates.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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