# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           R 1.0

R.setup             github r-lib ps 1.9.3 v
revision            0
categories-append   sysutils
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             MIT
description         R package to query, list and manipulate system processes
long_description    ps implements an API to query and manipulate system processes. \
                    Most of its code is based on the psutil Python package.
homepage            https://ps.r-lib.org
checksums           rmd160  3684b8b6e1b0e0b487786d97d7959f52a32f33a8 \
                    sha256  36cf7ebb7a55e965b757efe80177d5c14783835d70194e78b6ca8ebf39845564 \
                    size    178326
github.tarball_from archive

if {[string match *gcc* ${configure.compiler}]} {
    # gcc requires specific ObjC standard to compile this code:
    patchfiles-append \
                    0001-arch-macos-apps.m-fix-compilation-with-gcc.patch
}

configure.env-append \
                    RBIN=${r.cmd}

depends_test-append port:R-callr \
                    port:R-covr \
                    port:R-curl \
                    port:R-pillar \
                    port:R-pingr \
                    port:R-processx \
                    port:R-R6 \
                    port:R-rlang \
                    port:R-testthat \
                    port:R-webfakes \
                    port:R-withr

# FIXME: some tests fail on older macOS: https://github.com/r-lib/ps/issues/137
test.run            yes
