{% set version = '1.6.0' %}

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

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

source:
  fn: ore_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ore_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ore/ore_{{ version }}.tar.gz
  sha256: 8e47eadd23512f59b7fe88e97da87d288816ba7097ca348be9f5e67c301fba84

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

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

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

  run:
    - r-base
    - {{native}}gcc-libs   # [win]
    - libgcc               # [not win]

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

about:
  home: https://github.com/jonclayden/ore
  license: BSD_3_clause
  summary: Provides an alternative to R's built-in functionality for handling regular expressions,
    based on the Onigmo library. Offers first-class compiled regex objects, partial
    matching and function-based substitutions, amongst other features.
  license_family: BSD

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