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

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

source:
  fn: text2vec_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/text2vec_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/text2vec/text2vec_{{ version }}.tar.gz
  sha256: ecf97ef61578f69d5cb6691385a01ed10080aa2914b54d4671abbffb2a28976d

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-matrix >=1.1
    - r-r6 >=2.1.2
    - r-rcpp >=0.11
    - r-rcppparallel >=4.3.14
    - r-data.table >=1.9.6
    - r-digest >=0.6.8
    - r-foreach >=1.4.3
    - r-futile.logger >=1.4.3
    - r-irlba >=2.2.1
    - r-mlapi >=0.1.0
    - r-sparsepp >=0.2.0
    - r-stringi >=1.1.5
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-matrix >=1.1
    - r-r6 >=2.1.2
    - r-rcpp >=0.11
    - r-rcppparallel >=4.3.14
    - r-data.table >=1.9.6
    - r-digest >=0.6.8
    - r-foreach >=1.4.3
    - r-futile.logger >=1.4.3
    - r-irlba >=2.2.1
    - r-mlapi >=0.1.0
    - r-sparsepp >=0.2.0
    - r-stringi >=1.1.5

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

about:
  home: http://text2vec.org
  license: GPL (>= 2)
  summary: Fast and memory-friendly tools for text vectorization, topic modeling (LDA, LSA),
    word embeddings (GloVe), similarities. This package provides a source-agnostic streaming
    API, which allows researchers to perform analysis of collections of documents which
    are larger than available RAM. All core functions are parallelized to benefit from
    multicore machines.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - CurtLH
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
