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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/DescTools_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/DescTools/DescTools_{{ version }}.tar.gz
  sha256: 3710b9ec1954813c4c8fe13b98eecef085a4e0e076260ff25c1c03da81684e71

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

requirements:
  build:
    - cross-r-base {{ r_base }}        # [build_platform != target_platform]
    - r-boot                           # [build_platform != target_platform]
    - r-cli                            # [build_platform != target_platform]
    - r-data.table                     # [build_platform != target_platform]
    - r-exact                          # [build_platform != target_platform]
    - r-expm                           # [build_platform != target_platform]
    - r-gld                            # [build_platform != target_platform]
    - r-httr                           # [build_platform != target_platform]
    - r-mass                           # [build_platform != target_platform]
    - r-mvtnorm                        # [build_platform != target_platform]
    - r-rcpp >=0.12.10                 # [build_platform != target_platform]
    - r-readxl                         # [build_platform != target_platform]
    - r-rstudioapi                     # [build_platform != target_platform]
    - r-withr                          # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem            # [win]
    - {{ posix }}make
    - {{ posix }}sed                   # [win]
    - {{ posix }}coreutils             # [win]
    - {{ posix }}zip                   # [win]
  host:
    - r-base
    - r-boot
    - r-cli
    - r-data.table
    - r-exact
    - r-expm
    - r-gld
    - r-httr
    - r-mass
    - r-mvtnorm
    - r-rcpp >=0.12.10
    - r-readxl
    - r-rstudioapi
    - r-withr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-boot
    - r-cli
    - r-data.table
    - r-exact
    - r-expm
    - r-gld
    - r-httr
    - r-mass
    - r-mvtnorm
    - r-rcpp >=0.12.10
    - r-readxl
    - r-rstudioapi
    - r-withr

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

about:
  home: https://andrisignorell.github.io/DescTools/
  dev_url: https://github.com/AndriSignorell/DescTools/
  license: GPL-2.0-or-later
  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: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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