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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rayimage_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rayimage/rayimage_{{ version }}.tar.gz
  sha256: bffcabf25b2614a6802fddfcbca92dc7896d1f46edf6d6807dc8eebe20271afe

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
    - r-rcpparmadillo
    - r-jpeg
    - r-magrittr
    - r-png
    - r-progress
    - r-raster
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rcpparmadillo
    - r-jpeg
    - r-magrittr
    - r-png
    - r-progress
    - r-raster

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

about:
  home: https://www.rayimage.dev, https://github.com/tylermorganwall/rayimage
  license: GPL-3.0-only
  summary: Uses convolution-based techniques to generate simulated camera bokeh, depth of field, and other camera effects, using an image and an optional depth map. Accepts both filename inputs and in-memory array representations of images and matrices. Includes functions to perform 2D convolutions, reorient and resize images/matrices,
    add image overlays, generate camera vignette effects, and add titles to images.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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

# Package: rayimage
# Type: Package
# Title: Image Processing for Simulated Cameras
# Version: 0.3.1
# Author: Tyler Morgan-Wall
# Maintainer: Tyler Morgan-Wall <tylermw@gmail.com>
# Description: Uses convolution-based techniques to generate simulated camera bokeh, depth of field, and other camera effects, using an image and an optional depth map. Accepts both filename inputs and in-memory array representations of images and matrices. Includes functions to perform 2D convolutions, reorient and resize images/matrices, add image overlays, generate camera vignette effects, and add titles to images.
# License: GPL-3.0-only
# LazyData: true
# Depends: R (>= 3.0.2)
# Imports: Rcpp, raster, png, magrittr, jpeg, grDevices
# Suggests: magick
# LinkingTo: Rcpp, RcppArmadillo, progress
# RoxygenNote: 7.1.0
# URL: https://www.rayimage.dev, https://github.com/tylermorganwall/rayimage
# BugReports: https://github.com/tylermorganwall/rayimage/issues
# NeedsCompilation: yes
# Packaged: 2020-06-28 15:18:34 UTC; tyler
# Repository: CRAN
# Date/Publication: 2020-06-28 20:00:02 UTC
