{% set version = '2.15.1' %}

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

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

source:
  fn: R.devices_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/R.devices_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/R.devices/R.devices_{{ version }}.tar.gz
  sha256: 3d5d99e415779e923183383448f2c4f6e8c1078cb749723dc7cb077bd0faf525

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

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-r.methodss3 >=1.7.1
    - r-r.oo >=1.21.0
    - r-r.utils >=2.5.0
    - r-base64enc >=0.1_3

  run:
    - r-base
    - r-r.methodss3 >=1.7.1
    - r-r.oo >=1.21.0
    - r-r.utils >=2.5.0
    - r-base64enc >=0.1_3

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

about:
  home: https://github.com/HenrikBengtsson/R.devices
  license: LGPL (>= 2.1)
  summary: Functions for creating plots and image files in a unified way regardless of output
    format (EPS, PDF, PNG, SVG, TIFF, WMF, etc.). Default device options as well as
    scales and aspect ratios are controlled in a uniform way across all device types.
    Switching output format requires minimal changes in code. This package is ideal
    for large-scale batch processing, because it will never leave open graphics devices
    or incomplete image files behind, even on errors or user interrupts.
  license_family: LGPL

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