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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/DistributionUtils_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/DistributionUtils/DistributionUtils_{{ version }}.tar.gz
  sha256: 7443d6cd154760d55b6954142908eae30385672c4f3f838dd49876ec2f297823

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [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
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=DistributionUtils
  license: GPL-2.0-or-later
  summary: Utilities are provided which are of use in the packages I have developed for dealing
    with distributions. Currently these packages are GeneralizedHyperbolic, VarianceGamma,
    and SkewHyperbolic and NormalLaplace. Each of these packages requires DistributionUtils.
    Functionality includes sample skewness and kurtosis, log-histogram, tail plots,
    moments by integration, changing the point about which a moment is calculated, functions
    for testing distributions using inversion tests and the Massart inequality. Also
    includes an implementation of the incomplete Bessel K function.
  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
    - mfansler

# Package: DistributionUtils
# Version: 0.6-0
# Date: 2018-11-26
# Title: Distribution Utilities
# Author: David Scott <d.scott@auckland.ac.nz>
# Maintainer: David Scott <d.scott@auckland.ac.nz>
# Depends: R (>= 3.0.1)
# Suggests: GeneralizedHyperbolic, VarianceGamma, SkewHyperbolic, RUnit
# Encoding: latin1
# Description: Utilities are provided which are of use in the packages I have developed for dealing with distributions. Currently these packages are GeneralizedHyperbolic, VarianceGamma, and SkewHyperbolic and NormalLaplace. Each of these packages requires DistributionUtils. Functionality includes sample skewness and kurtosis, log-histogram, tail plots, moments by integration, changing the point about which a moment is calculated, functions for testing distributions using inversion tests and the Massart inequality. Also includes an implementation of the incomplete Bessel K function.
# License: GPL (>= 2)
# NeedsCompilation: yes
# Packaged: 2018-11-27 10:02:48 UTC; dsco036
# Repository: CRAN
# Date/Publication: 2018-11-27 10:40:06 UTC
