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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/textmineR_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/textmineR/textmineR_{{ version }}.tar.gz
  sha256: 78f4b556845149c6093cef4767661bf7982e80e65cde9320dbbae798ad4bf462

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-rspectra
    - r-rcpp
    - r-rcpparmadillo
    - r-rcppprogress
    - r-gtools
    - r-magrittr
    - r-stopwords
    - r-stringr
    - r-text2vec >=0.5
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rspectra
    - r-rcpp
    - r-rcpparmadillo
    - r-rcppprogress
    - r-gtools
    - r-magrittr
    - r-stopwords
    - r-stringr
    - r-text2vec >=0.5

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

about:
  home: https://www.rtextminer.com/
  license: MIT
  summary: An aid for text mining in R, with a syntax that should be familiar to experienced
    R users. Provides a wrapper for several topic models that take similarly-formatted
    input and give similarly-formatted output. Has additional functionality for analyzing
    and diagnostics for topic models.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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