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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/ade4_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ade4/ade4_{{ version }}.tar.gz
  sha256: 007df54e83a2a6cb8d6da8006f0aace011e7eaa7744dc5f8230ac2c002b393b4

build:
  merge_build_host: true  # [win]
  number: 1
  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
    - r-mass
    - r-pixmap
    - r-rcpp
    - r-rcpparmadillo
    - r-sp
    - libblas
    - liblapack
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass
    - r-pixmap
    - r-rcpp
    - r-sp

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

about:
  home: http://pbil.univ-lyon1.fr/ADE-4
  dev_url: https://github.com/sdray/ade4
  license: GPL-2.0-or-later
  summary: Tools for multivariate data analysis. Several methods are provided for the analysis (i.e., ordination) of one-table (e.g., principal component analysis, correspondence analysis), two-table (e.g., coinertia analysis, redundancy analysis), three-table (e.g., RLQ analysis) and K-table (e.g., STATIS, multiple coinertia
    analysis). The philosophy of the package is described in Dray and Dufour (2007) <doi:10.18637/jss.v022.i04>.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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