# -*- 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.13.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  8be73cbf43d821f08ac907411ee9af22f96038c0 \
                    sha256  b6cc1fcf51b2e1fec917d06d7ead608f45cb1f090527ef2aaa4706f0c4247b5f \
                    size    2113956

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