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

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

source:
  fn: rematch2_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/rematch2_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rematch2/rematch2_{{ version }}.tar.gz
  sha256: 0612bb904334bd022ba6d1e69925b1e85f8e86b15ec65476777828776e89609a

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-tibble
  run:
    - r-base
    - r-tibble

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

about:
  home: https://github.com/r-lib/rematch2#readme
  license: MIT
  summary: Wrappers on 'regexpr' and 'gregexpr' to return the match results in tidy data frames.
  license_family: MIT

extra:
  recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
