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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/qpdf_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/qpdf/qpdf_{{ version }}.tar.gz
  sha256: 71f106925aeffcf3cae500aad5f9306b64a9ed963540ec1d77a161c49975960e

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [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
    - r-askpass
    - r-curl
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-askpass
    - r-curl

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

about:
  home: https://github.com/ropensci/qpdf (devel), http://qpdf.sourceforge.net/ (upstream)
  license: Apache-2.0
  summary: "Content-preserving transformations transformations of PDF files such  as split, combine, and compress. This package interfaces directly to the 'qpdf'  C++ API and does not require any command line utilities. Note that 'qpdf' does not read actual content from PDF files: to extract text and data you need the 'pdftools'\
    \ package."
  license_family: Apache
  license_file: LICENSE.md

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

# Package: qpdf
# Type: Package
# Title: Split, Combine and Compress PDF Files
# Version: 1.1
# Authors@R: c(person("Jeroen", "Ooms", role = c("aut", "cre"),  email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289")), person("Jay Berkenbilt", role = "cph", comment = "Author of libqpdf"))
# Description: Content-preserving transformations transformations of PDF files such  as split, combine, and compress. This package interfaces directly to the 'qpdf'  C++ API and does not require any command line utilities. Note that 'qpdf' does not read actual content from PDF files: to extract text and data you need the 'pdftools' package.
# License: Apache License 2.0
# URL: https://github.com/ropensci/qpdf (devel), http://qpdf.sourceforge.net/ (upstream)
# BugReports: https://github.com/ropensci/qpdf/issues
# Encoding: UTF-8
# LazyData: true
# Imports: Rcpp, askpass, curl
# LinkingTo: Rcpp
# RoxygenNote: 6.1.1
# Suggests: testthat
# NeedsCompilation: yes
# Packaged: 2019-03-06 15:53:35 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Jay Berkenbilt [cph] (Author of libqpdf)
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2019-03-07 10:50:04 UTC
