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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/gWidgetstcltk_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gWidgetstcltk/gWidgetstcltk_{{ version }}.tar.gz
  sha256: 623b65466b10af5d6ea50219ec91e6d9f8f8855d281c79a85a472402710e2919

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

requirements:
  build:
  host:
    - r-base
    - r-digest
    - r-gwidgets >=0.0_51
    - tk >=8.5
    - r-tcltk2
    - r-codetools
  run:
    - r-base
    - r-digest
    - r-gwidgets >=0.0_51
    - tk >=8.5

test:
  commands:
    - xvfb-run -a bash -c "$R -e \"library('gWidgetstcltk')\""  # [linux]
    - $R -e "library('gWidgetstcltk')"  # [osx]
    - "\"%R%\" -e \"library('gWidgetstcltk')\""  # [win]

about:
  home: http://gwidgets.r-forge.r-project.org/
  license: GPL (>= 2)
  summary: Port of the gWidgets API to the tcltk package.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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