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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/xfun_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/xfun/xfun_{{ version }}.tar.gz
  sha256: 07bbfaed212ba1fcb9367624e8bc4936a7884e30e0efc561199acd0fcba5750a

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

requirements:
  build:
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
    - {{ compiler('c') }}          # [not win]
    - {{ compiler('cxx') }}        # [not win]
    - {{ compiler('m2w64_c') }}    # [win]
    - {{ compiler('m2w64_cxx') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://github.com/yihui/xfun
  license: MIT
  summary: Miscellaneous functions commonly used in other packages maintained by 'Yihui Xie'.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - bsennblad
    - philip-khor

# Package: xfun
# Type: Package
# Title: Miscellaneous Functions by 'Yihui Xie'
# Version: 0.10
# Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre", "cph"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Daijiang", "Li", role = "ctb"), person("Xianying", "Tan", role = "ctb"), person("Salim", "Bruggemann", role = "ctb", email = "salim-b@pm.me"), person() )
# Description: Miscellaneous functions commonly used in other packages maintained by 'Yihui Xie'.
# Imports: stats, tools
# Suggests: testit, parallel, rstudioapi, tinytex, mime, markdown, knitr, htmltools, base64enc, remotes, rmarkdown
# License: MIT + file LICENSE
# URL: https://github.com/yihui/xfun
# BugReports: https://github.com/yihui/xfun/issues
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.1.1
# VignetteBuilder: knitr
# NeedsCompilation: no
# Packaged: 2019-10-01 15:28:13 UTC; yihui
# Author: Yihui Xie [aut, cre, cph] (<https://orcid.org/0000-0003-0645-5666>), Daijiang Li [ctb], Xianying Tan [ctb], Salim Bruggemann [ctb]
# Maintainer: Yihui Xie <xie@yihui.name>
# Repository: CRAN
# Date/Publication: 2019-10-01 18:20:02 UTC
