{% set version = '0.1-3' %}

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

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

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

  sha256: 6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d

build:
  skip: true  # [win32]
  number: 0

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

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base

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

about:
  home: http://www.rforge.net/base64enc
  license: GPL-2 | GPL-3
  summary: |
    This package provides tools for handling base64 encoding. It is more flexible than
    the orphaned base64 package.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
