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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/topicmodels_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/topicmodels/topicmodels_{{ version }}.tar.gz
  sha256: 9c26b4d967be6ec26834a39f04aa92b059ea9503eb70c700e1c0a7a43637b74a

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]
  host:
    - r-base
    - r-modeltools
    - r-slam
    - r-tm >=0.6
    - gsl                        # [not win]
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-modeltools
    - r-slam
    - r-tm >=0.6
    - gsl                        # [not win]

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

about:
  home: https://CRAN.R-project.org/package=topicmodels
  license: GPL-2
  summary: Provides an interface to the C code for Latent Dirichlet Allocation (LDA) models and Correlated Topics Models (CTM) by David M. Blei and co-authors and
    the C++ code for fitting LDA models using Gibbs sampling by Xuan-Hieu Phan and co-authors.
  license_family: GPL2
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: topicmodels
# Type: Package
# Title: Topic Models
# Version: 0.2-8
# Authors@R: c(person("Bettina", "Grun", role = c("aut", "cre"), email = "Bettina.Gruen@jku.at", comment = c(ORCID = "0000-0001-7265-4773")), person("Kurt", "Hornik", role = "aut", comment = c(ORCID = "0000-0003-4198-9911")))
# Description: Provides an interface to the C code for Latent Dirichlet Allocation (LDA) models and Correlated Topics Models (CTM) by David M. Blei and co-authors and the C++ code for fitting LDA models using Gibbs sampling by Xuan-Hieu Phan and co-authors.
# Depends: R (>= 2.15.0)
# Imports: stats4, methods, modeltools, slam, tm (>= 0.6)
# Suggests: lasso2, lattice, lda, OAIHarvester, SnowballC, corpus.JSS.papers
# Additional_repositories: https://datacube.wu.ac.at
# SystemRequirements: GNU Scientific Library version >= 1.8, C++11
# License: GPL-2
# Encoding: UTF-8
# LazyLoad: yes
# NeedsCompilation: yes
# Packaged: 2018-12-21 09:57:50 UTC; hornik
# Author: Bettina Grun [aut, cre] (<https://orcid.org/0000-0001-7265-4773>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>)
# Maintainer: Bettina Grun <Bettina.Gruen@jku.at>
# Repository: CRAN
# Date/Publication: 2018-12-21 12:03:10 UTC
