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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/polylabelr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/polylabelr/polylabelr_{{ version }}.tar.gz
  sha256: c27de763f847d2bcca794b61d2a07b06beeba1421b736bdae2dda25728d86205

build:
  merge_build_host: True  # [win]
  number: 1
  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('polylabelr')"           # [not win]
    - "\"%R%\" -e \"library('polylabelr')\""  # [win]

about:
  home: https://github.com/jolars/polylabelr, https://jolars.github.io/polylabelr
  license: MIT
  summary: A wrapper around the C++ library 'polylabel' from 'Mapbox', providing an efficient
    routine for finding the approximate pole of inaccessibility of a polygon, which
    usually serves as an excellent candidate for labeling of a polygon.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# Package: polylabelr
# Title: Find the Pole of Inaccessibility (Visual Center) of a Polygon
# Version: 0.2.0
# Authors@R: c(person(given = "Johan", family = "Larsson", role = c("aut", "cre"), email = "johanlarsson@outlook.com", comment = c(ORCID = "0000-0002-4029-5945")), person(given = "Kent", family = "Johnson", role = "ctb", email = "kent@kentsjohnson.com"), person("Mapbox", role = "cph", comment = "polylabel, variant, and geometry libraries"))
# Description: A wrapper around the C++ library 'polylabel' from 'Mapbox', providing an efficient routine for finding the approximate pole of inaccessibility of a polygon, which usually serves as an excellent candidate for labeling of a polygon.
# License: MIT + file LICENSE
# Copyright: see file COPYRIGHTS
# Encoding: UTF-8
# LazyData: true
# URL: https://github.com/jolars/polylabelr, https://jolars.github.io/polylabelr
# BugReports: https://github.com/jolars/polylabelr/issues
# Depends: R (>= 3.3.0)
# LinkingTo: Rcpp
# Imports: Rcpp
# RoxygenNote: 7.1.0
# Suggests: covr, testthat, spelling, sf
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2020-04-19 09:06:22 UTC; johan
# Author: Johan Larsson [aut, cre] (<https://orcid.org/0000-0002-4029-5945>), Kent Johnson [ctb], Mapbox [cph] (polylabel, variant, and geometry libraries)
# Maintainer: Johan Larsson <johanlarsson@outlook.com>
# Repository: CRAN
# Date/Publication: 2020-04-19 15:00:09 UTC
