{% set version = '0.13.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: 2c3907c6d0162e48d1898647105bbb32cfe0cb005788481a64ee675a941d825d

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: timeSeries, timeDate, tseries, chron, tinytest
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:
    # You can put additional test commands to be run here.
    - $R -e "library('xts')"           # [not win]
    - "\"%R%\" -e \"library('xts')\""  # [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://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: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: xts
# Type: Package
# Title: eXtensible Time Series
# Version: 0.13.1
# 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: R (>= 3.6.0), zoo (>= 1.7-12)
# Imports: methods
# LinkingTo: zoo
# Suggests: timeSeries, timeDate, tseries, chron, tinytest
# 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: 2023-04-15 18:17:57 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: 2023-04-16 20:50:02 UTC

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