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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/Cairo_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Cairo/Cairo_{{ version }}.tar.gz
  sha256: dd524105c83b82b5c3b3ee2583ef90d4cafa54b0c29817dac48b425b79f90f92
  patches:
    - configure.win.patch

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [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
    - cairo >=1.2
    - xorg-libxt                 # [not win]

  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - cairo >=1.2
    - xorg-libxt                 # [not win]

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

about:
  home: http://www.rforge.net/Cairo/
  license: GPL-2.0
  summary: R graphics device using cairographics library that can be used to create high-quality vector (PDF, PostScript and SVG) and bitmap output (PNG,JPEG,TIFF), and high-quality rendering in displays (X11 and Win32). Since it uses the same back-end for all output, copying across formats is WYSIWYG. Files are created
    without the dependence on X11 or other external programs. This device supports alpha channel (semi-transparent drawing) and resulting images can contain transparent and semi-transparent regions. It is ideal for use in server environments (file output) and as a replacement for other devices that don't have Cairo's capabilities
    such as alpha support or anti-aliasing. Backends are modular such that any subset of backends is supported.
  license_family: GPL2
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: Cairo
# Version: 1.5-10
# Title: R Graphics Device using Cairo Graphics Library for Creating High-Quality Bitmap (PNG, JPEG, TIFF), Vector (PDF, SVG, PostScript) and Display (X11 and Win32) Output
# Author: Simon Urbanek <Simon.Urbanek@r-project.org>, Jeffrey Horner <jeff.horner@vanderbilt.edu>
# Maintainer: Simon Urbanek <Simon.Urbanek@r-project.org>
# Depends: R (>= 2.4.0)
# Imports: grDevices, graphics
# Suggests: png
# Enhances: FastRWeb
# Description: R graphics device using cairographics library that can be used to create high-quality vector (PDF, PostScript and SVG) and bitmap output (PNG,JPEG,TIFF), and high-quality rendering in displays (X11 and Win32). Since it uses the same back-end for all output, copying across formats is WYSIWYG. Files are created without the dependence on X11 or other external programs. This device supports alpha channel (semi-transparent drawing) and resulting images can contain transparent and semi-transparent regions. It is ideal for use in server environments (file output) and as a replacement for other devices that don't have Cairo's capabilities such as alpha support or anti-aliasing. Backends are modular such that any subset of backends is supported.
# License: GPL-2
# SystemRequirements: cairo (>= 1.2 http://www.cairographics.org/)
# URL: http://www.rforge.net/Cairo/
# NeedsCompilation: yes
# Packaged: 2019-03-27 21:32:25 UTC; svnuser
# Repository: CRAN
# Date/Publication: 2019-03-28 20:00:37 UTC
