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

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

source:
  fn: ggraph_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ggraph_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ggraph/ggraph_{{ version }}.tar.gz
  sha256: 4c24739ecabfc65c290a11980491a20bdaac675392a98dc30ccde76ac4b8f53a

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed  # [win]
    - {{posix}}coreutils  # [win]
  host:
    - r-base
    - r-mass
    - r-rcpp >=0.12.2
    - r-digest
    - r-dplyr
    - r-ggforce
    - r-ggplot2 >=2.0.0
    - r-ggrepel
    - r-gtable
    - r-igraph >=1.0.0
    - r-plyr
    - r-scales
    - r-viridis
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-mass
    - r-rcpp >=0.12.2
    - r-digest
    - r-dplyr
    - r-ggforce
    - r-ggplot2 >=2.0.0
    - r-ggrepel
    - r-gtable
    - r-igraph >=1.0.0
    - r-plyr
    - r-scales
    - r-viridis

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

about:
  home: https://CRAN.R-project.org/package=ggraph
  license: GPL-3
  summary: The grammar of graphics as implemented in ggplot2 is a poor fit for graph and network
    visualizations due to its reliance on tabular data input. ggraph is an extension
    of the ggplot2 API tailored to graph visualizations and provides the same flexible
    approach to building up plots layer by layer.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
