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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/openxlsx_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/openxlsx/openxlsx_{{ version }}.tar.gz
  sha256: af571b3c60cea2a5975f6a394469f1c50266d4a5c5c91896b991b1b3ba8bc86e

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp
    - r-rlang >=0.1.2
    - r-stringi
    - r-zip
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rlang >=0.1.2
    - r-stringi
    - r-zip

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

about:
  home: https://ycphs.github.io/openxlsx/index.html, https://github.com/ycphs/openxlsx
  license: MIT
  summary: Simplifies the creation of Excel .xlsx files by providing a high level interface to writing, styling and editing worksheets. Through the use of 'Rcpp', read/write times are comparable to the 'xlsx' and 'XLConnect' packages with the added benefit of removing the dependency on Java.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r

# Type: Package
# Package: openxlsx
# Title: Read, Write and Edit xlsx Files
# Version: 4.1.3
# Date: 2019-11-07
# Authors@R: c(person(given = "Philipp", family = "Schauberger", role = c("aut", "cre"), email = "philipp@schauberger.co.at"), person(given = "Alexander", family = "Walker", role = "aut", email = "Alexander.Walker1989@gmail.com"), person(given = "Luca", family = "Braglia", role = "ctb"))
# Description: Simplifies the creation of Excel .xlsx files by providing a high level interface to writing, styling and editing worksheets. Through the use of 'Rcpp', read/write times are comparable to the 'xlsx' and 'XLConnect' packages with the added benefit of removing the dependency on Java.
# License: MIT + file LICENSE
# URL: https://ycphs.github.io/openxlsx/index.html, https://github.com/ycphs/openxlsx
# BugReports: https://github.com/ycphs/openxlsx/issues
# Depends: R (>= 3.3.0)
# Imports: grDevices, methods, Rcpp, stats, stringi, utils, zip, rlang (>= 0.1.2)
# Suggests: knitr, pkgdown, testthat, roxygen2
# LinkingTo: Rcpp
# VignetteBuilder: knitr
# Encoding: UTF-8
# RoxygenNote: 6.1.1
# Collate: 'CommentClass.R' 'HyperlinkClass.R' 'RcppExports.R' 'class_definitions.R' 'StyleClass.R' 'WorkbookClass.R' 'baseXML.R' 'borderFunctions.R' 'chartsheet_class.R' 'conditional_formatting.R' 'helperFunctions.R' 'loadWorkbook.R' 'onUnload.R' 'openXL.R' 'openxlsx.R' 'openxlsxCoerce.R' 'readWorkbook.R' 'sheet_data_class.R' 'workbook_column_widths.R' 'workbook_read_workbook.R' 'workbook_write_data.R' 'worksheet_class.R' 'wrappers.R' 'writeData.R' 'writeDataTable.R' 'writexlsx.R'
# NeedsCompilation: yes
# Packaged: 2019-11-07 12:56:08 UTC; ceadm
# Author: Philipp Schauberger [aut, cre], Alexander Walker [aut], Luca Braglia [ctb]
# Maintainer: Philipp Schauberger <philipp@schauberger.co.at>
# Repository: CRAN
# Date/Publication: 2019-11-07 13:40:02 UTC
