{% set version = '1.22-2' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/gam_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gam/gam_{{ version }}.tar.gz
  sha256: fe737f45229448b98b4fe2c0a3193d4cd2de43a1415f1fa25e4ec4c5a0ca02fa

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: interp, testthat
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
    - r-foreach

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-foreach

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('gam')"           # [not win]
    - "\"%R%\" -e \"library('gam')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://CRAN.R-project.org/package=gam
  license: GPL-2
  summary: Functions for fitting and working with generalized additive models, as described in
    chapter 7 of "Statistical Models in S" (Chambers and Hastie (eds), 1991), and "Generalized
    Additive Models" (Hastie and Tibshirani, 1990).
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Package: gam
# Type: Package
# Title: Generalized Additive Models
# Date: 2023-03-27
# Version: 1.22-2
# Author: Trevor Hastie
# Description: Functions for fitting and working with generalized additive models, as described in chapter 7 of "Statistical Models in S" (Chambers and Hastie (eds), 1991), and "Generalized Additive Models" (Hastie and Tibshirani, 1990).
# Maintainer: Trevor Hastie <hastie@stanford.edu>
# Depends: R (>= 4.0), stats, splines, foreach
# Suggests: interp, testthat
# License: GPL-2
# RoxygenNote: 7.2.1
# Encoding: UTF-8
# Imports: methods
# NeedsCompilation: yes
# Packaged: 2023-03-27 22:47:20 UTC; hastie
# Repository: CRAN
# Date/Publication: 2023-03-28 02:50:02 UTC

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