{% set version = '1.7.12' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/stringi_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/stringi/stringi_{{ version }}.tar.gz
  sha256: efe8ac2900001f986a75db5641fbb24587a6d23de274a6a85c39dfa58921e009

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  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
    - icu

  run:
    - r-base
    - icu
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('stringi')"           # [not win]
    - "\"%R%\" -e \"library('stringi')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://stringi.gagolewski.com/, https://github.com/gagolews/stringi, https://icu.unicode.org/
  license: file LICENSE (FOSS)
  summary: A collection of character string/text/natural language processing tools for pattern
    searching (e.g., with 'Java'-like regular expressions or the 'Unicode' collation
    algorithm), random string generation, case mapping, string transliteration, concatenation,
    sorting, padding, wrapping, Unicode normalisation, date-time formatting and parsing,
    and many more. They are fast, consistent, convenient, and - thanks to 'ICU' (International
    Components for Unicode) - portable across all locales and platforms. Documentation
    about 'stringi' is provided via its website at <https://stringi.gagolewski.com/>
    and the paper by Gagolewski (2022, <doi:10.18637/jss.v103.i02>).
  license_family: OTHER
  license_file:
    - LICENSE

extra:
  recipe-maintainers:
    - ocefpaf
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: stringi
# Version: 1.7.12
# Date: 2023-01-09
# Title: Fast and Portable Character String Processing Facilities
# Description: A collection of character string/text/natural language processing tools for pattern searching (e.g., with 'Java'-like regular expressions or the 'Unicode' collation algorithm), random string generation, case mapping, string transliteration, concatenation, sorting, padding, wrapping, Unicode normalisation, date-time formatting and parsing, and many more. They are fast, consistent, convenient, and - thanks to 'ICU' (International Components for Unicode) - portable across all locales and platforms. Documentation about 'stringi' is provided via its website at <https://stringi.gagolewski.com/> and the paper by Gagolewski (2022, <doi:10.18637/jss.v103.i02>).
# URL: https://stringi.gagolewski.com/, https://github.com/gagolews/stringi, https://icu.unicode.org/
# BugReports: https://github.com/gagolews/stringi/issues
# SystemRequirements: C++11, ICU4C (>= 55, optional)
# Type: Package
# Depends: R (>= 3.1)
# Imports: tools, utils, stats
# Biarch: TRUE
# License: file LICENSE
# Author: Marek Gagolewski [aut, cre, cph] (<https://orcid.org/0000-0003-0637-6028>), Bartek Tartanus [ctb], and others (stringi source code); Unicode, Inc. and others (ICU4C source code, Unicode Character Database)
# Maintainer: Marek Gagolewski <marek@gagolewski.com>
# RoxygenNote: 7.2.1
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2023-01-09 07:28:38 UTC; gagolews
# License_is_FOSS: yes
# Repository: CRAN
# Date/Publication: 2023-01-11 10:10:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
