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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rtiff_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rtiff/rtiff_{{ version }}.tar.gz
  sha256: 9ec7c097d44163db5bf6cc9d0749a6d3da4f9f54172d987e3afe9b1fe2cce426

build:
  merge_build_host: True  # [win]
  number: 1
  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
    - r-pixmap
    - libtiff
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-pixmap
    - libtiff

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

about:
  home: https://CRAN.R-project.org/package=rtiff
  license: GPL-3
  summary: Reads and writes TIFF format images and returns them as a pixmap object. Because the
    resulting object can be very large for even modestly sized TIFF images, images can
    be reduced as they are read for improved performance.  This package is a wrapper
    around libtiff (www.libtiff.org), on which it depends (i.e. the libtiff shared library
    must be on your PATH for the binary to work, and tiffio.h must be on your system
    to build the package from source). By using libtiff's highlevel TIFFReadRGBAImage
    function, this package inherently supports a wide range of image formats and compression
    schemes. This package also provides an implementation of the Ridler Autothresholding
    algorithm for easy generation of binary masks as described in Ridler & Calvard (1978)
    <doi:10.1109/TSMC.1978.4310039>.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: rtiff
# Type: Package
# Title: Read and Write TIFF Files
# Version: 1.4.6
# Date: 2019-03-20
# Depends: pixmap
# Author: Eric Kort <eric.kort@vai.org>
# Maintainer: Eric Kort <eric.kort@vai.org>
# SystemRequirements: libtiff
# Description: Reads and writes TIFF format images and returns them as a pixmap object. Because the resulting object can be very large for even modestly sized TIFF images, images can be reduced as they are read for improved performance.  This package is a wrapper around libtiff (www.libtiff.org), on which it depends (i.e. the libtiff shared library must be on your PATH for the binary to work, and tiffio.h must be on your system to build the package from source). By using libtiff's highlevel TIFFReadRGBAImage function, this package inherently supports a wide range of image formats and compression schemes. This package also provides an implementation of the Ridler Autothresholding algorithm for easy generation of binary masks as described in Ridler & Calvard (1978) <doi:10.1109/TSMC.1978.4310039>.
# License: GPL-3
# Packaged: 2019-03-21 15:45:20 UTC; erikor
# Repository: CRAN
# Date/Publication: 2019-03-21 17:10:23 UTC
# NeedsCompilation: yes
