{% set version = '1.3-3' %}

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

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

source:
  fn: pbapply_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/pbapply_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/pbapply/pbapply_{{ version }}.tar.gz
  sha256: 7379b21d1176db5769f5cac858dd12c975736e80a600870180cec9625cf51047

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/psolymos/pbapply
  license: GPL-2
  summary: A lightweight package that adds progress bar to vectorized R functions ('*apply').
    The implementation can easily be added to functions where showing the progress is
    useful (e.g. bootstrap). The type and style of the progress bar (with percentages
    or remaining time) can be set through options. Supports several parallel processing
    backends.
  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
