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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/xts_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/xts/xts_{{ version }}.tar.gz
  sha256: d680584af946fc30be0b2046e838cff7b3a65e00df1eadba325ca5e96f3dca2c

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-zoo >=1.7_12
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-zoo >=1.7_12

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

about:
  home: https://github.com/joshuaulrich/xts
  license: GPL (>= 2)
  summary: Provide for uniform handling of R's different time-based data classes by extending zoo, maximizing native format information preservation and allowing for user level customization and extension, while simplifying cross-class interoperability.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: xts
# Type: Package
# Title: eXtensible Time Series
# Version: 0.11-2
# Authors@R: c( person(given=c("Jeffrey","A."), family="Ryan", role=c("aut","cph")), person(given=c("Joshua","M."), family="Ulrich", role=c("cre","aut"), email="josh.m.ulrich@gmail.com"), person(given="Ross", family="Bennett", role="ctb"), person(given="Corwin", family="Joy", role="ctb") )
# Depends: zoo (>= 1.7-12)
# Imports: methods
# LinkingTo: zoo
# Suggests: timeSeries, timeDate, tseries, chron, fts, tis, RUnit
# LazyLoad: yes
# Description: Provide for uniform handling of R's different time-based data classes by extending zoo, maximizing native format information preservation and allowing for user level customization and extension, while simplifying cross-class interoperability.
# License: GPL (>= 2)
# URL: https://github.com/joshuaulrich/xts
# BugReports: https://github.com/joshuaulrich/xts/issues
# NeedsCompilation: yes
# Packaged: 2018-11-05 13:26:13 UTC; josh
# Author: Jeffrey A. Ryan [aut, cph], Joshua M. Ulrich [cre, aut], Ross Bennett [ctb], Corwin Joy [ctb]
# Maintainer: Joshua M. Ulrich <josh.m.ulrich@gmail.com>
# Repository: CRAN
# Date/Publication: 2018-11-05 14:10:03 UTC
