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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/stringfish_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/stringfish/stringfish_{{ version }}.tar.gz
  sha256: 39e8b57211ba816f1453d438af797dda0ffc2ed8c087569e9b51e052d3d704e0

build:
  merge_build_host: True  # [win]
  number: 1
  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 }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp

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

about:
  home: https://github.com/traversc/stringfish
  license: GPL-3.0-only
  summary: Provides an extendable and performant 'alt-string' implementation backed by 'C++'
    vectors and strings.
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: stringfish
# Title: Alt String Implementation
# Version: 0.12.1
# Date: 2020-6-4
# Authors@R: c( person("Travers", "Ching", email = "traversc@gmail.com", role = c("aut", "cre", "cph")), person("Phillip", "Hazel", role = c("ctb"), comment = "Bundled PCRE2 code"), person("Zoltan", "Herczeg", role = c("ctb", "cph"), comment = "Bundled PCRE2 code"), person("University of Cambridge", role = c("cph"), comment = "Bundled PCRE2 code"), person("Tilera Corporation", role = c("cph"), comment = "Stack-less Just-In-Time compiler bundled with PCRE2"))
# Maintainer: Travers Ching <traversc@gmail.com>
# Description: Provides an extendable and performant 'alt-string' implementation backed by 'C++' vectors and strings.
# License: GPL-3
# Biarch: true
# Encoding: UTF-8
# Depends: R (>= 3.5.0)
# SystemRequirements: C++11
# LinkingTo: Rcpp (>= 0.12.18.3)
# Imports: Rcpp
# Suggests: qs, knitr, rmarkdown
# VignetteBuilder: knitr
# RoxygenNote: 7.1.0
# Copyright: Copyright for the bundled 'PCRE2' library is held by University of Cambridge, Zoltan Herczeg and Tilera Coporation (Stack-less Just-In-Time compiler).
# URL: https://github.com/traversc/stringfish
# BugReports: https://github.com/traversc/stringfish/issues
# NeedsCompilation: yes
# Packaged: 2020-06-04 19:36:21 UTC; tching
# Author: Travers Ching [aut, cre, cph], Phillip Hazel [ctb] (Bundled PCRE2 code), Zoltan Herczeg [ctb, cph] (Bundled PCRE2 code), University of Cambridge [cph] (Bundled PCRE2 code), Tilera Corporation [cph] (Stack-less Just-In-Time compiler bundled with PCRE2)
# Repository: CRAN
# Date/Publication: 2020-06-05 12:30:02 UTC
