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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/sys_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sys/sys_{{ version }}.tar.gz
  sha256: 30c3b2e52b52730ddf68ef79f5e694af3970a348817ef1998194b6251211b482

build:
  merge_build_host: True  # [win]
  number: 1000
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [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
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://github.com/jeroen/sys#readme
  license: MIT
  summary: Drop-in replacements for the base system2() function with fine control and consistent
    behavior across platforms. Supports clean interruption, timeout,  background tasks,
    and streaming STDIN / STDOUT / STDERR over binary or text  connections. Arguments
    on Windows automatically get encoded and quoted to work on different  locales. On
    Unix platforms the package also provides functions for evaluating  expressions inside
    a temporary fork. Such evaluations have no side effects on the main R process, and
    support reliable interrupts and timeouts. This provides the basis for a sandboxing
    mechanism.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast

# Package: sys
# Type: Package
# Title: Powerful and Reliable Tools for Running System Commands in R
# Version: 2.1
# Authors@R: c(person("Jeroen", "Ooms", role = c("aut", "cre"),  email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289")), person("Gabor", "Csardi", , "csardi.gabor@gmail.com", role = "ctb"))
# Description: Drop-in replacements for the base system2() function with fine control and consistent behavior across platforms. Supports clean interruption, timeout,  background tasks, and streaming STDIN / STDOUT / STDERR over binary or text  connections. Arguments on Windows automatically get encoded and quoted to work on different  locales. On Unix platforms the package also provides functions for evaluating  expressions inside a temporary fork. Such evaluations have no side effects on the main R process, and support reliable interrupts and timeouts. This provides the basis for a sandboxing mechanism.
# License: MIT + file LICENSE
# URL: https://github.com/jeroen/sys#readme
# BugReports: https://github.com/jeroen/sys/issues
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.1.0
# SystemRequirements: libapparmor-dev (optional, debian/ubuntu only)
# Suggests: spelling, unix (>= 1.3), testthat
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2018-11-12 23:02:23 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Gabor Csardi [ctb]
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2018-11-13 08:50:03 UTC
