{% set version = '0.7.800.2.0' %}

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

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

source:
  fn: RcppArmadillo_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/RcppArmadillo_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/RcppArmadillo_{{ version }}.tar.gz
  sha256: 99ffdfb0d5498905b450c3badfc5cae0e584a7db16eb2e5cc8f1704b4081b408

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-rcpp >=0.11.0
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-rcpp >=0.11.0

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

about:
  home: http://dirk.eddelbuettel.com/code/rcpp.armadillo.html
  license: GPL (>= 2)
  summary: Armadillo is a templated C++ linear algebra library that
    aims towards a good balance between speed and ease of use. Integer, floating point
    and complex numbers are supported, as well as a subset of trigonometric and statistics
    functions. Various matrix decompositions are provided through optional integration
    with LAPACK and ATLAS libraries.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
