{% set version = "0.2-6" %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/wordspace_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/wordspace/wordspace_{{ version }}.tar.gz
  sha256: 742afeb4cc0f9ac4b6b5a8f53a46d432bd9ee9b668e4df45e3748ad07e3dc587

build:
  merge_build_host: True  # [win]
  number: 2

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: knitr, rmarkdown, tm
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]
    - llvm-openmp                # [osx]

  host:
    - r-base
    - r-mass
    - r-matrix
    - r-rcpp >=0.11.0
    - r-cluster
    - r-iotools
    - r-sparsesvd

  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass
    - r-matrix
    - r-rcpp >=0.11.0
    - r-cluster
    - r-iotools
    - r-sparsesvd
    - llvm-openmp                # [osx]

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

about:
  home: http://wordspace.r-forge.r-project.org/
  license: GPL-3.0-only
  summary: An interactive laboratory for research on distributional semantic models ('DSM', see
    <https://en.wikipedia.org/wiki/Distributional_semantics> for more information).
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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