{% set version = '2.1-1' %}

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

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

source:
  fn: mlbench_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/mlbench_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/mlbench/mlbench_{{ version }}.tar.gz

  sha256: 748141d56531a39dc4d37cf0a5165a40b653a04c507e916854053ed77119e0e6

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]

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

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

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=mlbench
  license: GPL-2
  summary: A collection of artificial and real-world machine learning benchmark problems, including,
    e.g., several data sets from the UCI repository.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
extra:
   recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
