{% set version = "0.2.9" %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RcppCCTZ_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RcppCCTZ/RcppCCTZ_{{ version }}.tar.gz
  sha256: 723f45eca1be08903234e339523daca35748fe65c1a9d59afcb583d3a17bcaae

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: tinytest
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 >=0.11.0

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

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('RcppCCTZ')"           # [not win]
    - "\"%R%\" -e \"library('RcppCCTZ')\""  # [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/eddelbuettel/rcppcctz

  summary: "'Rcpp' Access to the 'CCTZ' timezone library is provided. 'CCTZ' is a C++ library for translating between absolute and civil times using the rules of a time zone. The 'CCTZ' source code, released under the Apache 2.0 License, is included in this package. See <https://github.com/google/cctz> for more details."

  license: GPL-2.0-or-later
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2
    - CCTZ_LICENSE.txt

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

# The original CRAN metadata for this package was:

# Package: RcppCCTZ
# Type: Package
# Title: 'Rcpp' Bindings for the 'CCTZ' Library
# Version: 0.2.7
# Date: 2020-03-18
# Author: Dirk Eddelbuettel
# Maintainer: Dirk Eddelbuettel <edd@debian.org>
# Description: 'Rcpp' Access to the 'CCTZ' timezone library is provided. 'CCTZ' is a C++ library for translating between absolute and civil times using the rules of a time zone. The 'CCTZ' source code, released under the Apache 2.0 License, is included in this package. See <https://github.com/google/cctz> for more details.
# License: GPL (>= 2)
# Imports: Rcpp (>= 0.11.0)
# Suggests: tinytest
# LinkingTo: Rcpp
# SystemRequirements: A 64-bit POSIX OS such as Linux or OS X with IANA time zone data in /usr/share/zoneinfo as well as a recent-enough C++11 compiler (such as g++-4.9 or later which is preferred, g++-4.8 works too). On Windows the zoneinfo included with R is used; and time parsing support is enabled via a backport of std::get_time from the LLVM libc++ library.
# URL: https://github.com/eddelbuettel/rcppcctz
# BugReports: https://github.com/eddelbuettel/rcppcctz/issues
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2020-03-18 20:33:04.369576 UTC; edd
# Repository: CRAN
# Date/Publication: 2020-03-18 21:40:02 UTC

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