{% 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]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ 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:
    - $R -e "library('processx')"           # [(not win) and (not ppc64le)]
    - "\"%R%\" -e \"library('processx')\""  # [win]
    # Loading the library fails due to https://github.com/r-lib/ps/issues/82
    # just check for its existence.
    - test -f $PREFIX/lib/R/library/processx/libs/processx.so  # [ppc64le]

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:
    - conda-forge/r

# Package: processx
# Title: Execute and Control System Processes
# Version: 3.4.1
# Authors@R: c( person("Gabor", "Csardi", role = c("aut", "cre", "cph"), email = "csardi.gabor@gmail.com", 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
# LazyData: true
# URL: https://processx.r-lib.org, https://github.com/r-lib/processx#readme
# BugReports: https://github.com/r-lib/processx/issues
# RoxygenNote: 6.1.1
# Imports: ps (>= 1.2.0), R6, utils
# Suggests: callr (>= 3.2.0), codetools, covr, crayon, curl, debugme, parallel, testthat, withr
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-07-16 14:54:16 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: 2019-07-18 06:35:54 UTC
