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

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

source:
  fn: ggfittext_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ggfittext_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ggfittext/ggfittext_{{ version }}.tar.gz
  sha256: d469e338d612d198df0f1369a46872bbe2e3967ec8aab4f045201eee0ffff01b

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 >=2.2.1
    - r-stringi >=1.1.2
  run:
    - r-base
    - r-ggplot2 >=2.2.1
    - r-stringi >=1.1.2

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

about:
  home: https://github.com/wilkox/ggfittext
  license: GPL-2
  summary: Provides 'ggplot2' geoms to fit text into a box by growing, shrinking or wrapping
    the text.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

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