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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/castor_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/castor/castor_{{ version }}.tar.gz
  sha256: c6057acc3474c1988e2cbb516ecd89c21c2bb12dbae43f9b11cf2e46cd5e021f

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-matrix
    - r-rspectra
    - r-rcpp >=0.12.10
    - r-naturalsort
    - r-nloptr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rspectra
    - r-rcpp >=0.12.10
    - r-naturalsort
    - r-nloptr

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

about:
  home: https://CRAN.R-project.org/package=castor
  license: GPL-2.0-or-later
  summary: 'Efficient phylogenetic analyses on massive phylogenies comprising up to millions of tips. Functions include pruning, rerooting, calculation of most-recent common ancestors, calculating distances from the tree root and calculating pairwise distances. Calculation of phylogenetic signal and mean trait depth (trait
    conservatism), ancestral state reconstruction and hidden character prediction of discrete characters, simulating and fitting models of trait evolution, fitting and simulating diversification models, dating trees, comparing trees, and reading/writing trees in Newick format. Citation: Louca, Stilianos and Doebeli, Michael
    (2017) <doi:10.1093/bioinformatics/btx701>.'
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: castor
# Type: Package
# Title: Efficient Phylogenetics on Large Trees
# Version: 1.4.2
# Date: 2019-07-29
# Author: Stilianos Louca
# Maintainer: Stilianos Louca <louca@zoology.ubc.ca>
# Description: Efficient phylogenetic analyses on massive phylogenies comprising up to millions of tips. Functions include pruning, rerooting, calculation of most-recent common ancestors, calculating distances from the tree root and calculating pairwise distances. Calculation of phylogenetic signal and mean trait depth (trait conservatism), ancestral state reconstruction and hidden character prediction of discrete characters, simulating and fitting models of trait evolution, fitting and simulating diversification models, dating trees, comparing trees, and reading/writing trees in Newick format. Citation: Louca, Stilianos and Doebeli, Michael (2017) <doi:10.1093/bioinformatics/btx701>.
# License: GPL (>= 2)
# Depends: Rcpp (>= 0.12.10)
# Imports: parallel, naturalsort, stats, nloptr
# LinkingTo: Rcpp
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2019-07-29 19:00:39 UTC; StilianosLouca
# Repository: CRAN
# Date/Publication: 2019-07-29 22:40:02 UTC
