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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/geojsonsf_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/geojsonsf/geojsonsf_{{ version }}.tar.gz
  sha256: 42df40433bfbece5a39cd97b5bd4690b4424855241fcc3e7322ee68a3988bfbf

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-geometries
    - r-jsonify >=1.1.1
    - r-rapidjsonr >=1.2.0
    - r-sfheaders >=0.2.2
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-geometries
    - r-jsonify >=1.1.1
    - r-rapidjsonr >=1.2.0
    - r-sfheaders >=0.2.2

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

about:
  home: https://github.com/SymbolixAU/geojsonsf
  license: MIT
  summary: Converts Between GeoJSON and simple feature objects.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT

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

# Package: geojsonsf
# Type: Package
# Title: GeoJSON to Simple Feature Converter
# Version: 1.3.3
# Date: 2020-03-17
# Authors@R: c( person("David", "Cooley", ,"dcooley@symbolix.com.au", role = c("aut", "cre")) )
# Description: Converts Between GeoJSON and simple feature objects.
# License: GPL-3
# URL: https://github.com/SymbolixAU/geojsonsf
# BugReports: https://github.com/SymbolixAU/geojsonsf/issues
# Encoding: UTF-8
# LazyData: true
# Depends: R (>= 3.3.0)
# SystemRequirements: C++11
# LinkingTo: jsonify (>= 1.1.1), rapidjsonr (>= 1.2.0), Rcpp, sfheaders (>= 0.1.0)
# Imports: curl, jsonify (>= 1.1.1), Rcpp
# RoxygenNote: 7.0.2
# Suggests: covr, knitr, rmarkdown, testthat
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2020-03-16 21:15:48 UTC; david
# Author: David Cooley [aut, cre]
# Maintainer: David Cooley <dcooley@symbolix.com.au>
# Repository: CRAN
# Date/Publication: 2020-03-18 14:40:09 UTC
