# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           qmake5 1.0

github.setup        qalculate qalculate-qt 5.8.1 v
github.tarball_from releases
revision            0

categories          math
license             GPL-2+
maintainers         {judaew @judaew} openmaintainer

description         Qalculate! is a multi-purpose desktop calculator
long_description    {*}${description} \
    It is small and simple to use but with much power and versatility \
    underneath. Features include customizable functions, units, arbitrary \
    precision, plotting, and a user-friendly interface.

checksums           rmd160  058765caae2b7009e8a3155903ebcc39f30e34ea \
                    sha256  3cfc08bdf46bb88db004d73be4f462825d5fb90345e645cd302bfe8f0feccdb4 \
                    size    2020133

# Workaround xcrun: error: SDK "macosx12" cannot be located
configure.sdk_version

depends_lib-append  port:libqalculate

qt5.depends_build_component qttools
qt5.depends_component       qtsvg

compiler.cxx_standard \
                    2011
configure.args-append \
                    CONFIG+=c++11

destroot {
    move ${worksrcpath}/qalculate-qt.app ${destroot}${applications_dir}
}

notes-append "Graphical plotting is enabled by installing gnuplot.\n"
