{% set version = "1.4.3" %}
{% set posix = 'm2-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/readxl_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/readxl/readxl_{{ version }}.tar.gz
  sha256: 7efebbcdefeb8523633db62b3eeb6ea2e4e81e3d010d8b2adb134011c09a5948
  patches:
    - r-readxl-libiconv.patch

build:
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-progress                 # [build_platform != target_platform]
    - r-tibble                   # [build_platform != target_platform]
    - r-cpp11                    # [build_platform != target_platform]
    - r-cellranger               # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ stdlib("c") }}          # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ stdlib("m2w64_c") }}          # [win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-cellranger
    - r-cpp11 >=0.4.0
    - r-progress
    - r-tibble >=2.0.1
    - libiconv
  run:
    - r-base
    - r-cellranger
    - r-cpp11 >=0.4.0
    - r-progress
    - r-tibble >=2.0.1

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

about:
  home: https://readxl.tidyverse.org, https://github.com/tidyverse/readxl
  license: MIT
  summary: Import excel files into R. Supports '.xls' via the embedded 'libxls' C library <https://github.com/libxls/libxls> and '.xlsx' via the embedded 'RapidXML' C++ library <http://rapidxml.sourceforge.net>.  Works on Windows, Mac and Linux without external dependencies.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT

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

# Package: readxl
# Title: Read Excel Files
# Version: 1.3.1
# Authors@R:  c(person(given = "Hadley", family = "Wickham", role = "aut", email = "hadley@rstudio.com", comment = c(ORCID = "0000-0003-4757-117X")), person(given = "Jennifer", family = "Bryan", role = c("aut", "cre"), email = "jenny@rstudio.com", comment = c(ORCID = "0000-0002-6983-2759")), person(given = "RStudio", role = c("cph", "fnd"), comment = "Copyright holder of all R code and all C/C++ code without explicit copyright attribution"), person(given = "Marcin", family = "Kalicinski", role = c("ctb", "cph"), comment = "Author of included RapidXML code"), person(given = "Komarov Valery", role = c("ctb", "cph"), comment = "Author of included libxls code"), person(given = "Christophe Leitienne", role = c("ctb", "cph"), comment = "Author of included libxls code"), person(given = "Bob Colbert", role = c("ctb", "cph"), comment = "Author of included libxls code"), person(given = "David Hoerl", role = c("ctb", "cph"), comment = "Author of included libxls code"), person(given = "Evan Miller", role = c("ctb", "cph"), comment = "Author of included libxls code"))
# Description: Import excel files into R. Supports '.xls' via the embedded 'libxls' C library <https://github.com/libxls/libxls> and '.xlsx' via the embedded 'RapidXML' C++ library <http://rapidxml.sourceforge.net>.  Works on Windows, Mac and Linux without external dependencies.
# License: GPL-3
# URL: https://readxl.tidyverse.org, https://github.com/tidyverse/readxl
# BugReports: https://github.com/tidyverse/readxl/issues
# Imports: cellranger, Rcpp (>= 0.12.18), tibble (>= 1.3.1), utils
# Suggests: covr, knitr, rmarkdown, rprojroot (>= 1.1), testthat
# LinkingTo: progress, Rcpp
# VignetteBuilder: knitr
# Encoding: UTF-8
# LazyData: true
# Note: libxls-SHA cef1393
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-03-13 16:01:23 UTC; jenny
# Author: Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd] (Copyright holder of all R code and all C/C++ code without explicit copyright attribution), Marcin Kalicinski [ctb, cph] (Author of included RapidXML code), Komarov Valery [ctb, cph] (Author of included libxls code), Christophe Leitienne [ctb, cph] (Author of included libxls code), Bob Colbert [ctb, cph] (Author of included libxls code), David Hoerl [ctb, cph] (Author of included libxls code), Evan Miller [ctb, cph] (Author of included libxls code)
# Maintainer: Jennifer Bryan <jenny@rstudio.com>
# Repository: CRAN
# Date/Publication: 2019-03-13 16:30:02 UTC
