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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/systemfonts_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/systemfonts/systemfonts_{{ version }}.tar.gz
  sha256: ef766c75b942f147d382664a00d6a4930f1bfe0cce9d88943f571682a85a84c0

build:
  merge_build_host: true  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-cpp11                    # [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
    - r-cpp11
    - freetype
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-cpp11

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

about:
  home: https://github.com/r-lib/systemfonts
  license: MIT
  summary: Provides system native access to the font catalogue. As font handling varies between systems it is difficult to correctly locate  installed fonts across different operating systems. The 'systemfonts'  package provides bindings to the native libraries on Windows, macOS and  Linux for finding font files that can
    then be used further by e.g. graphic devices. The main use is intended to be from compiled code but 'systemfonts' also provides access from R.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: systemfonts
# Type: Package
# Title: System Native Font Finding
# Version: 0.1.1
# Authors@R:  c(person(given = "Thomas Lin", family = "Pedersen", role = c("aut", "cre"), email = "thomas.pedersen@rstudio.com"), person(given = "Jeroen",  family = "Ooms",  role = "aut", email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289")), person(given = "Devon", family = "Govett", role = "aut", comment = "Author of font-manager"), person(given = "RStudio", role = "cph"))
# Maintainer: Thomas Lin Pedersen <thomas.pedersen@rstudio.com>
# Description: Provides system native access to the font catalogue. As font handling varies between systems it is difficult to correctly locate  installed fonts across different operating systems. The 'systemfonts'  package provides bindings to the native libraries on Windows, macOS and  Linux for finding font files that can then be used further by e.g. graphic devices. The main use is intended to be from compiled code but 'systemfonts' also provides access from R.
# License: MIT + file LICENSE
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.1.1
# Suggests: testthat (>= 2.1.0), covr, knitr, rmarkdown, tools
# VignetteBuilder: knitr
# URL: https://github.com/r-lib/systemfonts
# BugReports: https://github.com/r-lib/systemfonts/issues
# NeedsCompilation: yes
# Packaged: 2019-07-01 11:23:59 UTC; thomas
# Author: Thomas Lin Pedersen [aut, cre], Jeroen Ooms [aut] (<https://orcid.org/0000-0002-4035-0289>), Devon Govett [aut] (Author of font-manager), RStudio [cph]
# Repository: CRAN
# Date/Publication: 2019-07-01 12:50:02 UTC
