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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/ModelMetrics_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ModelMetrics/ModelMetrics_{{ version }}.tar.gz
  sha256: 5e06f1926aebca5654e1329c66ef19b04058376b2277ebb16e3bf8c208d73457

build:
  merge_build_host: true  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - llvm-openmp                # [osx]
  host:
    - r-base
    - r-rcpp
    - r-data.table
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-data.table
    - llvm-openmp                # [osx]

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

about:
  home: https://CRAN.R-project.org/package=ModelMetrics
  license: GPL (>= 2)
  summary: Collection of metrics for evaluating models written in C++ using 'Rcpp'. Popular metrics include area under the curve, log loss, root mean square error,
    etc.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: ModelMetrics
# Title: Rapid Calculation of Model Metrics
# Version: 1.2.2
# Date: 2018-11-03
# Authors@R: person("Tyler", "Hunt", email = "thunt@snapfinance.com", role = c("aut", "cre"))
# Description: Collection of metrics for evaluating models written in C++ using 'Rcpp'. Popular metrics include area under the curve, log loss, root mean square error, etc.
# Depends: R (>= 3.2.2)
# License: GPL (>= 2)
# Encoding: UTF-8
# LazyData: true
# LinkingTo: Rcpp
# Imports: Rcpp, data.table
# RoxygenNote: 6.0.1
# Suggests: testthat
# NeedsCompilation: yes
# Packaged: 2018-11-03 16:37:41 UTC; tylerhunt
# Author: Tyler Hunt [aut, cre]
# Maintainer: Tyler Hunt <thunt@snapfinance.com>
# Repository: CRAN
# Date/Publication: 2018-11-03 17:00:14 UTC
