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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/wk_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/wk/wk_{{ version }}.tar.gz
  sha256: e960f3044c95988cb9b5a6041e094f24a8d0a6162131b73eb98b68c9a1c1ee63

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

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

about:
  home: https://paleolimbot.github.io/wk/, https://github.com/paleolimbot/wk
  license: MIT
  summary: Provides a minimal R and C++ API for parsing well-known binary and well-known text representation of geometries to and from R-native formats. Well-known binary is compact and fast to parse; well-known text is human-readable and is useful for writing tests. These formats are only useful in R if the information
    they contain can be accessed in R, for which high-performance functions are provided here.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: wk
# Title: Lightweight Well-Known Geometry Parsing
# Version: 0.3.3
# Authors@R: c( person(given = "Dewey", family = "Dunnington", role = c("aut", "cre"), email = "dewey@fishandwhistle.net", comment = c(ORCID = "0000-0002-9415-4582")), person(given = "Edzer", family = "Pebesma", role = c("aut"), email = "edzer.pebesma@uni-muenster.de", comment = c(ORCID = "0000-0001-8049-7069")) )
# Maintainer: Dewey Dunnington <dewey@fishandwhistle.net>
# Description: Provides a minimal R and C++ API for parsing well-known binary and well-known text representation of geometries to and from R-native formats. Well-known binary is compact and fast to parse; well-known text is human-readable and is useful for writing tests. These formats are only useful in R if the information they contain can be accessed in R, for which high-performance functions are provided here.
# License: MIT + file LICENSE
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 7.1.1
# LinkingTo: Rcpp
# Imports: Rcpp
# Suggests: testthat, vctrs (>= 0.3.0), wkutils, sf
# URL: https://paleolimbot.github.io/wk/, https://github.com/paleolimbot/wk
# BugReports: https://github.com/paleolimbot/wk/issues
# NeedsCompilation: yes
# Packaged: 2020-10-13 00:25:28 UTC; dewey
# Author: Dewey Dunnington [aut, cre] (<https://orcid.org/0000-0002-9415-4582>), Edzer Pebesma [aut] (<https://orcid.org/0000-0001-8049-7069>)
# Repository: CRAN
# Date/Publication: 2020-10-13 04:40:03 UTC
