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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/quanteda.textstats_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/quanteda.textstats/quanteda.textstats_{{ version }}.tar.gz
  sha256: 338bdf7738b0568abc3e86891e0772bc12b4161bfef2451990b00e2a6c110180

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-matrix
    - r-rcpp >=0.12.12
    - r-rcpparmadillo >=0.7.600.1.0
    - r-rcppparallel
    - r-nsyllable
    - r-proxyc >=0.1.4
    - r-quanteda
    - r-stringi
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rcpp >=0.12.12
    - r-rcpparmadillo >=0.7.600.1.0
    - r-rcppparallel
    - r-nsyllable
    - r-proxyc >=0.1.4
    - r-quanteda
    - r-stringi

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

about:
  home: https://quanteda.io
  license: GPL-3.0-only
  summary: Textual statistics functions formerly in the 'quanteda' package. Textual statistics for characterizing and comparing textual data. Includes functions for measuring term and document frequency, the co-occurrence of words, similarity and distance between features and documents, feature entropy, keyword occurrence,
    readability, and lexical diversity.  These functions extend the 'quanteda' package and are specially designed for sparse textual data.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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