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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/GUILDS_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/GUILDS/GUILDS_{{ version }}.tar.gz
  sha256: 0dd59a52afcae6624d3b37639c016efc0b3752db5f61378cbecb8f6437e8867e

build:
  merge_build_host: True  # [win]
  number: 1
  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-rcpp >=0.11.0
    - r-pracma
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.11.0
    - r-pracma

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

about:
  home: https://github.com/thijsjanzen/GUILDS
  license: GPL-2
  summary: A collection of sampling formulas for the unified neutral model of biogeography and
    biodiversity. Alongside the sampling formulas, it includes methods to perform maximum
    likelihood optimization of the sampling formulas, methods to generate data given
    the neutral model, and methods to estimate the expected species abundance distribution.
    Sampling formulas included in the GUILDS package are the Etienne Sampling Formula
    (Etienne 2005), the guild sampling formula, where guilds are assumed to differ in
    dispersal ability (Janzen et al. 2015), and  the guilds sampling formula conditioned
    on guild size (Janzen et al. 2015).
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: GUILDS
# Type: Package
# Title: Implementation of Sampling Formulas for the Unified Neutral Model of Biodiversity and Biogeography, with or without Guild Structure
# Version: 1.3
# Authors@R: c( person("Thijs","Janzen", email = "thijsjanzen@gmail.com",role=c("aut","cre")), person("Bart","Haegeman",email="",role = c("ctb")), person("Franck","Jabot",role = c("ctb")), person("Jerome","Chave",role = c("ctb")))
# Description: A collection of sampling formulas for the unified neutral model of biogeography and biodiversity. Alongside the sampling formulas, it includes methods to perform maximum likelihood optimization of the sampling formulas, methods to generate data given the neutral model, and methods to estimate the expected species abundance distribution. Sampling formulas included in the GUILDS package are the Etienne Sampling Formula (Etienne 2005), the guild sampling formula, where guilds are assumed to differ in dispersal ability (Janzen et al. 2015), and  the guilds sampling formula conditioned on guild size (Janzen et al. 2015).
# License: GPL-2
# Imports: Rcpp (>= 0.11.0), pracma
# Suggests: testthat, knitr, rmarkdown
# LinkingTo: Rcpp
# NeedsCompilation: yes
# Repository: CRAN
# URL: https://github.com/thijsjanzen/GUILDS
# BugReports: https://github.com/thijsjanzen/GUILDS/issues
# VignetteBuilder: knitr
# Packaged: 2016-09-24 14:24:01 UTC; janzen
# Author: Thijs Janzen [aut, cre], Bart Haegeman [ctb], Franck Jabot [ctb], Jerome Chave [ctb]
# Maintainer: Thijs Janzen <thijsjanzen@gmail.com>
# Date/Publication: 2016-09-26 21:21:03
