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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/caTools_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/caTools/caTools_{{ version }}.tar.gz
  sha256: 0343698a41e8b516769af0433ac2e52a7df9be709b7f78c1825e88e1a37f3378

build:
  merge_build_host: True  # [win]
  skip: True  # [r_base == "3.5.1"]
  number: 0
  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]
  host:
    - r-base
    - r-bitops
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-bitops

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

about:
  home: https://CRAN.R-project.org/package=caTools
  license: GPL-3
  summary: 'Contains several basic utility functions including: moving (rolling, running) window
    statistic functions, read/write for GIF and ENVI binary files, fast calculation
    of AUC, LogitBoost classifier, base64 encoder/decoder, round-off-error-free sum
    and cumsum, etc.'
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: caTools
# Type: Package
# Title: Tools: moving window statistics, GIF, Base64, ROC AUC, etc.
# Version: 1.17.1.2
# Date: 2014-04-21
# Author: Jarek Tuszynski <jaroslaw.w.tuszynski@saic.com>
# Maintainer: ORPHANED
# Depends: R (>= 2.2.0)
# Imports: bitops
# Suggests: MASS, rpart
# Description: Contains several basic utility functions including: moving (rolling, running) window statistic functions, read/write for GIF and ENVI binary files, fast calculation of AUC, LogitBoost classifier, base64 encoder/decoder, round-off-error-free sum and cumsum, etc.
# License: GPL-3
# Packaged: 2019-03-06 20:36:42 UTC; hornik
# NeedsCompilation: yes
# Repository: CRAN
# Date/Publication: 2019-03-06 20:53:35 UTC
# X-CRAN-Original-Maintainer: Harutyun Khachatryan <kh_harut@yahoo.com>
# X-CRAN-Comment: Orphaned and corrected on 2018-07-20 as check problems were not corrected despite reminders.
