{% set version = '1.14' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/formatR_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/formatR/formatR_{{ version }}.tar.gz
  sha256: 4ebaab2c3f8527871655246b62abd060bc75dae1cec7f962ca4752b8080f474c

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip
  noarch: generic

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: rstudioapi, shiny, testit, rmarkdown, knitr
requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base

  run:
    - r-base

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('formatR')"           # [not win]
    - "\"%R%\" -e \"library('formatR')\""  # [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/yihui/formatR
  license: GPL-3
  summary: Provides a function tidy_source() to format R source code. Spaces and indent will
    be added to the code automatically, and comments will be preserved under certain
    conditions, so that R code will be more human-readable and tidy. There is also a
    Shiny app as a user interface in this package (see tidy_app()).
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: formatR
# Type: Package
# Title: Format R Code Automatically
# Version: 1.14
# Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Ed", "Lee", role = "ctb"), person("Eugene", "Ha", role = "ctb"), person("Kohske", "Takahashi", role = "ctb"), person("Pavel", "Krivitsky", role = "ctb"), person() )
# Description: Provides a function tidy_source() to format R source code. Spaces and indent will be added to the code automatically, and comments will be preserved under certain conditions, so that R code will be more human-readable and tidy. There is also a Shiny app as a user interface in this package (see tidy_app()).
# Depends: R (>= 3.2.3)
# Suggests: rstudioapi, shiny, testit, rmarkdown, knitr
# License: GPL
# URL: https://github.com/yihui/formatR
# BugReports: https://github.com/yihui/formatR/issues
# VignetteBuilder: knitr
# RoxygenNote: 7.2.3
# Encoding: UTF-8
# NeedsCompilation: no
# Packaged: 2023-01-17 21:46:29 UTC; yihui
# Author: Yihui Xie [aut, cre] (<https://orcid.org/0000-0003-0645-5666>), Ed Lee [ctb], Eugene Ha [ctb], Kohske Takahashi [ctb], Pavel Krivitsky [ctb]
# Maintainer: Yihui Xie <xie@yihui.name>
# Repository: CRAN
# Date/Publication: 2023-01-17 22:30:02 UTC

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