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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/PoissonBinomial_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/PoissonBinomial/PoissonBinomial_{{ version }}.tar.gz
  sha256: efd4f7e37ae60bb67a229c8d3fa6b94fd2d34eab980edaf3f72e77cd31eea15b

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [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-rcpp >=1.0.3
    - fftw
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=1.0.3
    - fftw

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

about:
  home: https://CRAN.R-project.org/package=PoissonBinomial
  license: GPL-2.0-or-later
  summary: Efficient implementations of multiple exact and approximate methods as described in Hong (2013) <doi:10.1016/j.csda.2012.10.006>, Biscarri, Zhao & Brunner (2018) <doi:10.1016/j.csda.2018.01.007> and Zhang, Hong & Balakrishnan (2018) <doi:10.1080/00949655.2018.1440294> for computing the probability mass, cumulative
    distribution and quantile functions, as well as generating random numbers for both the ordinary and generalized Poisson binomial distribution.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: PoissonBinomial
# Type: Package
# Title: Efficient Computation of Ordinary and Generalized Poisson Binomial Distributions
# Version: 1.2.3
# Date: 2021-03-26
# Authors@R: person("Florian", "Junge", role = c("aut", "cre"), email = "florian.junge@h-da.de")
# Maintainer: Florian Junge <florian.junge@h-da.de>
# Language: en-US
# Description: Efficient implementations of multiple exact and approximate methods as described in Hong (2013) <doi:10.1016/j.csda.2012.10.006>, Biscarri, Zhao & Brunner (2018) <doi:10.1016/j.csda.2018.01.007> and Zhang, Hong & Balakrishnan (2018) <doi:10.1080/00949655.2018.1440294> for computing the probability mass, cumulative distribution and quantile functions, as well as generating random numbers for both the ordinary and generalized Poisson binomial distribution.
# License: GPL (>= 2)
# Encoding: UTF-8
# Imports: Rcpp (>= 1.0.3)
# LinkingTo: Rcpp
# SystemRequirements: fftw3 (>= 3.3)
# RoxygenNote: 7.1.1
# Suggests: knitr, rmarkdown, microbenchmark
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2021-03-26 14:47:47 UTC; Florian Junge
# Author: Florian Junge [aut, cre]
# Repository: CRAN
# Date/Publication: 2021-03-28 06:51:21 UTC
