{% set version = '1.0' %}

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

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

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

  sha256: 7a36044224285354a58686dbf7ce24ee8bd8a543a56821d7b8152c90e7ee004d

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

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

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

  run:
    - r-base
    - r-mass
    - r-outliers
    - r-qtl
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=mQTL
  license: GPL
  summary: mQTL provides a complete QTL analysis pipeline for metabolomic data.  Distinctive
    features include normalisation using PQN approach, peak alignment   using RSPA approach,
    dimensionality reduction using SRV approach and finally  QTL mapping using R/qtl
    package.
  license_family: GPL
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
