# -*- 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.4.0 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  b1a8a6a6089889f0e9c45b771138417e99575366 \
                    sha256  a97d1813bd68562465657136ebe7c3fb925d442efadc5aa14ac3806c152d2816 \
                    size    1879385

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