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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/logspline_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/logspline/logspline_{{ version }}.tar.gz
  sha256: f0a9667da192ce5b6cff02dd5c0bfa21ce2a28e50ca297057f2a437ef2101bd6

build:
  merge_build_host: True  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [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('logspline')"           # [not win]
    - "\"%R%\" -e \"library('logspline')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=logspline
  license: Apache-2.0
  summary: Contains routines for logspline density estimation. The function oldlogspline() uses
    the same algorithm as the logspline package version 1.0.x; i.e. the Kooperberg and
    Stone (1992)  algorithm (with an improved interface).  The recommended routine logspline()
    uses an algorithm from Stone et al (1997)  <DOI:10.1214/aos/1031594728>.
  license_family: APACHE

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

# Package: logspline
# Version: 2.1.13
# Date: 2019-06-13
# Title: Routines for Logspline Density Estimation
# Author: Charles Kooperberg <clk@fredhutch.org>
# Maintainer: Charles Kooperberg <clk@fredhutch.org>
# Description: Contains routines for logspline density estimation. The function oldlogspline() uses the same algorithm as the logspline package version 1.0.x; i.e. the Kooperberg and Stone (1992)  algorithm (with an improved interface).  The recommended routine logspline() uses an algorithm from Stone et al (1997)  <DOI:10.1214/aos/1031594728>.
# Imports: stats, graphics
# License: Apache License 2.0
# NeedsCompilation: yes
# Packaged: 2019-06-13 18:13:45 UTC; clk
# Repository: CRAN
# Date/Publication: 2019-06-13 22:30:04 UTC
