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

github.setup        tursodatabase libsql 0.5.0 libsql-rs-v
github.tarball_from archive
revision            0

homepage            https://libsql.org

description         \
    Fork of SQLite that is both Open Source, and Open Contributions.

long_description    \
    ${name} is an open source, open contribution fork of SQLite. We aim to \
    evolve it to suit many more use cases than SQLite was originally designed \
    for, and plan to use third-party OSS code wherever it makes sense. \
    ${name} will always be compatible with the SQLite file format. ${name} \
    will keep 100% compatibility with the SQLite API, but we may add \
    additional APIs. SQLite is an embedded database that can be consumed as a \
    single .c file with its accompanying header. ${name} will always be \
    embeddable, meaning it runs inside your process without needing a network \
    connection. But we may change the distribution, so that object files are \
    generated, instead of a single .c file.

categories          databases devel
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

conflicts           sqlite3

checksums           rmd160  2962147a64cba57928c02157eb3761fea54bd4ca \
                    sha256  cd0703768f821d8ead45069c7b1c8fb1f925d730facd57da75acec4bf36d08bb \
                    size    29020412

worksrcdir          ${worksrcpath}/libsql-sqlite3

# Use 8-byte pointer on ppc64:
# https://github.com/tursodatabase/libsql/pull/1861
patchfiles          0001-sqliteInt.h-fix-pointer-size-for-ppc64.patch

depends_lib-append  port:libedit \
                    port:ncurses \
                    port:zlib

# sqlite3.h:13483: error: redefinition of typedef ‘sqlite3_pcache_page’
compiler.c_standard 2011

test.run            yes
