{% set version = '0.7.0' %}

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

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

source:
  fn: ggrepel_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ggrepel_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ggrepel/ggrepel_{{ version }}.tar.gz
  sha256: 28187a10eb37ef0432cbdfdb39829096c61b0d413db021c8113b87f34c75183c

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-rcpp
    - r-ggplot2 >=2.2.0
    - r-scales >=0.3.0
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-rcpp
    - r-ggplot2 >=2.2.0
    - r-scales >=0.3.0
    - libgcc  # [not win]

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

about:
  home: http://github.com/slowkow/ggrepel
  license: GPL-3
  summary: Provides text and label geoms for 'ggplot2' that help to avoid overlapping text labels.
    Labels repel away from each other and away from the data points.
  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
