{% set version = '0.8.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/ndjson_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ndjson/ndjson_{{ version }}.tar.gz
  sha256: 22a037dbad0ae17e0ac442f45370fa7b4c4cc23f66ef1a949fe4e910dd5b7f53

build:
  merge_build_host: True  # [win]
  number: 3
  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-data.table
    - r-tibble
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-data.table
    - r-tibble
    - zlib

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

about:
  home: http://gitlab.com/hrbrmstr/ndjson
  license: MIT
  summary: Streaming 'JSON' ('ndjson') has one 'JSON' record per-line and many modern 'ndjson'
    files contain large numbers of records. These constructs may not be columnar in
    nature, but it is often useful to read in these files and "flatten" the structure
    out to enable working with the data in an R 'data.frame'-like context. Functions
    are provided that make it possible to read in plain 'ndjson' files or compressed
    ('gz') 'ndjson' files and either validate the format of the records or create "flat"
    'data.table' structures from them.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - mxr-conda
    - ndmaxar
    - oblute
    - rluria14
    - conda-forge/r

# The original CRAN metadata for this package was:

# Package: ndjson
# Type: Package
# Title: Wicked-Fast Streaming 'JSON' ('ndjson') Reader
# Version: 0.8.0
# Date: 2019-11-13
# Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5670-2640")), person("Niels", "Lohmann", role = "aut", comment = "C++ json parser"), person("Deepak", "Bandyopadhyay", role = "aut", comment = "C++ gzstream"), person("Lutz", "Kettner", role = "aut", comment = "C++ gzstream"), person("Neal", "Fultz", role = "ctb", comment = "Rcpp integration"), person("Maarten", "Demeyer", role = "ctb", comment = "dtplyr cleanup"))
# Maintainer: Bob Rudis <bob@rud.is>
# Description: Streaming 'JSON' ('ndjson') has one 'JSON' record per-line and many modern 'ndjson' files contain large numbers of records. These constructs may not be columnar in nature, but it is often useful to read in these files and "flatten" the structure out to enable working with the data in an R 'data.frame'-like context. Functions are provided that make it possible to read in plain 'ndjson' files or compressed ('gz') 'ndjson' files and either validate the format of the records or create "flat" 'data.table' structures from them.
# URL: http://gitlab.com/hrbrmstr/ndjson
# BugReports: https://gitlab.com/hrbrmstr/ndjson/issues
# SystemRequirements: zlib, C++14
# NeedsCompilation: yes
# License: MIT + file LICENSE
# Encoding: UTF-8
# Suggests: tinytest, covr
# Depends: R (>= 3.2.0)
# Imports: Rcpp, data.table, tibble
# LinkingTo: Rcpp
# RoxygenNote: 6.1.1
# Packaged: 2019-11-13 14:54:51 UTC; hrbrmstr
# Author: Bob Rudis [aut, cre] (<https://orcid.org/0000-0001-5670-2640>), Niels Lohmann [aut] (C++ json parser), Deepak Bandyopadhyay [aut] (C++ gzstream), Lutz Kettner [aut] (C++ gzstream), Neal Fultz [ctb] (Rcpp integration), Maarten Demeyer [ctb] (dtplyr cleanup)
# Repository: CRAN
# Date/Publication: 2019-11-13 15:20:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
