{% set version = '1.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/IM_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/IM/IM_{{ version }}.tar.gz
  sha256: 9d01fa8f3ac864744b7a73b33aa2f6de2fdef794d3d15a7b615659ec7ec93bb8

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  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]

  host:
    - r-base
    - r-bmp >=0.1
    - r-jpeg >=0.1_2
    - r-png >=0.1_4

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-bmp >=0.1
    - r-jpeg >=0.1_2
    - r-png >=0.1_4

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('IM')"           # [not win]
    - "\"%R%\" -e \"library('IM')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://CRAN.R-project.org/package=IM
  license: GPL-2
  summary: Compute moments of images and perform reconstruction from moments.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Package: IM
# Type: Package
# Title: Orthogonal Moment Analysis
# Version: 1.0
# Date: 2012-07-18
# Author: Bartek Rajwa, Murat Dundar, Allison Irvine, Tan Dang
# Maintainer: Allison Irvine <a.irvine2@gmail.com>
# Contact: Tan Dang <dangt@purdue.edu>, Bartek Rajwa <rajwa@cyto.purdue.edu>
# Description: Compute moments of images and perform reconstruction from moments.
# License: GPL (>= 2)
# LazyLoad: yes
# Depends: R (>= 2.10.0),png (>= 0.1-4),jpeg (>= 0.1-2),bmp (>= 0.1), methods
# Collate: ImageClass.R MethodDefinitions.R ComplexImageClass.R OrthogonalImageClass.R MultipleImagesClass.R OrthMoments.R MultiCmplxWrapper.R gpzmWrapper.R frWrapper.R fmWrapper.R fcWrapper.R
# Packaged: 2013-03-06 17:09:30 UTC; me
# NeedsCompilation: yes
# Repository: CRAN
# Date/Publication: 2013-03-06 18:46:11

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
