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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/fasterize_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/fasterize/fasterize_{{ version }}.tar.gz
  sha256: 62b459625e9bdb00251ec5f6cb873e0c59713f3e86dc1e2c8332adc0cea17f81

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-rcpp
    - r-rcpparmadillo
    - r-raster
    - r-sp
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rcpparmadillo
    - r-raster
    - r-sp

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

about:
  home: https://github.com/ecohealthalliance/fasterize
  license: MIT
  summary: Provides a drop-in replacement for rasterize() from the 'raster' package that takes 'sf'-type objects, and is much faster. There is support for the main options provided by the rasterize() function, including setting the field used and background value, and options for aggregating multi-layer rasters. Uses the
    scan line algorithm attributed to Wylie et al. (1967) <doi:10.1145/1465611.1465619>.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: fasterize
# Title: Fast Polygon to Raster Conversion
# Version: 1.0.0
# Authors@R: c( person("Noam", "Ross", , "ross@ecohealthalliance.org", role = c("aut", "cre"), comment=c(ORCID = "0000-0002-1642-628X")), person("Michael", "Sumner", role = "ctb", comment=c(ORCID = "0000-0002-2471-7511")), person("EcoHealth Alliance", role="cph"))
# Description: Provides a drop-in replacement for rasterize() from the 'raster' package that takes 'sf'-type objects, and is much faster. There is support for the main options provided by the rasterize() function, including setting the field used and background value, and options for aggregating multi-layer rasters. Uses the scan line algorithm attributed to Wylie et al. (1967) <doi:10.1145/1465611.1465619>.
# License: MIT + file LICENSE
# LazyData: true
# URL: https://github.com/ecohealthalliance/fasterize
# BugReports: https://github.com/ecohealthalliance/fasterize/issues
# RoxygenNote: 6.0.1
# SystemRequirements: C++11
# Suggests: testthat, microbenchmark, knitr, rmarkdown, sf
# Depends: R (>= 3.3.0)
# Imports: methods, Rcpp, raster, sp
# LinkingTo: Rcpp, RcppArmadillo
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2018-03-22 00:39:50 UTC; noamross
# Author: Noam Ross [aut, cre] (<https://orcid.org/0000-0002-1642-628X>), Michael Sumner [ctb] (<https://orcid.org/0000-0002-2471-7511>), EcoHealth Alliance [cph]
# Maintainer: Noam Ross <ross@ecohealthalliance.org>
# Repository: CRAN
# Date/Publication: 2018-03-22 11:27:05 UTC
