{% set version = '0.3.7' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/textshaping_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/textshaping/textshaping_{{ version }}.tar.gz
  sha256: fa924dbe1fb4138b80d6c26ee42f4203843f1d34f77e2a5e42514e6fcc97ec42

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: covr, knitr, rmarkdown
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-cpp11 >=0.2.1
    - r-systemfonts >=1.0.0

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-cpp11 >=0.2.1
    - r-systemfonts >=1.0.0

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('textshaping')"           # [not win]
    - "\"%R%\" -e \"library('textshaping')\""  # [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://github.com/r-lib/textshaping
  license: MIT
  summary: Provides access to the text shaping functionality in the 'HarfBuzz' library and the
    bidirectional algorithm in the 'Fribidi' library.  'textshaping' is a low-level
    utility package mainly for graphic devices that expands upon the font tool-set provided
    by the 'systemfonts' package.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

# The original CRAN metadata for this package was:

# Package: textshaping
# Title: Bindings to the 'HarfBuzz' and 'Fribidi' Libraries for Text Shaping
# Version: 0.3.7
# Authors@R: c( person("Thomas Lin", "Pedersen", , "thomas.pedersen@posit.co", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-5147-4711")), person("Posit, PBC", role = c("cph", "fnd")) )
# Description: Provides access to the text shaping functionality in the 'HarfBuzz' library and the bidirectional algorithm in the 'Fribidi' library.  'textshaping' is a low-level utility package mainly for graphic devices that expands upon the font tool-set provided by the 'systemfonts' package.
# License: MIT + file LICENSE
# URL: https://github.com/r-lib/textshaping
# BugReports: https://github.com/r-lib/textshaping/issues
# Depends: R (>= 3.2.0)
# Imports: systemfonts (>= 1.0.0)
# Suggests: covr, knitr, rmarkdown
# LinkingTo: cpp11 (>= 0.2.1), systemfonts (>= 1.0.0)
# VignetteBuilder: knitr
# Encoding: UTF-8
# RoxygenNote: 7.2.3
# SystemRequirements: freetype2, harfbuzz, fribidi
# NeedsCompilation: yes
# Packaged: 2023-10-09 09:06:16 UTC; thomas
# Author: Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>), Posit, PBC [cph, fnd]
# Maintainer: Thomas Lin Pedersen <thomas.pedersen@posit.co>
# Repository: CRAN
# Date/Publication: 2023-10-09 14:00:06 UTC

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