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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/units_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/units/units_{{ version }}.tar.gz
  sha256: 9c46fe138e8c1c3d3a51268776412f02d09673656516148cccb71b1071beb21a

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-rcpp                     # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp
    - udunits2
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - udunits2

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

about:
  home: https://github.com/r-quantities/units/
  license: GPL-2.0-only
  summary: "Support for measurement units in R vectors, matrices and arrays: automatic propagation, conversion, derivation and simplification of units; raising errors in case of unit incompatibility. Compatible with the POSIXct, Date and difftime  classes. Uses the UNIDATA udunits library and unit database for  unit compatibility\
    \ checking and conversion. Documentation about 'units' is provided in the paper by Pebesma, Mailund & Hiebert (2016, <doi:10.32614/RJ-2016-061>), included in this package as a vignette; see 'citation(\"units\")' for details."
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: units
# Version: 0.6-4
# Title: Measurement Units for R Vectors
# Authors@R: c(person("Edzer", "Pebesma", role = c("aut", "cre"), email = "edzer.pebesma@uni-muenster.de", comment = c(ORCID = "0000-0001-8049-7069")), person("Thomas", "Mailund", role = "aut", email = "mailund@birc.au.dk"), person("Tomasz", "Kalinowski", role = "aut"), person("James", "Hiebert", role = "ctb"), person("Inaki", "Ucar", role = "ctb", email = "iucar@fedoraproject.org", comment = c(ORCID = "0000-0001-6403-5550")) )
# Depends: R (>= 3.0.2)
# Imports: Rcpp
# LinkingTo: Rcpp (>= 0.12.10)
# Suggests: udunits2, NISTunits, measurements, xml2, tibble, pillar (>= 1.3.0), knitr, testthat, ggforce, rmarkdown, magrittr
# VignetteBuilder: knitr
# Description: Support for measurement units in R vectors, matrices and arrays: automatic propagation, conversion, derivation and simplification of units; raising errors in case of unit incompatibility. Compatible with the POSIXct, Date and difftime  classes. Uses the UNIDATA udunits library and unit database for  unit compatibility checking and conversion. Documentation about 'units' is provided in the paper by Pebesma, Mailund & Hiebert (2016, <doi:10.32614/RJ-2016-061>), included in this package as a vignette; see 'citation("units")' for details.
# SystemRequirements: udunits-2
# License: GPL-2
# URL: https://github.com/r-quantities/units/
# BugReports: https://github.com/r-quantities/units/issues/
# RoxygenNote: 6.1.1
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-08-22 05:40:44 UTC; edzer
# Author: Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Thomas Mailund [aut], Tomasz Kalinowski [aut], James Hiebert [ctb], Inaki Ucar [ctb] (<https://orcid.org/0000-0001-6403-5550>)
# Maintainer: Edzer Pebesma <edzer.pebesma@uni-muenster.de>
# Repository: CRAN
# Date/Publication: 2019-08-22 06:30:02 UTC
