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

package:
  name: r-data.table
  version: {{ version|replace("-", "_") }}

source:
  fn: data.table_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/data.table_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/data.table/data.table_{{ version }}.tar.gz
  sha256: dc427465599cadd848b28a78e2fce3362867847b44148252054385999fe566d9

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

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

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

about:
  home: http://r-datatable.com
  license: MPL-2.0
  summary: Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete
    of columns by group using no copies at all, list columns, friendly and fast character-separated-value
    read/write. Offers a natural and flexible syntax, for faster development.
  license_family: OTHER

extra:
  recipe-maintainers:
    - nick-youngblut
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
    - dpryan79
