{% set version = '1.0.5' %}

{% 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: 840ffb1d8293739c79cbc868101d9f9a84f4a9de4c7b3625e30af2fb63e15823

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, testthat (>= 2.1.0), tools
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

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

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('systemfonts')"           # [not win]
    - "\"%R%\" -e \"library('systemfonts')\""  # [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/systemfonts, https://systemfonts.r-lib.org
  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:
    - katietz

# The original CRAN metadata for this package was:

# Type: Package
# Package: systemfonts
# Title: System Native Font Finding
# Version: 1.0.5
# Authors@R: c( person("Thomas Lin", "Pedersen", , "thomas.pedersen@posit.co", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5147-4711")), person("Jeroen", "Ooms", , "jeroen@berkeley.edu", role = "aut", comment = c(ORCID = "0000-0002-4035-0289")), person("Devon", "Govett", role = "aut", comment = "Author of font-manager"), person("Posit, PBC", role = c("cph", "fnd")) )
# 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
# URL: https://github.com/r-lib/systemfonts, https://systemfonts.r-lib.org
# BugReports: https://github.com/r-lib/systemfonts/issues
# Depends: R (>= 3.2.0)
# Suggests: covr, knitr, rmarkdown, testthat (>= 2.1.0), tools
# LinkingTo: cpp11 (>= 0.2.1)
# VignetteBuilder: knitr
# Encoding: UTF-8
# RoxygenNote: 7.1.2
# SystemRequirements: fontconfig, freetype2
# Config/Needs/website: tidyverse/tidytemplate
# NeedsCompilation: yes
# Packaged: 2023-10-09 08:28:00 UTC; thomas
# Author: Thomas Lin Pedersen [aut, cre] (<https://orcid.org/0000-0002-5147-4711>), Jeroen Ooms [aut] (<https://orcid.org/0000-0002-4035-0289>), Devon Govett [aut] (Author of font-manager), Posit, PBC [cph, fnd]
# Maintainer: Thomas Lin Pedersen <thomas.pedersen@posit.co>
# Repository: CRAN
# Date/Publication: 2023-10-09 14:00:09 UTC

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