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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/dqrng_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/dqrng/dqrng_{{ version }}.tar.gz
  sha256: 4beeabfe245ce7196b07369f2a7d277cb08869ad8b45a22c6354c4cc70a39abb

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-rcpp                     # [build_platform != target_platform]
    - r-bh                       # [build_platform != target_platform]
    - r-sitmo                    # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-bh >=1.64.0_1
    - r-rcpp >=0.12.16
    - r-sitmo >=2.0.0
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-bh >=1.64.0_1
    - r-rcpp >=0.12.16
    - r-sitmo >=2.0.0

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

about:
  home: https://www.daqana.org/dqrng, https://github.com/daqana/dqrng
  license: AGPL-3.0-only
  summary: "Several fast random number generators are provided as C++ header only libraries: The PCG family by O'Neill (2014 <https://www.cs.hmc.edu/tr/hmc-cs-2014-0905.pdf>) as well as Xoroshiro128+ and Xoshiro256+ by Blackman and Vigna (2018 <arXiv:1805.01407>). In addition fast functions for generating random numbers\
    \ according to a uniform, normal and exponential distribution are included. The latter two use the Ziggurat algorithm originally proposed by Marsaglia and Tsang (2000, <doi:10.18637/jss.v005.i08>). These functions are exported to R and as a C++ interface and are enabled for use with the default 64 bit generator from\
    \ the PCG family, Xoroshiro128+ and Xoshiro256+ as well as the 64 bit version of the 20 rounds Threefry engine (Salmon et al., 2011 <doi:10.1145/2063384.2063405>) as provided by the package 'sitmo'."
  license_family: AGPL

  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/AGPL-3
    - LICENSE
extra:
  recipe-maintainers:
    - conda-forge/r

# Package: dqrng
# Type: Package
# Title: Fast Pseudo Random Number Generators
# Version: 0.2.1
# Authors@R: c( person("Ralf", "Stubner", email = "ralf.stubner@gmail.com", role = c("aut", "cre")), person("daqana GmbH", role = "cph"), person("David Blackman", role = "ctb"), person("Melissa O'Neill", email = "oneill@pcg-random.org", role = "ctb"), person("Sebastiano Vigna", email = "vigna@acm.org", role = "ctb"), person("Aaron", "Lun", role="ctb") )
# Description: Several fast random number generators are provided as C++ header only libraries: The PCG family by O'Neill (2014 <https://www.cs.hmc.edu/tr/hmc-cs-2014-0905.pdf>) as well as Xoroshiro128+ and Xoshiro256+ by Blackman and Vigna (2018 <arXiv:1805.01407>). In addition fast functions for generating random numbers according to a uniform, normal and exponential distribution are included. The latter two use the Ziggurat algorithm originally proposed by Marsaglia and Tsang (2000, <doi:10.18637/jss.v005.i08>). These functions are exported to R and as a C++ interface and are enabled for use with the default 64 bit generator from the PCG family, Xoroshiro128+ and Xoshiro256+ as well as the 64 bit version of the 20 rounds Threefry engine (Salmon et al., 2011 <doi:10.1145/2063384.2063405>) as provided by the package 'sitmo'.
# License: AGPL-3 | file LICENSE
# Depends: R (>= 3.1.0)
# Imports: Rcpp (>= 0.12.16)
# LinkingTo: Rcpp, BH (>= 1.64.0-1), sitmo (>= 2.0.0)
# RoxygenNote: 6.1.1
# Suggests: testthat, knitr, rmarkdown
# VignetteBuilder: knitr
# URL: https://www.daqana.org/dqrng, https://github.com/daqana/dqrng
# BugReports: https://github.com/daqana/dqrng/issues
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-05-17 14:56:00 UTC; ralf
# Author: Ralf Stubner [aut, cre], daqana GmbH [cph], David Blackman [ctb], Melissa O'Neill [ctb], Sebastiano Vigna [ctb], Aaron Lun [ctb]
# Maintainer: Ralf Stubner <ralf.stubner@gmail.com>
# Repository: CRAN
# Date/Publication: 2019-05-17 15:40:03 UTC
