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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/distr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/distr/distr_{{ version }}.tar.gz
  sha256: bb7df05d6b946bcdbbec2e3397c7c7e349b537cabfcbb13a34bcf6312a71ceb7

build:
  merge_build_host: True  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

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
    - r-mass
    - r-sfsmisc
    - r-startupmsg
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass
    - r-sfsmisc
    - r-startupmsg

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

about:
  home: http://distr.r-forge.r-project.org/
  license: LGPL-3.0-only
  summary: S4-classes and methods for distributions.
  license_family: LGPL
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/LGPL-3'

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