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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/polyclip_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/polyclip/polyclip_{{ version }}.tar.gz
  sha256: 74dabc0dfe5a527114f0bb8f3d22f5d1ae694e6ea9345912909bae885525d34b

build:
  merge_build_host: True  # [win]
  number: 2
  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 }}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]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: http://www.angusj.com/delphi/clipper.php, https://sourceforge.net/projects/polyclipping,
    https://github.com/baddstats/polyclip
  license: BSL
  summary: R port of Angus Johnson's open source library Clipper. Performs polygon clipping operations
    (intersection, union, set minus, set difference) for polygonal regions of arbitrary
    complexity, including holes. Computes offset polygons (spatial buffer zones, morphological
    dilations, Minkowski dilations) for polygonal regions and polygonal lines. Computes
    Minkowski Sum of general polygons. There is a function for removing self-intersections
    from polygon data.
  license_family: OTHER
  license_file: LICENSE_1_0.txt

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

# Package: polyclip
# Version: 1.10-0
# Date: 2019-03-13
# Title: Polygon Clipping
# Authors@R: c(person("Angus", "Johnson", role = "aut",  comment="C++ original, http://www.angusj.com/delphi/clipper.php"), person("Adrian", "Baddeley", role = c("aut", "trl", "cre"), email = "Adrian.Baddeley@curtin.edu.au"), person("Kurt", "Hornik", role = "ctb"), person(c("Brian", "D."), "Ripley", role = "ctb"), person("Elliott", "Sales de Andrade", role="ctb"), person("Paul", "Murrell", role = "ctb"))
# Maintainer: Adrian Baddeley <Adrian.Baddeley@curtin.edu.au>
# Depends: R (>= 3.0.0)
# Description: R port of Angus Johnson's open source library Clipper. Performs polygon clipping operations (intersection, union, set minus, set difference) for polygonal regions of arbitrary complexity, including holes. Computes offset polygons (spatial buffer zones, morphological dilations, Minkowski dilations) for polygonal regions and polygonal lines. Computes Minkowski Sum of general polygons. There is a function for removing self-intersections from polygon data.
# License: BSL
# URL: http://www.angusj.com/delphi/clipper.php, https://sourceforge.net/projects/polyclipping, https://github.com/baddstats/polyclip
# BugReports: https://github.com/baddstats/polyclip/issues
# LazyData: true
# LazyLoad: true
# ByteCompile: true
# Note: built from Clipper C++ version 6.4.0
# NeedsCompilation: yes
# Packaged: 2019-03-14 02:16:16 UTC; adrian
# Author: Angus Johnson [aut] (C++ original, http://www.angusj.com/delphi/clipper.php), Adrian Baddeley [aut, trl, cre], Kurt Hornik [ctb], Brian D. Ripley [ctb], Elliott Sales de Andrade [ctb], Paul Murrell [ctb]
# Repository: CRAN
# Date/Publication: 2019-03-14 06:20:03 UTC
