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

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

source:
  fn: huxtable_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/huxtable_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/huxtable/huxtable_{{ version }}.tar.gz
  sha256: f4b4240ca7971d63870827761479fdbbd8ecfa6fe80a4228664d1fcc3f3d497a

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-assertthat
    - r-glue
    - r-memoise
    - r-stringr >=1.2.0
    - r-tibble
    - r-tidyselect
  run:
    - r-base
    - r-assertthat
    - r-glue
    - r-memoise
    - r-stringr >=1.2.0
    - r-tibble
    - r-tidyselect

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

about:
  home: https://hughjonesd.github.io/huxtable
  license: MIT
  summary: Like 'xtable', creates styled tables. Export to HTML, LaTeX, 'Word',  'Excel', 'PowerPoint'
    and RTF. Simple, modern interface to manipulate  borders, size, position, captions,
    colours, text styles and number formatting. Table cells can span multiple rows and/or
    columns. Includes  a 'huxreg' function for creation of regression tables, and 'quick_*'  one-liners
    to print data to a new document.
  license_family: MIT

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