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

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

source:
  fn: egg_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/egg_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/egg/egg_{{ version }}.tar.gz
  sha256: b6dab7fdab4154f3877f55807a138f63d5941bff1ceb9e3b32bd34b9b920f187

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-ggplot2
    - r-gridextra >=2.3
    - r-gtable
  run:
    - r-base
    - r-ggplot2
    - r-gridextra >=2.3
    - r-gtable

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

about:
  home: https://CRAN.R-project.org/package=egg
  license: GPL-3
  summary: Miscellaneous functions to help customise 'ggplot2' objects. High-level functions
    are provided to post-process 'ggplot2' layouts and allow alignment between plot
    panels, as well as setting panel sizes to fixed values. Other functions include
    a custom 'geom', and a helper function to enforce symmetric scales in facetted plots.
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
