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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/httpuv_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/httpuv/httpuv_{{ version }}.tar.gz
  sha256: d5c64386a128bff503fe88ca7e4a68bfaec503f4a117d4bab114a7bf71bed918

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [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-bh
    - r-r6
    - r-rcpp >=0.11.0
    - r-later >=0.8.0
    - r-promises
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    # BH is the header-only part of Boost and thus a compile-time requirement only
    # - r-bh
    - r-r6
    - r-rcpp >=0.11.0
    - r-later >=0.8.0
    - r-promises

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

about:
  home: https://github.com/rstudio/httpuv
  license: GPL (>= 2)
  summary: Provides low-level socket and protocol support for handling HTTP and WebSocket requests directly from within R. It is primarily intended as a building block for other packages, rather than making it particularly easy to create complete web applications using httpuv alone. httpuv is built on top of the libuv and
    http-parser C libraries, both of which were developed by Joyent, Inc. (See LICENSE file for libuv and http-parser license information.)
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
    - halldc

# Package: httpuv
# Type: Package
# Title: HTTP and WebSocket Server Library
# Version: 1.5.1
# Author: Joe Cheng, Hector Corrada Bravo [ctb], Jeroen Ooms [ctb], Winston Chang [ctb]
# Copyright: RStudio, Inc.; Joyent, Inc.; Nginx Inc.; Igor Sysoev; Niels Provos; Internet Systems Consortium, Inc.; Alexander Chemeris
# Maintainer: Joe Cheng <joe@rstudio.com>
# Description: Provides low-level socket and protocol support for handling HTTP and WebSocket requests directly from within R. It is primarily intended as a building block for other packages, rather than making it particularly easy to create complete web applications using httpuv alone. httpuv is built on top of the libuv and http-parser C libraries, both of which were developed by Joyent, Inc. (See LICENSE file for libuv and http-parser license information.)
# License: GPL (>= 2) | file LICENSE
# Depends: R (>= 2.15.1)
# Imports: Rcpp (>= 0.11.0), utils, R6, promises, later (>= 0.8.0)
# LinkingTo: Rcpp, BH, later
# URL: https://github.com/rstudio/httpuv
# SystemRequirements: GNU make
# RoxygenNote: 6.1.1
# Suggests: testthat, callr, curl
# Collate: 'RcppExports.R' 'httpuv.R' 'server.R' 'static_paths.R' 'utils.R'
# NeedsCompilation: yes
# Packaged: 2019-04-05 20:06:25 UTC; winston
# Repository: CRAN
# Date/Publication: 2019-04-05 22:10:03 UTC
