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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/robustHD_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/robustHD/robustHD_{{ version }}.tar.gz
  sha256: 83602f3f050d3b5efdb5702125eec4e435c77bf54d71ab0f58f721e0b941d8a6

build:
  merge_build_host: true  # [win]
  number: 0
  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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
    - llvm-openmp  # [osx]
    - libgomp      # [linux]
  host:
    - libblas
    - liblapack
    - r-base
    - r-mass
    - r-rcpp >=0.9.10
    - r-rcpparmadillo >=0.3.0
    - r-ggplot2 >=0.9.2
    - r-perry >=0.3.0
    - r-robustbase >=0.9_5
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass
    - r-rcpp >=0.9.10
    - r-rcpparmadillo >=0.3.0
    - r-ggplot2 >=0.9.2
    - r-perry >=0.3.0
    - r-robustbase >=0.9_5

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

about:
  home: https://CRAN.R-project.org/package=robustHD
  license: GPL-2.0-or-later
  summary: Robust methods for high-dimensional data, in particular linear model selection techniques based on least angle regression and sparse regression.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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