{% set version = '0.5.1' %}

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

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

source:
  fn: SnowballC_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/SnowballC_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/SnowballC/SnowballC_{{ version }}.tar.gz


  sha256: 44170624fd906ecc67959fed5dbf80068b59b1b2a6fbab65da5054e3e1186f4d

build:
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/
  skip: True  # [win32]


requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base

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



about:
  home: https://r-forge.r-project.org/projects/r-temis/
  license: BSD_2_clause
  summary: An R interface to the C libstemmer library that implements Porter's word stemming
    algorithm for collapsing words to a common root to aid comparison of vocabulary.
    Currently supported languages are Danish, Dutch, English, Finnish, French, German,
    Hungarian, Italian, Norwegian, Portuguese, Romanian, Russian, Spanish, Swedish and
    Turkish.
  license_family: BSD
  license_file: LICENSE



extra:
  recipe-maintainers:
    - croth1
