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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/s2_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/s2/s2_{{ version }}.tar.gz
  sha256: a6cc4ebf1e1c00abb632a324cd29e4ae061898b16bab46296e2081baee12a4f5

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-wk                       # [build_platform != target_platform]
    - r-rcpp                     # [build_platform != target_platform]
    - {{ 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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-rcpp
    - r-wk
    - openssl
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-wk
    - openssl

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

about:
  home: https://r-spatial.github.io/s2/, https://github.com/r-spatial/s2, https://s2geometry.io/
  license: Apache-2.0
  summary: Provides R bindings for Google's s2 library for geometric calculations on the sphere. High-performance constructors and exporters provide high compatibility with existing spatial packages, transformers construct new geometries from existing geometries, predicates provide a means to select geometries based on spatial
    relationships, and accessors extract information about geometries.
  license_family: APACHE
  license_file: LICENSE

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

# Package: s2
# Title: Spherical Geometry Operators Using the S2 Geometry Library
# Version: 1.0.5
# Authors@R: c( person(given = "Dewey", family = "Dunnington", role = c("aut"), email = "dewey@fishandwhistle.net", comment = c(ORCID = "0000-0002-9415-4582")), person(given = "Edzer", family = "Pebesma", role = c("aut", "cre"), email = "edzer.pebesma@uni-muenster.de", comment = c(ORCID = "0000-0001-8049-7069")), person("Ege", "Rubak", email="rubak@math.aau.dk", role = c("aut")), person("Jeroen", "Ooms", , "jeroen.ooms@stat.ucla.edu", role = "ctb", comment = "configure script"), person(family = "Google, Inc.", role = "cph", comment = "Original s2geometry.io source code") )
# Description: Provides R bindings for Google's s2 library for geometric calculations on the sphere. High-performance constructors and exporters provide high compatibility with existing spatial packages, transformers construct new geometries from existing geometries, predicates provide a means to select geometries based on spatial relationships, and accessors extract information about geometries.
# License: Apache License (== 2.0)
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 7.1.1
# LinkingTo: Rcpp, wk
# Imports: Rcpp, wk
# Suggests: testthat, vctrs
# URL: https://r-spatial.github.io/s2/, https://github.com/r-spatial/s2, https://s2geometry.io/
# BugReports: https://github.com/r-spatial/s2/issues
# Depends: R (>= 3.0.0)
# NeedsCompilation: yes
# Packaged: 2021-05-21 19:14:33 UTC; edzer
# Author: Dewey Dunnington [aut] (<https://orcid.org/0000-0002-9415-4582>), Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Ege Rubak [aut], Jeroen Ooms [ctb] (configure script), Google, Inc. [cph] (Original s2geometry.io source code)
# Maintainer: Edzer Pebesma <edzer.pebesma@uni-muenster.de>
# Repository: CRAN
# Date/Publication: 2021-06-01 08:20:02 UTC
