# -*- 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           openssl 1.0
PortGroup           R 1.0

# GitHub version is old.
R.setup             cran r-spatial sf 1.0-14
revision            2
categories-append   math
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             {GPL-2 MIT}
description         Simple features for R
long_description    {*}${description}
homepage            https://r-spatial.github.io/sf
checksums           rmd160  a53d5bcba73f92ab78d44f59f9a975f19aadc7ba \
                    sha256  8b535648d537a1a95920c938e43692c1dfaac8d293ff3f506334001352c339f7 \
                    size    3488161

depends_build-append \
                    port:pkgconfig
depends_lib-append  path:lib/proj5/lib/pkgconfig/proj.pc:proj \
                    port:gdal \
                    port:geos \
                    port:R-classInt \
                    port:R-DBI \
                    port:R-magrittr \
                    port:R-Rcpp \
                    port:R-s2 \
                    port:R-units \
                    port:sqlite3

destroot.pre_args-append \
                    --configure-args=' \
                        --with-proj-include=${prefix}/lib/proj5/include \
                        --with-proj-lib=${prefix}/lib/proj5/lib \
                        --with-proj-share=${prefix}/lib/proj5/share/proj \
                        --with-proj-api=yes \
                        --with-sqlite3-lib=${prefix}/lib \
                        '
