{% set version = '0.2.15' %}

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

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

source:
  fn: rjson_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rjson_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rjson/rjson_{{ version }}.tar.gz


  sha256: 77d00d8f6a1c936329b46f3b8b0be79a165f8c5f1989497f942ecc53dcf6f2ef

build:
  merge_build_host: True  # [win]
  number: 1
  skip: True  # [win32]


  rpaths:
    - lib/R/lib/
    - lib/


requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base

  run:
    - r-base

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



about:
  home: https://CRAN.R-project.org/package=rjson
  license: GPL-2
  summary: Converts R object into JSON objects and vice-versa
  license_family: GPL2



extra:
  recipe-maintainers:
    - croth1
