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

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

source:
  fn: gridGraphics_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/gridGraphics_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gridGraphics/gridGraphics_{{ version }}.tar.gz
  sha256: 1a3ffe5dcf8363db5eee69dfd5bee907d5a88754a0067a4f407dc082377524dd

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://github.com/pmur002/gridgraphics
  license: GPL (>= 2)
  summary: Functions to convert a page of plots drawn with the  'graphics' package into identical
    output drawn with the 'grid' package. The result looks like the original 'graphics'-based
    plot, but consists of 'grid' grobs and viewports that can then be manipulated with  'grid'
    functions (e.g., edit grobs and revisit viewports).
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - nick-youngblut
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
