{% set version = '1.6.4' %}

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

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

source:
  fn: diagram_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/diagram_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/diagram/diagram_{{ version }}.tar.gz
  sha256: 7c2bc5d5d634c3b8ca7fea79fb463e412962d88f47a77a74c811cc62f375ce38

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-shape

  run:
    - r-base
    - r-shape

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

about:
  home: https://CRAN.R-project.org/package=diagram
  license: GPL (>= 2)
  summary: Visualises simple graphs (networks) based on a transition matrix, utilities to plot
    flow diagrams,  visualising webs, electrical networks, etc. Support for the book
    "A practical guide to ecological modelling - using R as a simulation platform" by
    Karline Soetaert and Peter M.J. Herman (2009), Springer. and the book "Solving Differential
    Equations in R" by Karline Soetaert, Jeff Cash and Francesca Mazzia (2012), Springer.
    Includes demo(flowchart), demo(plotmat), demo(plotweb).
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
