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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/lamW_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/lamW/lamW_{{ version }}.tar.gz
  sha256: dcc2cf6d8285dafb8849cc1a0b1d26178f23bb6499864a5f302ac28a8bd5510d

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

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

about:
  home: https://github.com/aadler/lamW
  license: BSD-2-Clause
  summary: Implements both real-valued branches of the Lambert-W function (Corless et al, 1996) <doi:10.1007/BF02124750> without the need for installing the entire GSL.
  license_family: BSD
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/BSD_2_clause
    - LICENSE

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

# Package: lamW
# Type: Package
# Title: Lambert-W Function
# Version: 1.3.3
# Date: 2020-06-26
# Authors@R: c(person(given="Avraham", family="Adler",role=c("aut", "cph", "cre"), email="Avraham.Adler@gmail.com", comment = c(ORCID = "0000-0002-3039-0703")))
# Description: Implements both real-valued branches of the Lambert-W function (Corless et al, 1996) <doi:10.1007/BF02124750> without the need for installing the entire GSL.
# License: BSD_2_clause + file LICENSE
# Depends: R (>= 3.0.2)
# Imports: Rcpp, RcppParallel (>= 4.3.20)
# LinkingTo: Rcpp, RcppParallel (>= 4.3.20)
# SystemRequirements: GNU make
# Suggests: testthat, covr
# NeedsCompilation: yes
# URL: https://github.com/aadler/lamW
# BugReports: https://github.com/aadler/lamW/issues
# Packaged: 2020-06-26 07:41:58 UTC; Parents
# Author: Avraham Adler [aut, cph, cre] (<https://orcid.org/0000-0002-3039-0703>)
# Maintainer: Avraham Adler <Avraham.Adler@gmail.com>
# Repository: CRAN
# Date/Publication: 2020-06-26 14:40:11 UTC
