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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/OceanView_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/OceanView/OceanView_{{ version }}.tar.gz
  sha256: 2c5165975d6c49fdc83a892cb0406584928dd44000c9774fffc00fbd2fec86f3

build:
  merge_build_host: true  # [win]
  number: 0
  # no osx package for r-plot3drgl
  skip: true  # [win32 or osx]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - {{ cdt('mesa-libgl-devel') }}  # [linux]
    - {{ cdt('mesa-dri-drivers') }}  # [linux]
    - {{ cdt('libselinux') }}  # [linux]
    - {{ cdt('libxdamage') }}  # [linux]
    - {{ cdt('libxxf86vm') }}  # [linux]
  host:
    - r-base
    - r-plot3d
    - r-plot3drgl
    - r-rgl
    - r-shape
    - xorg-libxfixes  # [linux]
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-plot3d
    - r-plot3drgl
    - r-rgl
    - r-shape

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

about:
  home: https://CRAN.R-project.org/package=OceanView
  license: GPL-3.0-or-later
  summary: Functions for transforming and viewing 2-D and 3-D (oceanographic) data and model output.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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

# Package: OceanView
# Version: 1.0.4
# Title: Visualisation of Oceanographic Data and Model Output
# Author: Karline Soetaert <karline.soetaert@nioz.nl>
# Maintainer: Karline Soetaert <karline.soetaert@nioz.nl>
# Depends: plot3D, plot3Drgl, R (>= 3.2)
# Imports: methods, graphics, grDevices, stats, rgl, shape
# Description: Functions for transforming and viewing 2-D and 3-D (oceanographic) data and model output.
# License: GPL (>= 3.0)
# LazyData: yes
# Repository: CRAN
# Repository/R-Forge/Project: plot3d
# Repository/R-Forge/Revision: 115
# Repository/R-Forge/DateTimeStamp: 2016-01-18 12:47:55
# Date/Publication: 2016-01-18 22:27:33
# NeedsCompilation: yes
# Packaged: 2016-01-18 13:05:58 UTC; rforge
