{% set version = '3.8.2' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/processx_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/processx/processx_{{ version }}.tar.gz
  sha256: e91b87af5b23c14b71003ec880f749dca81fd74f0601ab59ea1847c7fe857ecd

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: callr (>= 3.7.3), cli (>= 3.3.0), codetools, covr, curl, debugme, parallel, rlang (>= 1.0.2), testthat (>= 3.0.0), webfakes, withr
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-r6
    - r-ps >=1.2.0

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-r6
    - r-ps >=1.2.0

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('processx')"           # [not win]
    - "\"%R%\" -e \"library('processx')\""  # [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://processx.r-lib.org, https://github.com/r-lib/processx#readme
  license: MIT
  summary: Tools to run system processes in the background.  It can check if a background process
    is running; wait on a background process to finish; get the exit status of finished
    processes; kill background processes. It can read the standard output and error
    of the processes, using non-blocking connections. 'processx' can poll a process
    for standard output or error, with a timeout. It can also poll several processes
    at once.
  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: processx
# Title: Execute and Control System Processes
# Version: 3.8.2
# Authors@R: c( person("Gabor", "Csardi", , "csardi.gabor@gmail.com", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0001-7098-9676")), person("Winston", "Chang", role = "aut"), person("RStudio", role = c("cph", "fnd")), person("Mango Solutions", role = c("cph", "fnd")) )
# Description: Tools to run system processes in the background.  It can check if a background process is running; wait on a background process to finish; get the exit status of finished processes; kill background processes. It can read the standard output and error of the processes, using non-blocking connections. 'processx' can poll a process for standard output or error, with a timeout. It can also poll several processes at once.
# License: MIT + file LICENSE
# URL: https://processx.r-lib.org, https://github.com/r-lib/processx#readme
# BugReports: https://github.com/r-lib/processx/issues
# Depends: R (>= 3.4.0)
# Imports: ps (>= 1.2.0), R6, utils
# Suggests: callr (>= 3.7.3), cli (>= 3.3.0), codetools, covr, curl, debugme, parallel, rlang (>= 1.0.2), testthat (>= 3.0.0), webfakes, withr
# Encoding: UTF-8
# RoxygenNote: 7.2.0
# Config/testthat/edition: 3
# Config/Needs/website: tidyverse/tidytemplate
# NeedsCompilation: yes
# Packaged: 2023-06-30 10:01:10 UTC; gaborcsardi
# Author: Gabor Csardi [aut, cre, cph] (<https://orcid.org/0000-0001-7098-9676>), Winston Chang [aut], RStudio [cph, fnd], Mango Solutions [cph, fnd]
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Repository: CRAN
# Date/Publication: 2023-06-30 20:40:02 UTC

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