{% set version = '2.4-3' %}

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

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

source:
  fn: vegan_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/vegan_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/vegan/vegan_{{ version }}.tar.gz
  sha256: 2556b1281a62e53f32bb57539bc600c00a599d0699867912220535d1a3ebec97

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

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

requirements:
  build:
    - r-base
    - r-mass
    - r-cluster
    - r-lattice
    - r-mgcv
    - r-permute >=0.9
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - libgcc  # [not win]
    - r-base
    - r-mass
    - r-cluster
    - r-lattice
    - r-mgcv
    - r-permute >=0.9

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

about:
  home: https://cran.r-project.org, https://github.com/vegandevs/vegan
  license: GPL-2
  summary: Ordination methods, diversity analysis and other functions for community and vegetation
    ecologists.
  license_family: GPL2

extra:
  recipe-maintainers:
    - daf
    - ocefpaf
    - johanneskoester
    - bgruening
