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

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

source:
  fn: compositions_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/compositions_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/compositions/compositions_{{ version }}.tar.gz
  sha256: 110d71ae000561987cb73fc76cd953bd69d37562cb401ed3c36dca137d01b78a

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]
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-bayesm
    - r-energy
    - r-robustbase
    - r-tensora
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-bayesm
    - r-energy
    - r-robustbase
    - r-tensora

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

about:
  home: http://www.stat.boogaart.de/compositions
  license: GPL (>= 2)
  summary: Provides functions for the consistent analysis of compositional  data (e.g. portions
    of substances) and positive numbers (e.g. concentrations)  in the way proposed by
    J. Aitchison and V. Pawlowsky-Glahn.
  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
    - dbast
    - apcamargo
