{% set version = '1.0-9' %}

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

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

source:
  fn: fitdistrplus_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/fitdistrplus_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/fitdistrplus/fitdistrplus_{{ version }}.tar.gz
  sha256: e68fdee3dde1a35cde0f0deeaecf74f1eb3846dc70cc610e290da5f24821a9a3

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-mass
    - r-survival

  run:
    - r-base
    - r-mass
    - r-survival

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

about:
  home: 'MailingList: http://listes.univ-lyon1.fr/wws/info/fitdist-users; https://lbbe.univ-lyon1.fr/fitdistrplus.html,
    http://riskassessment.r-forge.r-project.org'

  license: GPL (>= 2)
  summary: Extends the fitdistr() function (of the MASS package) with several functions to help
    the fit of a parametric distribution to non-censored or censored data. Censored
    data may contain left censored, right censored and interval censored values, with
    several lower and upper bounds. In addition to maximum likelihood estimation (MLE),
    the package provides moment matching (MME), quantile matching (QME) and maximum
    goodness-of-fit estimation (MGE) methods (available only for non-censored data).
    Weighted versions of MLE, MME and QME are available.
  license_family: GPL3

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