{% set version = '1.2.4' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/utf8_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/utf8/utf8_{{ version }}.tar.gz
  sha256: 418f824bbd9cd868d2d8a0d4345545c62151d321224cdffca8b1ffd98a167b7d

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/

# Suggests: cli, covr, knitr, rlang, rmarkdown, testthat (>= 3.0.0), withr
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base

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

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('utf8')"           # [not win]
    - "\"%R%\" -e \"library('utf8')\""  # [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://ptrckprry.com/r-utf8/, https://github.com/patperry/r-utf8
  license: Apache License (== 2.0) | file LICENSE
  summary: Process and print 'UTF-8' encoded international text (Unicode). Input, validate, normalize,
    encode, format, and display.
  license_family: APACHE
  license_file:
    - LICENSE

extra:
  recipe-maintainers:
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: utf8
# Title: Unicode Text Processing
# Version: 1.2.4
# Authors@R: c(person(given = c("Patrick", "O."), family = "Perry", role = c("aut", "cph")), person(given = "Kirill", family = "M\u00fcller", role = "cre", email = "kirill@cynkra.com"), person(given = "Unicode, Inc.", role = c("cph", "dtc"), comment = "Unicode Character Database"))
# Description: Process and print 'UTF-8' encoded international text (Unicode). Input, validate, normalize, encode, format, and display.
# License: Apache License (== 2.0) | file LICENSE
# URL: https://ptrckprry.com/r-utf8/, https://github.com/patperry/r-utf8
# BugReports: https://github.com/patperry/r-utf8/issues
# Depends: R (>= 2.10)
# Suggests: cli, covr, knitr, rlang, rmarkdown, testthat (>= 3.0.0), withr
# VignetteBuilder: knitr, rmarkdown
# Config/testthat/edition: 3
# Encoding: UTF-8
# RoxygenNote: 7.2.3
# NeedsCompilation: yes
# Packaged: 2023-10-22 13:43:19 UTC; kirill
# Author: Patrick O. Perry [aut, cph], Kirill Muller [cre], Unicode, Inc. [cph, dtc] (Unicode Character Database)
# Maintainer: Kirill Muller <kirill@cynkra.com>
# Repository: CRAN
# Date/Publication: 2023-10-22 21:50:02 UTC

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