{% set version = "0.7-1" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/showtext_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/showtext/showtext_{{ version }}.tar.gz
  sha256: 85d7e877143a296f941583a980a29b08301e24752a487841e58765b7c479af28

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [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]
    - {{posix}}gzip              # [win]
    - {{posix}}tar               # [win]
  host:
    - r-base
    - r-showtextdb >=2.0
    - r-sysfonts >=0.7.1
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-showtextdb >=2.0
    - r-sysfonts >=0.7.1

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

about:
  home: https://github.com/yixuan/showtext
  license: Apache (>= 2.0)
  license_file: LICENSE
  summary: Making it easy to use various types of fonts ('TrueType', 'OpenType', Type 1, web
    fonts, etc.) in R graphs, and supporting most output formats of R graphics including
    PNG, PDF and SVG. Text glyphs will be converted into polygons or raster images,
    hence after the plot has been created, it no longer relies on the font files. No
    external software such as 'Ghostscript' is needed to use this package.
  license_family: APACHE

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

# Package: showtext
# Type: Package
# Title: Using Fonts More Easily in R Graphs
# Version: 0.7
# Date: 2019-06-10
# Author: Yixuan Qiu and authors/contributors of the included software. See file AUTHORS for details.
# Maintainer: Yixuan Qiu <yixuan.qiu@cos.name>
# Description: Making it easy to use various types of fonts ('TrueType', 'OpenType', Type 1, web fonts, etc.) in R graphs, and supporting most output formats of R graphics including PNG, PDF and SVG. Text glyphs will be converted into polygons or raster images, hence after the plot has been created, it no longer relies on the font files. No external software such as 'Ghostscript' is needed to use this package.
# Depends: sysfonts (>= 0.7.1), showtextdb (>= 2.0)
# Imports: grDevices
# Suggests: knitr, rmarkdown, prettydoc, curl, jsonlite
# SystemRequirements: zlib, libpng, FreeType
# URL: https://github.com/yixuan/showtext
# BugReports: https://github.com/yixuan/showtext/issues
# License: Apache License (>= 2.0)
# Copyright: see file COPYRIGHTS
# VignetteBuilder: knitr, rmarkdown
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-06-10 20:54:36 UTC; qyx
# Repository: CRAN
# Date/Publication: 2019-06-11 04:40:03 UTC
