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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/sysfonts_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sysfonts/sysfonts_{{ version }}.tar.gz
  sha256: 837c03e6ed0743bf300ba9893543f94c85d0e5a8671ee65013ce677a0548cf72

build:
  merge_build_host: True  # [win]
  number: 2
  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 }}tar               # [win]
    - {{ posix }}gzip              # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://github.com/yixuan/sysfonts
  license: GPL-2
  summary: Loading system fonts and Google Fonts <https://fonts.google.com/> into R, in order
    to support other packages such as 'R2SWF' and 'showtext'.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: sysfonts
# Type: Package
# Title: Loading Fonts into R
# Version: 0.8
# Date: 2018-10-11
# Author: Yixuan Qiu and authors/contributors of the included fonts. See file AUTHORS for details.
# Maintainer: Yixuan Qiu <yixuan.qiu@cos.name>
# Description: Loading system fonts and Google Fonts <https://fonts.google.com/> into R, in order to support other packages such as 'R2SWF' and 'showtext'.
# Suggests: curl, jsonlite
# Copyright: see file COPYRIGHTS
# SystemRequirements: zlib, libpng, FreeType
# URL: https://github.com/yixuan/sysfonts
# BugReports: https://github.com/yixuan/sysfonts/issues
# License: GPL-2
# RoxygenNote: 6.1.0
# NeedsCompilation: yes
# Packaged: 2018-10-11 18:02:24 UTC; qyx
# Repository: CRAN
# Date/Publication: 2018-10-11 18:50:03 UTC
