{% set version = '1.3' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/ROCS_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ROCS/ROCS_{{ version }}.tar.gz
  sha256: 71e647d0909d38a36c8b590e19e736cce1f33694a9cfc38ef2e6aa000e726d87

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

requirements:
  build:
    - {{ posix }}zip               # [win]
    - {{ cdt('mesa-libgl-devel') }}  # [linux]
    - {{ cdt('mesa-dri-drivers') }}  # [linux]
    - {{ cdt('libselinux') }}  # [linux]
    - {{ cdt('libxdamage') }}  # [linux]
    - {{ cdt('libxxf86vm') }}  # [linux]
    - {{ cdt('libxext') }}     # [linux]

  host:
    - xorg-libxfixes  # [linux]
    - r-base
    - r-poibin
    - r-rgl

  run:
    - r-base
    - r-poibin
    - r-rgl

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

about:
  home: https://CRAN.R-project.org/package=ROCS
  summary: Plots the Receiver Operating Characteristics Surface for high-throughput class-skewed
    data, calculates the Volume under the Surface (VUS) and the FDR-Controlled Area
    Under the Curve (FCAUC), and conducts tests to compare two ROC surfaces. Computes
    eROC curve and the corresponding AUC for imperfect reference standard.
  license: GPL-2.0-only
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
  
extra:
  recipe-maintainers:
    - RECETOX/conda
    - conda-forge/r
