{% set version = '0.3.4' %}
{% 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: 40132990250153cddaed41e72f7b2cf45f3ff95f062aa7991a5796f50bcc26cf

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-cpp11                    # [build_platform != target_platform]
    - r-systemfonts              # [build_platform != target_platform]
    - {{ 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
    - freetype
    - harfbuzz
    - fribidi
    - glib  # [osx]
    - libglib  # [osx]
    - r-cpp11 >=0.2.1
    - r-systemfonts >=1.0.0
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - freetype
    - harfbuzz
    - fribidi
    - r-cpp11 >=0.2.1
    - r-systemfonts >=1.0.0

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

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

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

# Package: textshaping
# Title: Bindings to the 'HarfBuzz' and 'Fribidi' Libraries for Text Shaping
# Version: 0.3.4
# Authors@R: c( person("Thomas Lin", "Pedersen", , "thomas.pedersen@rstudio.com", c("cre", "aut"), comment = c(ORCID = "0000-0002-5147-4711")), person("RStudio", role = "cph") )
# 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
# Encoding: UTF-8
# RoxygenNote: 7.1.1
# Depends: R (>= 3.2.0)
# Imports: systemfonts (>= 1.0.0)
# LinkingTo: cpp11 (>= 0.2.1), systemfonts (>= 1.0.0)
# SystemRequirements: C++11, freetype2, harfbuzz, fribidi
# URL: https://github.com/r-lib/textshaping
# BugReports: https://github.com/r-lib/textshaping/issues
# Suggests: covr, knitr, rmarkdown
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2021-05-11 11:52:40 UTC; thomas
# Author: Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>), RStudio [cph]
# Maintainer: Thomas Lin Pedersen <thomas.pedersen@rstudio.com>
# Repository: CRAN
# Date/Publication: 2021-05-11 12:10:02 UTC
