{% set version = "0.99.25" %}

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

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

source:
  fn: DescTools_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/DescTools_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/DescTools/DescTools_{{ version }}.tar.gz
  sha256: 0c9d106bf6b4efbec94386774ecfda966c914ab2a2abf3a3eaaea7fe87fa622e

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('fortran') }}        # [unix]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
    - r-bh
    - r-mass
    - r-rcpp >=0.12.10
    - r-boot
    - r-expm
    - r-foreign
    - r-manipulate
    - r-mvtnorm

  run:
    - r-base
    - r-bh
    - r-mass
    - r-rcpp >=0.12.10
    - r-boot
    - r-expm
    - r-foreign
    - r-manipulate
    - r-mvtnorm

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

about:
  home: https://CRAN.R-project.org/package=DescTools
  license: GPL (>= 2)
  summary: A collection of miscellaneous basic statistic functions and convenience wrappers for
    efficiently describing data. The author's intention was to create a toolbox, which
    facilitates the (notoriously time consuming) first descriptive tasks in data analysis,
    consisting of calculating descriptive statistics, drawing graphical summaries and
    reporting the results. The package contains furthermore functions to produce documents
    using MS Word (or PowerPoint) and functions to import data from Excel. Many of the
    included functions can be found scattered in other packages and other sources written
    partly by Titans of R. The reason for collecting them here, was primarily to have
    them consolidated in ONE instead of dozens of packages (which themselves might depend
    on other packages which are not needed at all), and to provide a common and consistent
    interface as far as function and arguments naming, NA handling, recycling rules
    etc. are concerned. Google style guides were used as naming rules (in absence of
    convincing alternatives). The 'camel style' was consequently applied to functions
    borrowed from contributed R packages as well.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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