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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rgl_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rgl/rgl_{{ version }}.tar.gz
  sha256: 033af3aceade6c21d0a602958fff1c25c21febc7d0e867cf88860cfa25fc3c65

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 }}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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]    
    - {{ cdt('xorg-x11-proto-devel') }}  # [linux]
    - {{ cdt('mesa-libgl-devel') }}      # [linux]
    - {{ cdt('libx11-devel') }}          # [linux]
    - {{ cdt('libxext-devel') }}         # [linux]
    - {{ cdt('libxrender-devel') }}      # [linux]
    - {{ cdt('mesa-libgl-devel') }}      # [linux]
    - {{ cdt('mesa-libegl-devel') }}     # [linux]
    - {{ cdt('mesa-dri-drivers') }}      # [linux]
    - {{ cdt('libxau-devel') }}          # [linux]
    - {{ cdt('libdrm-devel') }}          # [linux]
    - {{ cdt('libxcomposite-devel') }}   # [linux]
    - {{ cdt('libxcursor-devel') }}      # [linux]
    - {{ cdt('libxi-devel') }}           # [linux]
    - {{ cdt('libxrandr-devel') }}       # [linux]
    - {{ cdt('libxscrnsaver-devel') }}   # [linux]
    - {{ cdt('libxtst-devel') }}         # [linux]
    - {{ cdt('libselinux-devel') }}      # [linux]
    - {{ cdt('libselinux') }}            # [linux]
    - {{ cdt('libxdamage') }}            # [linux]
    - {{ cdt('libxfixes') }}             # [linux]
    - {{ cdt('libxxf86vm') }}            # [linux]
    - {{ cdt('libxcb') }}                # [linux]
    - {{ cdt('libxext') }}               # [linux]
    - {{ cdt('expat') }}                 # [linux]
  host:
    - r-base
    - r-crosstalk
    - r-htmltools
    - r-htmlwidgets
    - r-jsonlite >=0.9.20
    - r-knitr
    - r-magrittr
    - r-manipulatewidget >=0.9.0
    - r-shiny
    - expat                              # [linux]
    - freetype                           # [not win]
    - libglu                             # [linux]
    - libpng                             # [not win]
    - {{ native }}libpng                   # [win]
    - xorg-libxfixes  # [linux]
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-crosstalk
    - r-htmltools
    - r-htmlwidgets
    - r-jsonlite >=0.9.20
    - r-knitr
    - r-magrittr
    - r-manipulatewidget >=0.9.0
    - r-shiny
    - expat                              # [linux]
    - libglu                             # [linux]
    - {{ native }}libpng                   # [win]

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

about:
  home: https://r-forge.r-project.org/projects/rgl/
  license: GPL-2.0-or-later
  summary: Provides medium to high level functions for 3D interactive graphics, including functions modelled on base graphics (plot3d(), etc.) as well as functions for constructing representations of geometric objects (cube3d(), etc.).  Output may be on screen using OpenGL, or to various standard 3D file formats including
    WebGL, PLY, OBJ, STL as well as 2D image formats, including PNG, Postscript, SVG, PGF.
  license_family: GPL
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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

# Package: rgl
# Version: 0.105.13
# Title: 3D Visualization Using OpenGL
# Author: Daniel Adler <dadler@uni-goettingen.de>, Duncan Murdoch <murdoch.duncan@gmail.com>, and others (see README)
# Maintainer: Duncan Murdoch <murdoch.duncan@gmail.com>
# Depends: R (>= 3.3.0)
# Suggests: MASS, rmarkdown, deldir, orientlib, lattice, misc3d,
#         rstudioapi, magick, plotrix (>= 3.7-3), tripack, interp,
#         alphashape3d, tcltk, js (>= 1.2), akima, webshot2
# Imports: graphics, grDevices, stats, utils, htmlwidgets, htmltools,
#         knitr, jsonlite (>= 0.9.20), shiny, magrittr, crosstalk,
#         manipulateWidget (>= 0.9.0)
# Description: Provides medium to high level functions for 3D interactive graphics, including
#     functions modelled on base graphics (plot3d(), etc.) as well as functions for
#     constructing representations of geometric objects (cube3d(), etc.).  Output
#     may be on screen using OpenGL, or to various standard 3D file formats including
#     WebGL, PLY, OBJ, STL as well as 2D image formats, including PNG, Postscript, SVG, PGF.
# License: GPL
# URL: https://github.com/dmurdoch/rgl
# SystemRequirements: OpenGL, GLU Library, XQuartz (on OSX), zlib
#         (optional), libpng (>=1.2.9, optional), FreeType (optional),
#         pandoc (>=1.14, needed for vignettes)
# BugReports: https://github.com/dmurdoch/rgl/issues
# VignetteBuilder: knitr
# Additional_repositories: https://dmurdoch.github.io/drat
# NeedsCompilation: yes
# Packaged: 2021-02-15 14:55:17 UTC; murdoch
# Repository: CRAN
# Date/Publication: 2021-02-15 16:10:02 UTC
