{% set version = "0.99.50" %}
{% 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: 1b9cf09de7c7625c30d2daca92b4f798476f10907d531267e773d379f6828eab

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-httr                     # [build_platform != target_platform]
    - r-mass                     # [build_platform != target_platform]
    - r-rstudioapi               # [build_platform != target_platform]
    - r-data.table               # [build_platform != target_platform]
    - r-exact                    # [build_platform != target_platform]
    - r-readxl                   # [build_platform != target_platform]
    - r-rcpp                     # [build_platform != target_platform]
    - r-expm                     # [build_platform != target_platform]
    - r-gld                      # [build_platform != target_platform]
    - r-mvtnorm                  # [build_platform != target_platform]
    - r-boot                     # [build_platform != target_platform]
    - r-bh                       # [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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-bh
    - r-boot
    - 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-bh
    - r-boot
    - 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://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
