{% set version = '1.41-6' %}

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

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

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

  sha256: 4de9d406d41c2b4f9ffe85ef0af20899f004e93e0d4dd6a9b9fd8b4136f9ea18

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

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

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

  run:
    - r-base
    - libgcc  # [not win]

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

about:
  home: https://cran.r-project.org/web/packages/qtl/index.html
  license: GPL-3
  summary: |
    Analysis of experimental crosses to identify genes (called quantitative trait loci,
    QTLs) contributing to variation in quantitative traits.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}\/lib\/R\/share\/licenses\/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - Johanneskoester
    - Bgruening
    - Daler
    - Jdblischak
