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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/bench_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/bench/bench_{{ version }}.tar.gz
  sha256: e95d4f90a17ac4f23f720a90e6778e5b096b8b5991ca54b92731f34cba0c63ed

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/


requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-glue
    - r-pillar
    - r-profmem
    - r-rlang
    - r-tibble
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-glue
    - r-pillar
    - r-profmem
    - r-rlang
    - r-tibble

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

about:
  home: https://github.com/r-lib/bench
  license: GPL-3
  summary: Tools to accurately benchmark and analyze execution times for R expressions.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - philip-khor

# Package: bench
# Title: High Precision Timing of R Expressions
# Version: 1.0.1
# Authors@R: c( person("Jim", "Hester", email = "james.f.hester@gmail.com", role = c("aut", "cre")) )
# Description: Tools to accurately benchmark and analyze execution times for R expressions.
# License: GPL-3
# URL: https://github.com/r-lib/bench
# BugReports: https://github.com/r-lib/bench/issues
# Depends: R (>= 3.1)
# Imports: glue, methods, pillar, profmem, rlang, stats, tibble, utils
# Suggests: covr, dplyr, forcats, ggbeeswarm, ggplot2, ggridges, mockery, scales, testthat, tidyr (>= 0.8.1), withr
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.0.1.9000
# NeedsCompilation: yes
# Packaged: 2018-06-05 20:46:23 UTC; jhester
# Author: Jim Hester [aut, cre]
# Maintainer: Jim Hester <james.f.hester@gmail.com>
# Repository: CRAN
# Date/Publication: 2018-06-06 05:03:17 UTC
