{% set version = '1.1.0' %}

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

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

source:
  fn: PhylogeneticEM_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/PhylogeneticEM_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/PhylogeneticEM/PhylogeneticEM_{{ version }}.tar.gz
  sha256: 5319d95cd0626c2c9ee064bc64ad8cd2f9dc67ebbc66ad556936dc07fa47274a

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
    - r-linselect >=0.0.2
    - r-mass >=7.3.45
    - r-matrix >=1.2.3
    - r-rcpp
    - r-rcpparmadillo
    - r-ape >=3.5
    - r-capushe >=1.1.1
    - r-foreach >=1.4.3
    - r-glmnet >=2.0.5
    - r-grplasso >=0.4_5
    - r-plyr >=1.8.4
    - r-robustbase >=0.92.6

  run:
    - r-base
    - r-linselect >=0.0.2
    - r-mass >=7.3.45
    - r-matrix >=1.2.3
    - r-rcpp
    - r-rcpparmadillo
    - r-ape >=3.5
    - r-capushe >=1.1.1
    - r-foreach >=1.4.3
    - r-glmnet >=2.0.5
    - r-grplasso >=0.4_5
    - r-plyr >=1.8.4
    - r-robustbase >=0.92.6

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

about:
  home: https://github.com/pbastide/PhylogeneticEM
  license: GPL (>= 2)
  summary: "Implementation of the automatic shift detection method for Brownian Motion (BM) or
    Ornstein-Uhlenbeck (OU) models of trait evolution on phylogenies. Some tools to handle
    equivalent shifts configurations are also available."
  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
