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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/JuniperKernel_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/JuniperKernel/JuniperKernel_{{ version }}.tar.gz
  sha256: f6458915d529b670296734c942193b827def9c41bedc46cf95527302b9a3f0fd

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [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-rcpp >=0.11.0
    - r-data.table
    - r-gdtools >=0.1.6
    - r-jsonlite
    - r-pbdzmq >=0.3_2
    - r-repr
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.11.0
    - r-data.table
    - r-gdtools >=0.1.6
    - r-jsonlite
    - r-pbdzmq >=0.3_2
    - r-repr

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

about:
  home: https://github.com/JuniperKernel/JuniperKernel
  license: GPL (>= 2)
  summary: Provides a full implementation of the 'Jupyter' <http://jupyter.org/> messaging protocol
    in C++ by leveraging 'Rcpp' and 'Xeus' <https://github.com/QuantStack/xeus>. 'Jupyter'
    supplies an interactive computing environment and a messaging protocol defined over
    'ZeroMQ' for multiple programming languages. This package implements the 'Jupyter'
    kernel interface so that 'R' is exposed to this interactive computing environment.
    'ZeroMQ' functionality is provided by the 'pbdZMQ' package. 'Xeus' is a C++ library
    that facilitates the implementation of kernels for 'Jupyter'. Additionally, 'Xeus'
    provides an interface to libraries that exist in the 'Jupyter' ecosystem for building
    widgets, plotting, and more <https://blog.jupyter.org/interactive-workflows-for-c-with-jupyter-fe9b54227d92>.
    'JuniperKernel' uses 'Xeus' as a library for the 'Jupyter' messaging protocol.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
