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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/later_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/later/later_{{ version }}.tar.gz
  sha256: 75a5934cf55e287dd10d2a3081314cbd79001a51d7df601a133a4f2f56b0c401

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.12.9
    - r-rlang
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.12.9
    - r-rlang

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

about:
  home: https://github.com/r-lib/later
  license: MIT
  summary: Executes arbitrary R or C functions some time after the current time, after the R execution stack has emptied.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - halldc

# Package: later
# Type: Package
# Title: Utilities for Delaying Function Execution
# Version: 0.7.5
# Authors@R: c( person("Joe", "Cheng", role = c("aut", "cre"), email = "joe@rstudio.com"), person(family = "RStudio", role = "cph"), person("Marcus", "Geelnard", role = c("ctb", "cph"), comment = "TinyCThread library, https://tinycthread.github.io/"), person("Evan", "Nemerson", role = c("ctb", "cph"), comment = "TinyCThread library, https://tinycthread.github.io/") )
# Description: Executes arbitrary R or C functions some time after the current time, after the R execution stack has emptied.
# URL: https://github.com/r-lib/later
# BugReports: https://github.com/r-lib/later/issues
# License: GPL (>= 2)
# Imports: Rcpp (>= 0.12.9), rlang
# LinkingTo: Rcpp, BH
# RoxygenNote: 6.1.0
# Suggests: knitr, rmarkdown, testthat
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2018-09-14 22:59:16 UTC; jcheng
# Author: Joe Cheng [aut, cre], RStudio [cph], Marcus Geelnard [ctb, cph] (TinyCThread library, https://tinycthread.github.io/), Evan Nemerson [ctb, cph] (TinyCThread library, https://tinycthread.github.io/)
# Maintainer: Joe Cheng <joe@rstudio.com>
# Repository: CRAN
# Date/Publication: 2018-09-18 22:20:03 UTC
