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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/splines2_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/splines2/splines2_{{ version }}.tar.gz
  sha256: a0cbe016234c9ba9d6e09b86228c8bcc6d9d52a3e38e69507b9ad5b884d34d84

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
    - r-rcpparmadillo
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rcpparmadillo

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

about:
  home: https://github.com/wenjie2wang/splines2
  license: GPL-3.0-or-later
  summary: Constructs B-splines and its integral, M-splines and its integral (I-splines), convex splines (C-splines), generalized Bernstein polynomials, and their derivatives. It also contains a C++ head-only library integrated with Rcpp. See De Boor (1978) <doi:10.1002/zamm.19800600129>, Ramsay (1988) <doi:10.1214/ss/1177012761>,
    and Meyer (2008) <doi:10.1214/08-AOAS167> for more information about the spline basis.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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

# Package: splines2
# Title: Regression Spline Functions and Classes
# Version: 0.3.1
# Date: 2020-07-13
# Authors@R: c( person(given = "Wenjie", family = "Wang", email = "wjwang.stat@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0363-3180")), person(given = "Jun", family = "Yan", role = "aut", comment = c(ORCID = "0000-0003-4401-7296")) )
# Description: Constructs B-splines and its integral, M-splines and its integral (I-splines), convex splines (C-splines), generalized Bernstein polynomials, and their derivatives. It also contains a C++ head-only library integrated with Rcpp. See De Boor (1978) <doi:10.1002/zamm.19800600129>, Ramsay (1988) <doi:10.1214/ss/1177012761>, and Meyer (2008) <doi:10.1214/08-AOAS167> for more information about the spline basis.
# Imports: Rcpp, stats
# LinkingTo: Rcpp, RcppArmadillo
# Suggests: knitr, rmarkdown, tinytest
# Depends: R (>= 3.2.3)
# VignetteBuilder: knitr
# License: GPL (>= 3)
# URL: https://github.com/wenjie2wang/splines2
# BugReports: https://github.com/wenjie2wang/splines2/issues
# Encoding: UTF-8
# RoxygenNote: 7.1.1
# NeedsCompilation: yes
# Packaged: 2020-07-13 17:08:25 UTC; wenjie
# Author: Wenjie Wang [aut, cre] (<https://orcid.org/0000-0003-0363-3180>), Jun Yan [aut] (<https://orcid.org/0000-0003-4401-7296>)
# Maintainer: Wenjie Wang <wjwang.stat@gmail.com>
# Repository: CRAN
# Date/Publication: 2020-07-14 13:30:02 UTC
