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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/Rcpp_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Rcpp/Rcpp_{{ version }}.tar.gz
  sha256: 879f9296bc045ac4ed464578723bd37fcabbbdaa30aaaf070cf953e329f678ee
  patches:
    - 0001-Add-CXX1XSTD-to-PKG_CPPFLAGS.patch
    - 0002-macOS-When-target-lt-10.9-libstdc-supports-only-some.patch

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: http://www.rcpp.org, http://dirk.eddelbuettel.com/code/rcpp.html, https://github.com/RcppCore/Rcpp
  license: GPL-2.0-or-later
  summary: The 'Rcpp' package provides R functions as well as C++ classes which offer a seamless integration of R and C++. Many R data types and objects can be mapped back and forth to C++ equivalents which facilitates both writing of new code as well as easier integration of third-party libraries. Documentation about 'Rcpp'
    is provided by several vignettes included in this package, via the 'Rcpp Gallery' site at <http://gallery.rcpp.org>, the paper by Eddelbuettel and Francois (2011, <doi:10.18637/jss.v040.i08>), the book by Eddelbuettel (2013, <doi:10.1007/978-1-4614-6868-4>) and the paper by Eddelbuettel and Balamuta (2018, <doi:10.1080/00031305.2017.1375990>);
    see 'citation("Rcpp")' for details.
  license_family: GPL2
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: Rcpp
# Title: Seamless R and C++ Integration
# Version: 1.0.1
# Date: 2019-03-16
# Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou, Nathan Russell, Douglas Bates and John Chambers
# Maintainer: Dirk Eddelbuettel <edd@debian.org>
# Description: The 'Rcpp' package provides R functions as well as C++ classes which offer a seamless integration of R and C++. Many R data types and objects can be mapped back and forth to C++ equivalents which facilitates both writing of new code as well as easier integration of third-party libraries. Documentation about 'Rcpp' is provided by several vignettes included in this package, via the 'Rcpp Gallery' site at <http://gallery.rcpp.org>, the paper by Eddelbuettel and Francois (2011, <doi:10.18637/jss.v040.i08>), the book by Eddelbuettel (2013, <doi:10.1007/978-1-4614-6868-4>) and the paper by Eddelbuettel and Balamuta (2018, <doi:10.1080/00031305.2017.1375990>); see 'citation("Rcpp")' for details.
# Depends: R (>= 3.0.0)
# Imports: methods, utils
# Suggests: RUnit, inline, rbenchmark, knitr, rmarkdown, pinp, pkgKitten (>= 0.1.2)
# VignetteBuilder: knitr
# URL: http://www.rcpp.org, http://dirk.eddelbuettel.com/code/rcpp.html, https://github.com/RcppCore/Rcpp
# License: GPL (>= 2)
# BugReports: https://github.com/RcppCore/Rcpp/issues
# MailingList: Please send questions and comments regarding Rcpp to rcpp-devel@lists.r-forge.r-project.org
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2019-03-16 15:29:08.470813 UTC; edd
# Repository: CRAN
# Date/Publication: 2019-03-17 07:15:10 UTC
