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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/sfheaders_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sfheaders/sfheaders_{{ version }}.tar.gz
  sha256: 1a602bbad08299816b521069bb04af5c97545f114d5b9730ff31912a5ac19735

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('sfheaders')"           # [not win]
    - "\"%R%\" -e \"library('sfheaders')\""  # [win]

about:
  home: https://dcooley.github.io/sfheaders/
  license: GPL-3
  summary: Converts between R and Simple Feature 'sf' objects, without depending on the Simple Feature library. Conversion functions are available at both the R level, and through 'Rcpp'.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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

# Package: sfheaders
# Type: Package
# Title: Converts Between R Objects and Simple Feature Objects
# Date: 2020-03-19
# Version: 0.2.1
# Authors@R: c( person("David", "Cooley", ,"david.cooley.au@gmail.com", role = c("aut", "cre")) )
# Description: Converts between R and Simple Feature 'sf' objects, without depending on the Simple Feature library. Conversion functions are available at both the R level, and through 'Rcpp'.
# License: GPL-3
# URL: https://dcooley.github.io/sfheaders/
# BugReports: https://github.com/dcooley/sfheaders/issues
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 7.0.2
# SystemRequirements: C++11
# LinkingTo: Rcpp
# Imports: Rcpp
# Suggests: covr, knitr, testthat
# NeedsCompilation: yes
# Packaged: 2020-03-19 09:10:27 UTC; dave
# Author: David Cooley [aut, cre]
# Maintainer: David Cooley <david.cooley.au@gmail.com>
# Repository: CRAN
# Date/Publication: 2020-03-19 18:30:06 UTC
