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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/enviPat_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/enviPat/enviPat_{{ version }}.tar.gz
  sha256: a0857fdf1a2f206b66bb097a4188d95164edd7c0b9765016219440ceab3c6bbf

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

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

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

about:
  home: http://www.envipat.eawag.ch/, http://pubs.acs.org/doi/abs/10.1021/acs.analchem.5b00941
  license: GPL-2.0-only
  summary: Fast and very memory-efficient calculation of isotope patterns, subsequent convolution
    to theoretical envelopes (profiles) plus valley detection and centroidization or
    intensoid calculation. Batch processing, resolution interpolation, wrapper, adduct
    calculations and molecular formula parsing. Loos, M., Gerber, C., Corona, F., Hollender,
    J., Singer, H. (2015) <doi:10.1021/acs.analchem.5b00941>.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: enviPat
# Type: Package
# Title: Isotope Pattern, Profile and Centroid Calculation for Mass Spectrometry
# Version: 2.4
# Date: 2019-03-18
# Author: Martin Loos, Christian Gerber
# Maintainer: Martin Loos <mloos@envibee.ch>
# Description: Fast and very memory-efficient calculation of isotope patterns, subsequent convolution to theoretical envelopes (profiles) plus valley detection and centroidization or intensoid calculation. Batch processing, resolution interpolation, wrapper, adduct calculations and molecular formula parsing. Loos, M., Gerber, C., Corona, F., Hollender, J., Singer, H. (2015) <doi:10.1021/acs.analchem.5b00941>.
# License: GPL-2
# BugReports: https://github.com/blosloos/enviPat/issues
# URL: http://www.envipat.eawag.ch/, http://pubs.acs.org/doi/abs/10.1021/acs.analchem.5b00941
# NeedsCompilation: yes
# Packaged: 2019-04-07 17:07:25 UTC; mloos
# Repository: CRAN
# Date/Publication: 2019-04-07 22:12:56 UTC
