{% set version = '1.6.8' %}

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

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

source:
  fn: corpcor_{{ version }}.tar.gz
  url:
    - http://cran.r-project.org/src/contrib/Archive/corpcor/corpcor_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/corpcor/corpcor_{{ version }}.tar.gz
  sha256: 69feda67c0919da75ada95e2ada444a8d86b054deabd2ffb3fbec30eddc7dc3e


build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

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

  run:
    - r-base
    - libgcc    # [not win]

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


about:
  home: http://strimmerlab.org/software/corpcor/
  license: GPL (>= 2)
  license_family: GPL3
  summary: Efficient Estimation of Covariance and (Partial) Correlation 

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
