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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RTriangle_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RTriangle/RTriangle_{{ version }}.tar.gz
  sha256: 0da6cbc9d2b06efdaade3307ca05c5546bd2b869ea71fcb21271945d5f49ca1f

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://github.com/davidcsterratt/RTriangle, http://www.cs.cmu.edu/~quake/triangle.html
  license: CC-BY-NC-SA-4.0
  summary: 'This is a port of Jonathan Shewchuk''s Triangle library to R. From his description:
    "Triangle generates exact Delaunay triangulations, constrained Delaunay triangulations,
    conforming Delaunay triangulations, Voronoi diagrams, and high-quality triangular
    meshes. The latter can be generated with no small or large angles, and are thus
    suitable for finite element analysis."'
  license_family: CC

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

# Copyright: 1993, 1995, 1997, 1998, 2002, 2005 Jonathan Richard Shewchuk; 2011-2018 David Sterratt
# Package: RTriangle
# Authors@R: c(person("Jonathan Richard", "Shewchuk" , role=c("ctb", "cph")), person("David C.", "Sterratt", role=c("cph","aut","cre"), email="david.c.sterratt@ed.ac.uk"), person("Elias", "Pipping", role=c("ctb")))
# License: CC BY-NC-SA 4.0
# Title: Triangle - A 2D Quality Mesh Generator and Delaunay Triangulator
# Description: This is a port of Jonathan Shewchuk's Triangle library to R. From his description: "Triangle generates exact Delaunay triangulations, constrained Delaunay triangulations, conforming Delaunay triangulations, Voronoi diagrams, and high-quality triangular meshes. The latter can be generated with no small or large angles, and are thus suitable for finite element analysis."
# Version: 1.6-0.10
# URL: https://github.com/davidcsterratt/RTriangle, http://www.cs.cmu.edu/~quake/triangle.html
# Date: 2018-01-30
# Depends: R (>= 3.0.0)
# RoxygenNote: 6.0.1
# Suggests: testthat, geometry
# BugReports: https://github.com/davidcsterratt/RTriangle/issues
# NeedsCompilation: yes
# Packaged: 2018-01-30 14:26:24 UTC; sterratt
# Author: Jonathan Richard Shewchuk [ctb, cph], David C. Sterratt [cph, aut, cre], Elias Pipping [ctb]
# Maintainer: David C. Sterratt <david.c.sterratt@ed.ac.uk>
# Repository: CRAN
# Date/Publication: 2018-01-31 10:44:02 UTC
