# -*- 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

R.setup             cran apache adbcpostgresql 0.22.0
revision            1
categories-append   databases
maintainers         nomaintainer
license             Apache-2
description         Arrow Database Connectivity (ADBC) SQLite driver
long_description    {*}${description}
homepage            https://github.com/apache/arrow-adbc
checksums           rmd160  5ada5fc1e83128783501d053a11164856335e9a5 \
                    sha256  971ccd807614c2dc7435fbe19fc0c2077d728a97c46bc4442de2ff354e83b11c \
                    size    495814

# Keep in sync with R-RPostgres and R-RPostgreSQL, so that we do not need multiple postgresql ports.
# Make sure a chosen version is supported for all archs, including powerpc.
set pgsql_v         17

depends_lib-append  port:postgresql${pgsql_v} \
                    port:R-adbcdrivermanager

# PKG_LIBS is not redundant here:
build.args-append   --configure-vars=' \
                        PKG_LIBS=-lpq \
                        INCLUDE_DIR=${prefix}/include/postgresql${pgsql_v} \
                        LIB_DIR=${prefix}/lib/postgresql${pgsql_v} '

depends_test-append port:R-nanoarrow \
                    port:R-testthat

test.run            no
