{% set version = '0.92-7' %}

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

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

source:
  fn: robustbase_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/robustbase_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/robustbase/robustbase_{{ version }}.tar.gz
  sha256: fcbd6ccbb0291b599fe6a674a91344511e0a691b9cadba0a9d40037faa22bf8f

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('fortran') }}        # [unix]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
    - r-deoptimr

  run:
    - r-base
    - r-deoptimr

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

about:
  home: http://robustbase.r-forge.r-project.org/
  license: GPL (>= 2)
  summary: |
    Essential Robust Statistics. Tools allowing to analyze data with robust methods.  This
    includes regression methodology including model selections and multivariate statistics.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
