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

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

source:
  fn: flextable_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/flextable_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/flextable/flextable_{{ version }}.tar.gz
  sha256: d449e19998e90ba2d850bd16224c76ff5b67e665e1de4459e080cd7c3ef04226

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-r6
    - r-gdtools >=0.1.6
    - r-htmltools
    - r-knitr
    - r-officer >=0.2.0
    - r-rmarkdown
    - r-stringr
    - r-xml2
  run:
    - r-base
    - r-r6
    - r-gdtools >=0.1.6
    - r-htmltools
    - r-knitr
    - r-officer >=0.2.0
    - r-rmarkdown
    - r-stringr
    - r-xml2

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

about:
  home: https://davidgohel.github.io/flextable
  license: GPL-3
  summary: Create pretty tables for 'Microsoft Word', 'Microsoft PowerPoint' and 'HTML' documents.  Functions
    are provided to let users create tables, modify and format their content.  It extends
    package 'officer' that does not contain any feature for customized tabular reporting  and
    can be used within R markdown documents when rendering to HTML and to 'Microsoft
    Word' documents.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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