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

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

source:
  fn: ape_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ape_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ape/ape_{{ version }}.tar.gz
  sha256: b7d5dca66881638227a40aa59533904aa5efe0f4b867851b248e8f948a01a26e

build:
  merge_build_host: True  # [win]
  number: 2
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.12.0
    - r-lattice
    - r-nlme
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.12.0
    - r-lattice
    - r-nlme

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

about:
  home: http://ape-package.ird.fr/
  license: GPL (>= 2)
  summary: Functions for reading, writing, plotting, and manipulating phylogenetic trees, analyses
    of comparative data in a phylogenetic framework, ancestral character analyses, analyses
    of diversification and macroevolution, computing distances from DNA sequences, reading
    and writing nucleotide sequences as well as importing from BioConductor, and several
    tools such as Mantel's test, generalized skyline plots, graphical exploration of
    phylogenetic data (alex, trex, kronoviz), estimation of absolute evolutionary rates
    and clock-like trees using mean path lengths and penalized likelihood, dating trees
    with non-contemporaneous sequences, translating DNA into AA sequences, and assessing
    sequence alignments. Phylogeny estimation can be done with the NJ, BIONJ, ME, MVR,
    SDM, and triangle methods, and several methods handling incomplete distance matrices
    (NJ*, BIONJ*, MVR*, and the corresponding triangle method). Some functions call
    external applications (PhyML, Clustal, T-Coffee, Muscle) whose results are returned
    into R.
  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
