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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/parsedate_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/parsedate/parsedate_{{ version }}.tar.gz
  sha256: 39ab3c507cb3efcd677c6cf453f46d6b1948662bd70c7765845e755ea1e1633d

build:
  merge_build_host: True  # [win]
  number: 2
  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-rematch2
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rematch2

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

about:
  home: https://github.com/gaborcsardi/parsedate
  license: GPL-2
  summary: Parse dates automatically, without the need of specifying a format. Currently it includes
    the git date parser. It can also recognize and parse all ISO 8601 formats.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: parsedate
# Title: Recognize and Parse Dates in Various Formats, Including All ISO 8601 Formats
# Version: 1.2.0
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Author: Gabor Csardi, Linus Torvalds
# Description: Parse dates automatically, without the need of specifying a format. Currently it includes the git date parser. It can also recognize and parse all ISO 8601 formats.
# License: GPL-2
# LazyData: true
# Imports: rematch2
# Suggests: covr, testthat, withr
# URL: https://github.com/gaborcsardi/parsedate
# BugReports: https://github.com/gaborcsardi/parsedate/issues
# RoxygenNote: 6.1.1
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-05-08 13:19:59 UTC; gaborcsardi
# Repository: CRAN
# Date/Publication: 2019-05-08 14:00:03 UTC
