# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           R 1.0

# Revert to GitHub once updated there.
R.setup             cran USDAForestService gdalraster 2.4.0
revision            1
categories-append   gis
maintainers         nomaintainer
license             MIT
description         Bindings to the Geospatial Data Abstraction Library Raster API
long_description    {*}${description}
homepage            https://usdaforestservice.github.io/gdalraster
checksums           rmd160  030644ea401381bf751cb14fa9f61e33176f618f \
                    sha256  b6852dde583f1d345eb598b9d165f2d35289473e84d5721a8d72167914b65631 \
                    size    3040295
# github.tarball_from archive

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:gdal-R \
                    port:R-bit64 \
                    port:R-nanoarrow \
                    port:R-Rcpp \
                    port:R-RcppInt64 \
                    port:R-wk \
                    port:R-xml2 \
                    port:R-yyjsonr

set deproot         ${prefix}/libexec/R

build.args-append   --configure-args="--with-gdal-config=${deproot}/gdal/bin/gdal-config"

depends_test-append port:R-gt \
                    port:R-knitr \
                    port:R-rmarkdown \
                    port:R-scales \
                    port:R-testthat

# Rather install it first and run tests from within R session.
test.run            no
