{% set version = '1.3.1' %}

{% 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: 23eed681f0b9eacebbc3c6a5ba14ee0b676a4bf6e69af194c5a36edfe11464ac

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: knitr, rmarkdown, testthat (>= 2.1.0)
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not 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:
    # You can put additional test commands to be run here.
    - $R -e "library('later')"           # [not win]
    - "\"%R%\" -e \"library('later')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://r-lib.github.io/later/, 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. The functions are scheduled in an event loop.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: later
# Type: Package
# Title: Utilities for Scheduling Functions to Execute Later with Event Loops
# Version: 1.3.1
# Authors@R: c( person("Winston", "Chang", role = c("aut", "cre"), email = "winston@rstudio.com"), person("Joe", "Cheng", role = c("aut"), 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. The functions are scheduled in an event loop.
# URL: https://r-lib.github.io/later/, https://github.com/r-lib/later
# BugReports: https://github.com/r-lib/later/issues
# License: MIT + file LICENSE
# Imports: Rcpp (>= 0.12.9), rlang
# LinkingTo: Rcpp
# RoxygenNote: 7.2.3
# Suggests: knitr, rmarkdown, testthat (>= 2.1.0)
# VignetteBuilder: knitr
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2023-05-01 21:09:55 UTC; winston
# Author: Winston Chang [aut, cre], Joe Cheng [aut], RStudio [cph], Marcus Geelnard [ctb, cph] (TinyCThread library, https://tinycthread.github.io/), Evan Nemerson [ctb, cph] (TinyCThread library, https://tinycthread.github.io/)
# Maintainer: Winston Chang <winston@rstudio.com>
# Repository: CRAN
# Date/Publication: 2023-05-02 18:10:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
