{% set version = '1.0-6' %}

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

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

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

  sha256: 9b731397b7166dd54941fb0d2eac6df60c7a483b2e790f7eb15b4d7b79c9d69c

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

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

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

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=bitops
  license: GPL (>= 2)
  summary: Functions for bitwise operations on integer vectors.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
