{% set version = "4.3" %}
{% 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: 7406d485bb50a6190e3ed201e3489063fd249b8b3b1b4f049167ac405a352edb

build:
  merge_build_host: True  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

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
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://github.com/jeroen/curl#readme
  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:
    - conda-forge/r

# Package: curl
# Type: Package
# Title: A Modern and Flexible Web Client for R
# Version: 4.2
# 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.cran.dev/curl (docs) https://github.com/jeroen/curl#readme (devel) https://curl.haxx.se/libcurl/ (upstream)
# BugReports: https://github.com/jeroen/curl/issues
# Suggests: askpass, spelling, testthat (>= 1.0.0), knitr, jsonlite, rmarkdown, magrittr, httpuv (>= 1.4.4), webutils
# VignetteBuilder: knitr
# Depends: R (>= 3.0.0)
# LazyData: true
# RoxygenNote: 6.1.1
# Encoding: UTF-8
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2019-09-24 10:59:35 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: 2019-09-24 12:20:02 UTC
