{% set version = '1.5' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/graphql_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/graphql/graphql_{{ version }}.tar.gz
  sha256: 594f52be1b1a69efa4882ecdbfec7e1341c04980d70a497c7b3497e947a2217e

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 >=0.12.12
    - r-jsonlite

  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.12.12
    - r-jsonlite

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

about:
  home: http://graphql.org (upstream) https://github.com/ropensci/graphql (devel)
  license: MIT
  summary: Bindings to the 'libgraphqlparser' C++ library. Parses GraphQL syntax and exports
    the AST in JSON format.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# The original CRAN metadata for this package was:

# Package: graphql
# Type: Package
# Title: A GraphQL Query Parser
# Version: 1.5
# Authors@R: c( person("Jeroen", "Ooms", , "jeroen@berkeley.edu", role = c("cre", "aut")), person("Barret", "Schloerke", , "schloerke@gmail.com", role = "ctb"), person("Scott", "Wolchok", role = "ctb"), person("Facebook, Inc", role = c("aut","cph"), comment = "libgraphqlparser C++ library"))
# Description: Bindings to the 'libgraphqlparser' C++ library. Parses GraphQL syntax and exports the AST in JSON format.
# License: MIT + file LICENSE
# Encoding: UTF-8
# URL: http://graphql.org (upstream) https://github.com/ropensci/graphql (devel)
# BugReports: https://github.com/ropensci/graphql/issues
# LinkingTo: Rcpp
# Imports: Rcpp (>= 0.12.12), jsonlite
# Suggests: testthat
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2018-12-01 13:16:31 UTC; jeroen
# Author: Jeroen Ooms [cre, aut], Barret Schloerke [ctb], Scott Wolchok [ctb], Facebook, Inc [aut, cph] (libgraphqlparser C++ library)
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2018-12-01 14:00:03 UTC

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