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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/sads_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sads/sads_{{ version }}.tar.gz
  sha256: 89d3d0d0729162cd5138a0049b66ad49581aca4594c1bdf824172f7bb76cdbc8

build:
  merge_build_host: True  # [win]
  number: 0
  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-guilds
    - r-mass
    - r-vgam
    - r-bbmle >=1.0.19
    - r-poilog
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-guilds
    - r-mass
    - r-vgam
    - r-bbmle >=1.0.19
    - r-poilog

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

about:
  home: http://piLaboratory.github.io/sads, https://github.com/piklprado/sads
  license: GPL-2
  summary: Maximum likelihood tools to fit and compare models of species abundance distributions
    and of species rank-abundance distributions.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: sads
# Type: Package
# Title: Maximum Likelihood Models for Species Abundance Distributions
# Version: 0.4.2
# Date: 2018-06-16
# Author: Paulo I. Prado, Murilo Dantas Miranda and Andre Chalom
# Maintainer: Paulo I. Prado <prado@ib.usp.br>
# Depends: stats, bbmle (>= 1.0.19)
# Imports: MASS, methods, graphics, grDevices, VGAM, poilog, GUILDS
# Suggests: vegan
# Description: Maximum likelihood tools to fit and compare models of species abundance distributions and of species rank-abundance distributions.
# License: GPL-2
# LazyData: true
# Encoding: UTF-8
# URL: http://piLaboratory.github.io/sads, https://github.com/piklprado/sads
# BugReports: https://github.com/piLaboratory/sads/issues
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2018-06-16 22:21:53 UTC; paulo
# Repository: CRAN
# Date/Publication: 2018-06-16 22:47:56 UTC
