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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/protViz_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/protViz/protViz_{{ version }}.tar.gz
  sha256: dc923cbd46f904a736496e4552209ed7aac1c0a4adc4f1363c838388d9e7d238

build:
  merge_build_host: true  # [win]
  skip: true  # [r_base == "4.0"]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: lattice, RUnit, xtable
requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-rcpp >=1.0
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=1.0

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

about:
  home: https://github.com/protViz/protViz/
  license: GPL-3.0-only
  summary: Helps with quality checks, visualizations  and analysis of mass spectrometry data, coming from proteomics  experiments. The package is developed, tested and used at the Functional  Genomics Center Zurich. We use this package mainly for prototyping,  teaching, and having fun with proteomics data. But it can also
    be  used to do data analysis for small scale data sets.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r
    - MathiasHaudgaard
