{% set version = "0.3.0" %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/timechange_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/timechange/timechange_{{ version }}.tar.gz
  sha256: d85c0b5514ab9578d16032e703c33f197feaed1a424c834ebfcbf0ad46ae46b4

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-cpp11                    # [build_platform != target_platform]
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-cpp11                    # [build_platform != target_platform]
    - {{ 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-cpp11 >=0.2.7

  run:
    - r-base
    - {{ native }}gcc-libs  # [win]
    - r-cpp11 >=0.2.7

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

about:
  home: https://github.com/vspinu/timechange/
  license: GPL-3.0-only AND Apache-2.0
  summary: Efficient routines for manipulation of date-time objects while accounting for time-zones and daylight saving times. The package includes utilities for updating of date-time components (year, month, day etc.), modification of time-zones, rounding of date-times, period addition and subtraction etc. Parts of the
    'CCTZ' source code, released under the Apache 2.0 License, are included in this package. See <https://github.com/google/cctz> for more details.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3
    - cctz_LICENSE.txt

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

# The original CRAN metadata for this package was:

# Package: timechange
# Title: Efficient Manipulation of Date-Times
# Version: 0.1.1
# Authors@R: c(person("Vitalie", "Spinu", email = "spinuvit@gmail.com", role = c("aut", "cre")), person("Google Inc.", role = c("ctb", "cph")))
# Description: Efficient routines for manipulation of date-time objects while accounting for time-zones and daylight saving times. The package includes utilities for updating of date-time components (year, month, day etc.), modification of time-zones, rounding of date-times, period addition and subtraction etc. Parts of the 'CCTZ' source code, released under the Apache 2.0 License, are included in this package. See <https://github.com/google/cctz> for more details.
# Depends: R (>= 3.3)
# License: GPL-3
# Encoding: UTF-8
# LinkingTo: cpp11 (>= 0.2.7)
# Suggests: testthat, knitr
# SystemRequirements: A system with zoneinfo data (e.g. /usr/share/zoneinfo) as well as a recent-enough C++11 compiler (such as g++-4.8 or later). On Windows the zoneinfo included with R is used.
# BugReports: https://github.com/vspinu/timechange/issues
# URL: https://github.com/vspinu/timechange/
# RoxygenNote: 7.2.1
# NeedsCompilation: yes
# Packaged: 2022-11-03 15:35:39 UTC; vspinu
# Author: Vitalie Spinu [aut, cre], Google Inc. [ctb, cph]
# Maintainer: Vitalie Spinu <spinuvit@gmail.com>
# Repository: CRAN
# Date/Publication: 2022-11-04 15:30:02 UTC

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