{% set version = '0.3-10' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/pbdZMQ_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/pbdZMQ/pbdZMQ_{{ version }}.tar.gz
  sha256: 39a20058e4027fab6f4a4cf0f557fef4e77409c9656d00252ef31cb6d90ad191

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/

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

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('pbdZMQ')"           # [not win]
    - "\"%R%\" -e \"library('pbdZMQ')\""  # [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://pbdr.org/
  license: GPL-3
  summary: '''ZeroMQ'' is a well-known library for high-performance asynchronous messaging in
    scalable, distributed applications.  This package provides high level R wrapper
    functions to easily utilize ''ZeroMQ''. We mainly focus on interactive client/server
    programming frameworks. For convenience, a minimal ''ZeroMQ'' library (4.2.2) is
    shipped with ''pbdZMQ'', which can be used if no system installation of ''ZeroMQ''
    is available.  A few wrapper functions compatible with ''rzmq'' are also provided.'
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - ocefpaf
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: pbdZMQ
# Version: 0.3-10
# Date: 2023-09-03
# Title: Programming with Big Data -- Interface to 'ZeroMQ'
# Authors@R: c(person("Wei-Chen", "Chen", role = c("aut", "cre"), email = "wccsnow@gmail.com"), person("Drew", "Schmidt", role = "aut"), person("Christian", "Heckendorf", role = "aut", comment = "file transfer"), person("George", "Ostrouchov", role = "aut", comment = "Mac OSX"), person("Whit", "Armstrong", role = "ctb", comment = "some functions are modified from the rzmq package for backwards compatibility"), person("Brian", "Ripley", role = "ctb", comment = "C code of shellexec, and Solaris"), person("R Core team", role = "ctb", comment = "some functions are modified from the R source code"), person("Philipp", "A.", role = "ctb", comment = "Fedora"), person("Elliott Sales", "de Andrade", role = "ctb", comment = "sprintf"), person("Spencer", "Aiello", role = "ctb", comment = "windows conf"), person("Paul", "Andrey", role = "ctb", comment = "Mac OSX conf"), person("Panagiotis", "Cheilaris", role = "ctb", comment = "add serialize version"), person("ZeroMQ authors", role = c("aut", "cph"), comment = "source files in 'src/zmq_src/'") )
# Depends: R (>= 3.5.0)
# LazyLoad: yes
# Copyright: See files AUTHORS, COPYING, and COPYING.LESSER in 'inst/zmq_copyright/' for the 'ZeroMQ' source files in 'src/zmq_src/' which are under GPL-3.
# Description: 'ZeroMQ' is a well-known library for high-performance asynchronous messaging in scalable, distributed applications.  This package provides high level R wrapper functions to easily utilize 'ZeroMQ'. We mainly focus on interactive client/server programming frameworks. For convenience, a minimal 'ZeroMQ' library (4.2.2) is shipped with 'pbdZMQ', which can be used if no system installation of 'ZeroMQ' is available.  A few wrapper functions compatible with 'rzmq' are also provided.
# SystemRequirements: Linux, Mac OSX, and Windows, or 'ZeroMQ' library >= 4.0.4. Solaris 10 needs 'ZeroMQ' library 4.0.7 and 'OpenCSW'.
# StagedInstall: TRUE
# License: GPL-3
# URL: https://pbdr.org/
# BugReports: https://github.com/snoweye/pbdZMQ/issues
# NeedsCompilation: yes
# Maintainer: Wei-Chen Chen <wccsnow@gmail.com>
# RoxygenNote: 7.2.3
# Packaged: 2023-09-03 23:24:01 UTC; snoweye
# Author: Wei-Chen Chen [aut, cre], Drew Schmidt [aut], Christian Heckendorf [aut] (file transfer), George Ostrouchov [aut] (Mac OSX), Whit Armstrong [ctb] (some functions are modified from the rzmq package for backwards compatibility), Brian Ripley [ctb] (C code of shellexec, and Solaris), R Core team [ctb] (some functions are modified from the R source code), Philipp A. [ctb] (Fedora), Elliott Sales de Andrade [ctb] (sprintf), Spencer Aiello [ctb] (windows conf), Paul Andrey [ctb] (Mac OSX conf), Panagiotis Cheilaris [ctb] (add serialize version), ZeroMQ authors [aut, cph] (source files in 'src/zmq_src/')
# Repository: CRAN
# Date/Publication: 2023-09-05 11:00:02 UTC

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