{% set version = '1.6.11' %}

{% 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: 8ba79e0a8351274daf2dc566c71f88e891127cdedca62ad77a4b27a8103eeef5

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: testthat, callr, curl, websocket
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not 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-r6
    - r-rcpp >=1.0.7
    - r-later >=0.8.0
    - r-promises
    - zlib

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-r6
    - r-rcpp >=1.0.7
    - r-later >=0.8.0
    - r-promises
    - zlib

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('httpuv')"           # [not win]
    - "\"%R%\" -e \"library('httpuv')\""  # [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/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: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
    - LICENSE

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

# The original CRAN metadata for this package was:

# Package: httpuv
# Type: Package
# Encoding: UTF-8
# Title: HTTP and WebSocket Server Library
# Version: 1.6.11
# Authors@R: c( person("Joe", "Cheng", role = c("aut"), email = "joe@rstudio.com"), person("Winston", "Chang", role = c("aut", "cre"), email = "winston@rstudio.com"), person("Posit, PBC", role = "cph", "fnd"), person("Hector", "Corrada Bravo", role = "ctb"), person("Jeroen", "Ooms", role = "ctb"), person("Andrzej", "Krzemienski", role = "cph", comment = "optional.hpp"), person("libuv project contributors", role = "cph", comment = "libuv library, see src/libuv/AUTHORS file"), person("Joyent, Inc. and other Node contributors", role = "cph", comment = "libuv library, see src/libuv/AUTHORS file; and http-parser library, see src/http-parser/AUTHORS file"), person("Niels", "Provos", role = "cph", comment = "libuv subcomponent: tree.h"), person("Internet Systems Consortium, Inc.", role = "cph", comment = "libuv subcomponent: inet_pton and inet_ntop, contained in src/libuv/src/inet.c"), person("Alexander", "Chemeris", role = "cph", comment = "libuv subcomponent: stdint-msvc2008.h (from msinttypes)"), person("Google, Inc.", role = "cph", comment = "libuv subcomponent: pthread-fixes.c"), person("Sony Mobile Communcations AB", role = "cph", comment = "libuv subcomponent: pthread-fixes.c"), person("Berkeley Software Design Inc.", role = "cph", comment = "libuv subcomponent: android-ifaddrs.h, android-ifaddrs.c"), person("Kenneth", "MacKay", role = "cph", comment = "libuv subcomponent: android-ifaddrs.h, android-ifaddrs.c"), person("Emergya (Cloud4all, FP7/2007-2013, grant agreement no 289016)", role = "cph", comment = "libuv subcomponent: android-ifaddrs.h, android-ifaddrs.c"), person("Steve", "Reid", role = "aut", comment = "SHA-1 implementation"), person("James", "Brown", role = "aut", comment = "SHA-1 implementation"), person("Bob", "Trower", role = "aut", comment = "base64 implementation"), person("Alexander", "Peslyak", role = "aut", comment = "MD5 implementation"), person("Trantor Standard Systems", role = "cph", comment = "base64 implementation"), person("Igor", "Sysoev", role = "cph", comment = "http-parser") )
# 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 (>= 1.0.7), utils, R6, promises, later (>= 0.8.0)
# LinkingTo: Rcpp, later
# URL: https://github.com/rstudio/httpuv
# SystemRequirements: GNU make, zlib
# RoxygenNote: 7.2.3
# Suggests: testthat, callr, curl, websocket
# Collate: 'RcppExports.R' 'httpuv.R' 'random_port.R' 'server.R' 'static_paths.R' 'utils.R'
# NeedsCompilation: yes
# Packaged: 2023-05-11 01:48:49 UTC; jcheng
# Author: Joe Cheng [aut], Winston Chang [aut, cre], Posit, PBC fnd [cph], Hector Corrada Bravo [ctb], Jeroen Ooms [ctb], Andrzej Krzemienski [cph] (optional.hpp), libuv project contributors [cph] (libuv library, see src/libuv/AUTHORS file), Joyent, Inc. and other Node contributors [cph] (libuv library, see src/libuv/AUTHORS file; and http-parser library, see src/http-parser/AUTHORS file), Niels Provos [cph] (libuv subcomponent: tree.h), Internet Systems Consortium, Inc. [cph] (libuv subcomponent: inet_pton and inet_ntop, contained in src/libuv/src/inet.c), Alexander Chemeris [cph] (libuv subcomponent: stdint-msvc2008.h (from msinttypes)), Google, Inc. [cph] (libuv subcomponent: pthread-fixes.c), Sony Mobile Communcations AB [cph] (libuv subcomponent: pthread-fixes.c), Berkeley Software Design Inc. [cph] (libuv subcomponent: android-ifaddrs.h, android-ifaddrs.c), Kenneth MacKay [cph] (libuv subcomponent: android-ifaddrs.h, android-ifaddrs.c), Emergya (Cloud4all, FP7/2007-2013, grant agreement no 289016) [cph] (libuv subcomponent: android-ifaddrs.h, android-ifaddrs.c), Steve Reid [aut] (SHA-1 implementation), James Brown [aut] (SHA-1 implementation), Bob Trower [aut] (base64 implementation), Alexander Peslyak [aut] (MD5 implementation), Trantor Standard Systems [cph] (base64 implementation), Igor Sysoev [cph] (http-parser)
# Maintainer: Winston Chang <winston@rstudio.com>
# Repository: CRAN
# Date/Publication: 2023-05-11 08:00:05 UTC

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