{% set version = '5.1.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/curl_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/curl/curl_{{ version }}.tar.gz
  sha256: 57218da84b85bd01ce7daa4bca3e271eda1bf688e0cdb211c397ccb272ecba97

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: spelling, testthat (>= 1.0.0), knitr, jsonlite, rmarkdown, magrittr, httpuv (>= 1.4.4), webutils
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 }}zip               # [win]

  host:
    - r-base
    - libcurl

  run:
    - r-base
    - libcurl
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('curl')"           # [not win]
    - "\"%R%\" -e \"library('curl')\""  # [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://jeroen.r-universe.dev/curl https://curl.se/libcurl/
  license: MIT
  summary: The curl() and curl_download() functions provide highly configurable drop-in replacements
    for base url() and download.file() with better performance, support for encryption
    (https, ftps), gzip compression, authentication, and other 'libcurl' goodies. The
    core of the package implements a framework for performing fully customized requests
    where data can be processed either in memory, on disk, or streaming via the callback
    or connection interfaces. Some knowledge of 'libcurl' is recommended; for a more-user-friendly
    web client see the 'httr' package which builds on this package with http specific
    tools and logic.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# The original CRAN metadata for this package was:

# Package: curl
# Type: Package
# Title: A Modern and Flexible Web Client for R
# Version: 5.1.0
# Authors@R: c( person("Jeroen", "Ooms", role = c("aut", "cre"), email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289")), person("Hadley", "Wickham", , "hadley@rstudio.com", role = "ctb"), person("RStudio", role = "cph") )
# Description: The curl() and curl_download() functions provide highly configurable drop-in replacements for base url() and download.file() with better performance, support for encryption (https, ftps), gzip compression, authentication, and other 'libcurl' goodies. The core of the package implements a framework for performing fully customized requests where data can be processed either in memory, on disk, or streaming via the callback or connection interfaces. Some knowledge of 'libcurl' is recommended; for a more-user-friendly web client see the 'httr' package which builds on this package with http specific tools and logic.
# License: MIT + file LICENSE
# SystemRequirements: libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb).
# URL: https://jeroen.r-universe.dev/curl https://curl.se/libcurl/
# BugReports: https://github.com/jeroen/curl/issues
# Suggests: spelling, testthat (>= 1.0.0), knitr, jsonlite, rmarkdown, magrittr, httpuv (>= 1.4.4), webutils
# VignetteBuilder: knitr
# Depends: R (>= 3.0.0)
# RoxygenNote: 7.2.3
# Encoding: UTF-8
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2023-09-30 07:44:16 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Hadley Wickham [ctb], RStudio [cph]
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2023-10-02 15:20:07 UTC

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