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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/stringdist_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/stringdist/stringdist_{{ version }}.tar.gz
  sha256: 6fd42e0b7ff25843ca7f45acf9a183facfe14a6cde2dc7a97ef7126ab0f06ce8

build:
  merge_build_host: true  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - llvm-openmp                # [osx]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - llvm-openmp                # [osx]

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

about:
  home: https://github.com/markvanderloo/stringdist
  license: GPL-3.0-only
  summary: Implements an approximate string matching version of R's native 'match' function. Can calculate various string distances based on edits (Damerau-Levenshtein, Hamming, Levenshtein, optimal sting alignment), qgrams (q- gram, cosine, jaccard distance) or heuristic metrics (Jaro, Jaro-Winkler). An implementation of
    soundex is provided as well. Distances can be computed between character vectors while taking proper care of encoding or between integer vectors representing generic sequences. This package is built for speed and runs in parallel by using 'openMP'. An API for C or C++ is exposed as well.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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

# Package: stringdist
# Maintainer: Mark van der Loo <mark.vanderloo@gmail.com>
# License: GPL-3
# Title: Approximate String Matching and String Distance Functions
# LazyData: no
# Type: Package
# LazyLoad: yes
# Authors@R: c( person("Mark", "van der Loo", role=c("aut","cre"),email="mark.vanderloo@gmail.com") , person("Jan", "van der Laan", role="ctb") , person("R Core Team",""     , role="ctb") , person("Nick","Logan"       , role="ctb") , person("Chris","Muir"       , role="ctb"))
# Description: Implements an approximate string matching version of R's native 'match' function. Can calculate various string distances based on edits (Damerau-Levenshtein, Hamming, Levenshtein, optimal sting alignment), qgrams (q- gram, cosine, jaccard distance) or heuristic metrics (Jaro, Jaro-Winkler). An implementation of soundex is provided as well. Distances can be computed between character vectors while taking proper care of encoding or between integer vectors representing generic sequences. This package is built for speed and runs in parallel by using 'openMP'. An API for C or C++ is exposed as well.
# Version: 0.9.5.2
# Depends: R (>= 2.15.3)
# URL: https://github.com/markvanderloo/stringdist
# BugReports: https://github.com/markvanderloo/stringdist/issues
# Suggests: tinytest
# Imports: parallel
# Encoding: UTF-8
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-06-05 22:50:08 UTC; mark
# Author: Mark van der Loo [aut, cre], Jan van der Laan [ctb], R Core Team [ctb], Nick Logan [ctb], Chris Muir [ctb]
# Repository: CRAN
# Date/Publication: 2019-06-06 08:00:03 UTC
