{% set version = '0.9.1' %}

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

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

source:
  fn: precrec_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/precrec_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/precrec/precrec_{{ version }}.tar.gz

  sha256: 6924fa66949d35b404239d0487ce236e6334e9b7416b5e28fd1045893aa1f74e

build:
  merge_build_host: True  # [win]
  number: 2
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
    - r-rcpp
    - r-assertthat >=0.1
    - r-data.table >=1.10.4
    - r-ggplot2 >=2.1.0
    - r-gridextra >=2.0.0

  run:
    - r-base
    - r-rcpp
    - r-assertthat >=0.1
    - r-data.table >=1.10.4
    - r-ggplot2 >=2.1.0
    - r-gridextra >=2.0.0

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

about:
  home: https://cran.r-project.org/web/packages/precrec/index.html
  license: GPL-3
  summary: Accurate calculations and visualization of precision-recall and ROC (Receiver Operator
    Characteristics) curves.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]
extra:
   recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
