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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/mvnfast_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mvnfast/mvnfast_{{ version }}.tar.gz
  sha256: 21b9fa72d1e3843513908aaacd6c4d876cc7a9339782d0151b24910df2975f88

build:
  merge_build_host: True  # [win]
  number: 2
  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]
    - llvm-openmp  # [osx]
  host:
    - libblas
    - liblapack
    - r-base
    - r-bh
    - r-rcpp >=0.12.0
    - r-rcpparmadillo
  run:
    - llvm-openmp  # [osx]
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-bh
    - r-rcpp >=0.12.0
    - r-rcpparmadillo

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

about:
  home: https://github.com/mfasiolo/mvnfast, www.sitmo.com
  license: GPL-2
  summary: 'Provides computationally efficient tools related to the multivariate normal and Student''s
    t distributions. The main functionalities are: simulating multivariate random vectors,
    evaluating multivariate normal or Student''s t densities and Mahalanobis distances.
    These tools are very efficient thanks to the use of C++ code and of the OpenMP API.'
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: mvnfast
# Type: Package
# Title: Fast Multivariate Normal and Student's t Methods
# Version: 0.2.5
# Date: 2018-01-31
# Authors@R: c(person("Matteo", "Fasiolo", email = "matteo.fasiolo@gmail.com", role = c("aut", "cre")), person("Thijs", " van den Berg", role = c("ctb")))
# Maintainer: Matteo Fasiolo <matteo.fasiolo@gmail.com>
# Description: Provides computationally efficient tools related to the multivariate normal and Student's t distributions. The main functionalities are: simulating multivariate random vectors, evaluating multivariate normal or Student's t densities and Mahalanobis distances. These tools are very efficient thanks to the use of C++ code and of the OpenMP API.
# License: GPL (>= 2.0)
# URL: https://github.com/mfasiolo/mvnfast, www.sitmo.com
# Imports: Rcpp (>= 0.12.0)
# Suggests: knitr, rmarkdown, testthat, mvtnorm, microbenchmark, MASS, plyr, RhpcBLASctl
# LinkingTo: Rcpp, RcppArmadillo, BH
# VignetteBuilder: knitr
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2018-01-31 13:22:24 UTC; teo
# Author: Matteo Fasiolo [aut, cre], Thijs van den Berg [ctb]
# Repository: CRAN
# Date/Publication: 2018-01-31 18:05:28 UTC
