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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/gdalcubes_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gdalcubes/gdalcubes_{{ version }}.tar.gz
  sha256: 51920fb6e25e359f6ec25ac4ee8301c7d1361490c7d514ee9973e8bbe8b50f16

build:
  merge_build_host: true  # [win]
  number: 2
  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]
  host:
    - r-base
    - r-rcpp
    - r-rcppprogress
    - r-jsonlite
    - r-ncdf4
    - libnetcdf  # [not win]
    - libgdal  # [not win]
    - proj  # [not win]
    - tiledb  # [not win]
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rcppprogress
    - r-jsonlite
    - r-ncdf4
    - libnetcdf  # [not win]
    - libgdal  # [not win]
    - proj  # [not win]
    - tiledb  # [not win]

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

about:
  home: https://github.com/appelmar/gdalcubes_R
  license: MIT
  summary: Processing collections of Earth observation images as on-demand multispectral, multitemporal raster data cubes. Users define cubes by spatiotemporal extent, resolution, and spatial reference system and let 'gdalcubes' automatically apply cropping, reprojection, and resampling using the 'Geospatial Data Abstraction
    Library' ('GDAL'). Implemented functions on data cubes include reduction over space and time, applying arithmetic expressions on pixel band values, moving window aggregates over time, filtering by space, time, bands, and predicates on pixel values, exporting data cubes as 'netCDF' or 'GeoTIFF' files, and plotting.  The
    package implements lazy evaluation and multithreading. All computational parts are implemented in C++, linking to the 'GDAL', 'netCDF', 'CURL', and 'SQLite' libraries. See Appel and Pebesma (2019) <doi:10.3390/data4030092> for further details.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: gdalcubes
# Title: Earth Observation Data Cubes from Satellite Image Collections
# Version: 0.3.1
# Date: 2020-08-25
# Authors@R: c( person(given = "Marius", family = "Appel", role = c("aut", "cre"), email = "marius.appel@uni-muenster.de", comment = c(ORCID = "0000-0001-5281-3896")), person(given = "Edzer", family = "Pebesma", role = "ctb", comment = c(ORCID = "0000-0001-8049-7069")), person(given = "Roger", family = "Bivand", role = "ctb"), person(given = "Lewis", family = "Van Winkle", role = "cph"), person(given = "Ole Christian", family = "Eidheim", role = "cph"), person(given = "Howard", family = "Hinnant", role = "cph"), person(given = "Adrian", family = "Colomitchi", role = "cph"), person(given = "Florian", family = "Dang", role = "cph"), person(given = "Paul", family = "Thompson", role = "cph"), person(given = "Tomasz", family = "Kaminski", role = "cph"), person(given = "Dropbox, Inc.", role = "cph"))
# Description: Processing collections of Earth observation images as on-demand multispectral, multitemporal raster data cubes. Users define cubes by spatiotemporal extent, resolution, and spatial reference system and let 'gdalcubes' automatically apply cropping, reprojection, and resampling using the 'Geospatial Data Abstraction Library' ('GDAL'). Implemented functions on data cubes include reduction over space and time, applying arithmetic expressions on pixel band values, moving window aggregates over time, filtering by space, time, bands, and predicates on pixel values, exporting data cubes as 'netCDF' or 'GeoTIFF' files, and plotting.  The package implements lazy evaluation and multithreading. All computational parts are implemented in C++, linking to the 'GDAL', 'netCDF', 'CURL', and 'SQLite' libraries. See Appel and Pebesma (2019) <doi:10.3390/data4030092> for further details.
# Depends: R (>= 3.4)
# Imports: Rcpp, RcppProgress, jsonlite, ncdf4
# License: MIT + file LICENSE
# URL: https://github.com/appelmar/gdalcubes_R
# BugReports: https://github.com/appelmar/gdalcubes_R/issues/
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 7.1.1
# LinkingTo: Rcpp, RcppProgress
# Suggests: knitr, magrittr, rmarkdown, stars, magick, sf
# VignetteBuilder: knitr
# Copyright: file inst/COPYRIGHTS
# NeedsCompilation: yes
# SystemRequirements: cxx11, gdal, libgdal, libproj, netcdf4
# Packaged: 2020-08-25 10:32:37 UTC; marius
# Author: Marius Appel [aut, cre] (<https://orcid.org/0000-0001-5281-3896>), Edzer Pebesma [ctb] (<https://orcid.org/0000-0001-8049-7069>), Roger Bivand [ctb], Lewis Van Winkle [cph], Ole Christian Eidheim [cph], Howard Hinnant [cph], Adrian Colomitchi [cph], Florian Dang [cph], Paul Thompson [cph], Tomasz Kaminski [cph], Dropbox, Inc. [cph]
# Maintainer: Marius Appel <marius.appel@uni-muenster.de>
# Repository: CRAN
# Date/Publication: 2020-08-27 11:40:16 UTC
