{% set version = "1.4-6" %}

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

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

source:
  fn: microbenchmark_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/microbenchmark_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/microbenchmark/microbenchmark_{{ version }}.tar.gz
  sha256: 7ac46a3b0df0677873db6c8ccfebcc3882e8c91caf0cf6168ea54ef55f77c1ea

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
    - r-ggplot2
  run:
    - r-base
    - r-ggplot2

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

about:
  home: https://CRAN.R-project.org/package=microbenchmark
  license: BSD_2_clause
  summary: Provides infrastructure to accurately measure and compare the execution time of R
    expressions.
  license_family: BSD

extra:
  recipe-maintainers:
    - conda-forge/r
    - johanneskoester
    - bgruening
