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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/pixmap_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/pixmap/pixmap_{{ version }}.tar.gz
  sha256: 893ba894d4348ba05e6edf9c1b4fd201191816b444a214f7a6b2c0a79b0a2aec

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

requirements:
  build:
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=pixmap
  license: GPL-2.0-only
  summary: Functions for import, export, plotting and other manipulations of bitmapped images.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
