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

# When updating this port, make sure to update tvision as well.
github.setup        magiblot turbo e1bc1afffe4059c28517bdc7d17fb97d8d9cff89
version             2026.01.13
revision            0
categories          editors sysutils
license             MIT
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         Experimental text editor based on Scintilla and Turbo Vision
long_description    Turbo is an experimental text editor for the terminal, \
                    based on the Scintilla code editing component by Neil Hodgson \
                    and the Turbo Vision application framework.
checksums           rmd160  4c6e39731505c5b7e509f14e128622aec3f2c9ee \
                    sha256  ca9de0a253382a9ab780cc87b8eef1faf46e855a86fb5cd282e9dd4d4581a76a \
                    size    741599
github.tarball_from archive

depends_lib-append  port:libmagic \
                    port:ncurses \
                    port:tvision

compiler.cxx_standard 2017

configure.args-append \
                    -DTURBO_BUILD_APP=ON \
                    -DTURBO_BUILD_EXAMPLES=OFF \
                    -DTURBO_BUILD_TESTS=OFF \
                    -DTURBO_OPTIMIZE_BUILD=OFF \
                    -DTURBO_USE_SYSTEM_TVISION=ON

variant tests description "Build and run tests" {
    depends_build-append \
                    port:gtest
    configure.args-replace \
                    -DTURBO_BUILD_TESTS=OFF -DTURBO_BUILD_TESTS=ON
    test.run        yes
    # Tests will run at the end of the build.
    # No special target needed.
    test            { }
}
