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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/kvh_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/kvh/kvh_{{ version }}.tar.gz
  sha256: 28b2eed7dfbccddbc30bab6dac8d10dd299816065631c8527a4fb2fdb2b8a753

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

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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-rcpp >=0.12.12
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.12.12

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

about:
  home: http://serguei.sokol.free.fr/kvh-format/
  license: GPL-2.0-or-later
  summary: The format KVH is a lightweight format that can be read/written both by humans and machines. It can be useful in situations where XML or alike formats seem to be an overkill. We provide an ability to parse KVH files in R pretty fast due to 'Rcpp' use.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2
extra:
  recipe-maintainers:
    - conda-forge/r
    - sgsokol

# Package: kvh
# Type: Package
# Title: Read/Write Files in Key-Value-Hierarchy Format
# Version: 1.4.1
# Date: 2019-04-28
# Author: Serguei Sokol
# Maintainer: Serguei Sokol <sokol@insa-toulouse.fr>
# Description: The format KVH is a lightweight format that can be read/written both by humans and machines. It can be useful in situations where XML or alike formats seem to be an overkill. We provide an ability to parse KVH files in R pretty fast due to 'Rcpp' use.
# URL: http://serguei.sokol.free.fr/kvh-format/
# BugReports: https://github.com/sgsokol/kvh/issues
# License: GPL (>= 2)
# Imports: Rcpp (>= 0.12.12)
# LinkingTo: Rcpp
# Suggests: testthat
# NeedsCompilation: yes
# Biarch: yes
# RoxygenNote: 6.1.1
# Encoding: UTF-8
# Packaged: 2019-04-29 07:49:04 UTC; sokol
# Repository: CRAN
# Date/Publication: 2019-04-29 19:30:03 UTC
