{% set version = '1.5.2' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/foreach_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/foreach/foreach_{{ version }}.tar.gz
  sha256: 56338d8753f9f68f262cf532fd8a6d0fe25a71a2ff0107f3ce378feb926bafe4

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

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

# Suggests: randomForest, doMC, doParallel, testthat, knitr, rmarkdown
requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-codetools
    - r-iterators

  run:
    - r-base
    - r-codetools
    - r-iterators

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('foreach')"           # [not win]
    - "\"%R%\" -e \"library('foreach')\""  # [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://github.com/RevolutionAnalytics/foreach
  license: Apache License (== 2.0)
  summary: Support for the foreach looping construct.  Foreach is an idiom that allows for iterating
    over elements in a collection, without the use of an explicit loop counter.  This
    package in particular is intended to be used for its return value, rather than for
    its side effects.  In that sense, it is similar to the standard lapply function,
    but doesn't require the evaluation of a function.  Using foreach without side effects
    also facilitates executing the loop in parallel.
  license_family: APACHE

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: foreach
# Type: Package
# Title: Provides Foreach Looping Construct
# Version: 1.5.2
# Authors@R: c(person("Folashade", "Daniel", role="cre", email="fdaniel@microsoft.com"), person("Hong", "Ooi", role="ctb"), person("Rich", "Calaway", role="ctb"), person("Microsoft", role=c("aut", "cph")), person("Steve", "Weston", role="aut"))
# Description: Support for the foreach looping construct.  Foreach is an idiom that allows for iterating over elements in a collection, without the use of an explicit loop counter.  This package in particular is intended to be used for its return value, rather than for its side effects.  In that sense, it is similar to the standard lapply function, but doesn't require the evaluation of a function.  Using foreach without side effects also facilitates executing the loop in parallel.
# License: Apache License (== 2.0)
# URL: https://github.com/RevolutionAnalytics/foreach
# BugReports: https://github.com/RevolutionAnalytics/foreach/issues
# Depends: R (>= 2.5.0)
# Imports: codetools, utils, iterators
# Suggests: randomForest, doMC, doParallel, testthat, knitr, rmarkdown
# VignetteBuilder: knitr
# RoxygenNote: 7.1.1
# Collate: 'callCombine.R' 'foreach.R' 'do.R' 'foreach-ext.R' 'foreach-pkg.R' 'getDoPar.R' 'getDoSeq.R' 'getsyms.R' 'iter.R' 'nextElem.R' 'onLoad.R' 'setDoPar.R' 'setDoSeq.R' 'times.R' 'utils.R'
# NeedsCompilation: no
# Packaged: 2022-01-11 04:21:12 UTC; fdaniel
# Author: Folashade Daniel [cre], Hong Ooi [ctb], Rich Calaway [ctb], Microsoft [aut, cph], Steve Weston [aut]
# Maintainer: Folashade Daniel <fdaniel@microsoft.com>
# Repository: CRAN
# Date/Publication: 2022-02-02 09:20:02 UTC

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