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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/earth_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/earth/earth_{{ version }}.tar.gz
  sha256: 326f98e8c29365ca3cd5584cf2bd6529358f5ef81664cbd494162f92b6c3488d

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:
    - libopenblas
    - r-base
    - r-formula >=1.2_3
    - r-teachingdemos >=2.10
    - r-plotmo >=3.5.4
  run:
    - libopenblas
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-formula >=1.2_3
    - r-teachingdemos >=2.10
    - r-plotmo >=3.5.4

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

about:
  home: http://www.milbo.users.sonic.net/earth
  license: GPL-3.0-or-later
  summary: Build regression models using the techniques in Friedman's papers "Fast MARS" and
    "Multivariate Adaptive Regression Splines" <doi:10.1214/aos/1176347963>. (The term
    "MARS" is trademarked and thus not used in the name of the package.)
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: earth
# Version: 5.1.1
# Title: Multivariate Adaptive Regression Splines
# Author: Stephen Milborrow.  Derived from mda:mars by Trevor Hastie and Rob Tibshirani.  Uses Alan Miller's Fortran utilities with Thomas Lumley's leaps wrapper.
# Maintainer: Stephen Milborrow <milbo@sonic.net>
# Depends: R (>= 3.4.0), Formula (>= 1.2-3), plotmo (>= 3.5.4), TeachingDemos (>= 2.10)
# Suggests: gam (>= 1.16), mgcv (>= 1.8-26), mda (>= 0.4-10), MASS (>= 7.3-51)
# Description: Build regression models using the techniques in Friedman's papers "Fast MARS" and "Multivariate Adaptive Regression Splines" <doi:10.1214/aos/1176347963>. (The term "MARS" is trademarked and thus not used in the name of the package.)
# License: GPL-3
# LazyData: yes
# URL: http://www.milbo.users.sonic.net/earth
# Packaged: 2019-04-12 03:37:41 UTC; milbo
# Repository: CRAN
# Date/Publication: 2019-04-12 10:52:57 UTC
# RoxygenNote: 5.1.1
# NeedsCompilation: yes
