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

github.setup        magiblot turbo c67570f10f939551d857132e5c566ca32e710980
version             2024.09.03
revision            0
categories          editors sysutils
license             MIT
maintainers         {@barracuda156 gmail.com:vital.had} 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.

fetch.type          git

post-fetch {
    system -W ${worksrcpath} "${git.cmd} submodule update --init"
}

depends_lib-append  port:libmagic \
                    port:ncurses

compiler.cxx_standard 2017

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

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            { }
}
