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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/exactextractr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/exactextractr/exactextractr_{{ version }}.tar.gz
  sha256: cc32ab3af8d881a7e7836c296ea42f3fdabf3373ec1de0b154dbfe9870ee8a74

build:
  merge_build_host: true  # [win]
  skip: true  # [win and r_base == "3.6"]
  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 }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - geos
    - r-base
    - r-rcpp >=0.12.12
    - r-raster
    - r-sf
  run:
    - geos
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.12.12
    - r-raster
    - r-sf

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

about:
  home: https://isciences.gitlab.io/exactextractr/, https://github.com/isciences/exactextractr
  license: Apache-2.0
  summary: Provides a replacement for the 'extract' function from the 'raster' package that is suitable for extracting raster values using 'sf' polygons.
  license_family: APACHE
  license_file: src/exactextract/LICENSE

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

# Package: exactextractr
# Title: Fast Extraction from Raster Datasets using Polygons
# Version: 0.2.1
# Authors@R: c( person("Daniel Baston", email = "dbaston@isciences.com", role = c("aut", "cre")), person("ISciences, LLC", role="cph"))
# Description: Provides a replacement for the 'extract' function from the 'raster' package that is suitable for extracting raster values using 'sf' polygons.
# Depends: R (>= 3.4.0)
# License: Apache License (== 2.0)
# SystemRequirements: GEOS (>= 3.5.0)
# Imports: Rcpp (>= 0.12.12), methods, raster, sf,
# URL: https://isciences.gitlab.io/exactextractr/, https://github.com/isciences/exactextractr
# BugReports: https://github.com/isciences/exactextractr/issues
# LinkingTo: Rcpp
# Suggests: testthat
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 7.0.2
# NeedsCompilation: yes
# Packaged: 2020-03-21 14:58:00 UTC; dan
# Author: Daniel Baston [aut, cre], ISciences, LLC [cph]
# Maintainer: Daniel Baston <dbaston@isciences.com>
# Repository: CRAN
# Date/Publication: 2020-03-21 16:10:02 UTC
