{% set version = '1.1-4' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/dismo_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/dismo/dismo_{{ version }}.tar.gz
  sha256: f2110f716cd9e4cca5fd2b22130c6954658aaf61361d2fe688ba22bbfdfa97c8

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: rJava (>= 0.9-7), rgdal, rgeos, XML, ROCR, deldir, gstat, randomForest, kernlab, maptools, jsonlite, gbm (>= 2.1.1)
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-raster >=2.5_2
    - r-sp >=1.2_0

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-raster >=2.5_2
    - r-sp >=1.2_0

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('dismo')"           # [not win]
    - "\"%R%\" -e \"library('dismo')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: http://rspatial.org/sdm/
  license: GPL-3
  summary: Functions for species distribution modeling, that is, predicting entire geographic
    distributions form occurrences at a number of sites and the environment at these
    sites.
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Package: dismo
# Type: Package
# Title: Species Distribution Modeling
# Version: 1.1-4
# Date: 2017-01-08
# Depends: R (>= 3.2.0), methods, raster (>= 2.5-2), sp (>= 1.2-0)
# Suggests: rJava (>= 0.9-7), rgdal, rgeos, XML, ROCR, deldir, gstat, randomForest, kernlab, maptools, jsonlite, gbm (>= 2.1.1)
# Author: Robert J. Hijmans, Steven Phillips, John Leathwick and Jane Elith
# Maintainer: Robert J. Hijmans <r.hijmans@gmail.com>
# Description: Functions for species distribution modeling, that is, predicting entire geographic distributions form occurrences at a number of sites and the environment at these sites.
# License: GPL (>= 3)
# LazyLoad: yes
# URL: http://rspatial.org/sdm/
# NeedsCompilation: yes
# Packaged: 2017-01-09 00:48:44 UTC; Robert
# Repository: CRAN
# Date/Publication: 2017-01-09 09:49:36

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
