{% set version = "2.1.1" %}

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

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

source:
  fn: mRMRe_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/mRMRe_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mRMRe/mRMRe_{{ version }}.tar.gz

  sha256: 0f30a5d8d11ebb52b3275d0950901efc232fc4640fcc0e92ebb16fbaac66f5de

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('m2w64_cxx') }}  # [win]
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
  host:
    - r-base
    - r-igraph
    - r-survival
  run:
    - r-base
    - r-igraph
    - r-survival


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

about:
  home: https://cran.r-project.org/web/packages/mRMRe/index.html
  license: Artistic-2.0
  summary: Computes mutual information matrices from continuous, categorical and survival variables, as well as feature selection with minimum redundancy, maximum relevance (mRMR) and a new ensemble mRMR technique.
  license_family: OTHER
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/Artistic-2.0
extra:
  recipe-maintainers:
    - conda-forge/r
