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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/lmom_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/lmom/lmom_{{ version }}.tar.gz
  sha256: 4b0ae8638a63b45ddedfd65c15e3206d34e947a2b5d31e9aa8c55446d69a0291

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ 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('lmom')"           # [not win]
    - "\"%R%\" -e \"library('lmom')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=lmom
  license: CPL-1.0
  license_file: LICENSE
  summary: 'Functions related to L-moments: computation of L-moments and trimmed L-moments of distributions and data samples; parameter estimation; L-moment ratio diagram; plot vs. quantiles of an extreme-value distribution.'
  license_family: OTHER

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

# Package: lmom
# Version: 2.8
# Date: 2019-03-11
# Title: L-Moments
# Author: J. R. M. Hosking
# Maintainer: J. R. M. Hosking <jrmhosking@gmail.com>
# Description: Functions related to L-moments: computation of L-moments and trimmed L-moments of distributions and data samples; parameter estimation; L-moment ratio diagram; plot vs. quantiles of an extreme-value distribution.
# Depends: R (>= 3.0.0)
# Imports: stats, graphics
# License: Common Public License Version 1.0
# NeedsCompilation: yes
# Packaged: 2019-03-12 01:04:22 UTC; J
# Repository: CRAN
# Date/Publication: 2019-03-12 09:50:19 UTC
