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

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

source:
  url: https://dist.apache.org/repos/dist/release/arrow/arrow-{{ version }}/apache-arrow-{{ version }}.tar.gz
  sha256: 149ca6aa969ac5742f3b30d1f69a6931a533fd1db8b96712e60bf386a26dc75c

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('r_clang') }}  # [win]
    - pkg-config
    - {{ posix }}make
    - {{ posix }}sed         # [win]
    - {{ posix }}coreutils   # [win]
    - {{ posix }}filesystem  # [win]
    - {{ posix }}zip         # [win]
  host:
    - r-base
    - arrow-cpp {{ version }}
    - r-r6
    - r-rcpp >=1.0.1
    - r-assertthat
    - r-bit64
    - r-purrr
    - r-rlang
    - r-tidyselect
  run:
    - r-base
    - r-r6
    - r-rcpp >=1.0.1
    - r-assertthat
    - r-bit64
    - r-purrr
    - r-rlang
    - r-tidyselect

test:
  commands:
    - $R -e "library('arrow')"           # [not win]
    - "\"%R%\" -e \"library('arrow'); data(mtcars); write_parquet(mtcars, 'test.parquet')\""  # [win]

about:
  home: https://github.com/apache/arrow
  license: Apache-2.0
  license_file: LICENSE.txt
  summary: R Integration to 'Apache' 'Arrow'.
  license_family: APACHE

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

# Package: arrow
# Title: R Integration to 'Apache' 'Arrow'
# Version: 0.12.1
# Authors@R: c( person("Romain", "Francois", email = "romain@rstudio.com", role = c("aut", "cre")), person("Javier", "Luraschi", email = "javier@rstudio.com", role = c("ctb")), person("Jeffrey", "Wong", email = "jeffreyw@netflix.com", role = c("ctb")), person("Apache Arrow", email = "dev@arrow.apache.org", role = c("aut", "cph")) )
# Description: R Integration to 'Apache' 'Arrow'.
# Depends: R (>= 3.5)
# License: Apache License (>= 2.0)
# Encoding: UTF-8
# LazyData: true
# SystemRequirements: C++11
# LinkingTo: Rcpp (>= 0.12.18.2)
# Imports: Rcpp (>= 0.12.18.2), rlang, purrr, assertthat, glue, R6, vctrs (>= 0.0.0.9000), fs, tibble, crayon, withr, bit64
# Remotes: romainfrancois/vctrs@bit64, RcppCore/Rcpp, r-lib/withr
# Roxygen: list(markdown = TRUE)
# RoxygenNote: 6.1.1
# Suggests: testthat, lubridate, hms
# Collate: 'enums.R' 'R6.R' 'ArrayData.R' 'ChunkedArray.R' 'Column.R' 'Field.R' 'List.R' 'RcppExports.R' 'RecordBatch.R' 'RecordBatchReader.R' 'RecordBatchWriter.R' 'Schema.R' 'Struct.R' 'Table.R' 'array.R' 'buffer.R' 'compute.R' 'csv.R' 'dictionary.R' 'feather.R' 'io.R' 'memory_pool.R' 'message.R' 'on_exit.R' 'parquet.R' 'read_record_batch.R' 'read_table.R' 'reexports-bit64.R' 'reexports-tibble.R' 'write_arrow.R' 'zzz.R'
