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

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

source:
  fn: MASS_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/MASS_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/MASS/MASS_{{ version }}.tar.gz
  sha256: 06f70922f13ae26f64ecb058241b8789a8b7ded008eeefb51ce75832d3d60a9a

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed  # [win]
    - {{posix}}coreutils  # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: http://www.stats.ox.ac.uk/pub/MASS4/
  license: GPL-2 | GPL-3
  summary: Functions and datasets to support Venables and Ripley, "Modern Applied Statistics
    with S" (4th edition, 2002).
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
