# -*- 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 4.9.0 v
github.tarball_from releases
revision            0

categories          math
platforms           darwin
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 63ce2f933dc0173458121f201683b825c93b5c7f \
                    sha256 d3d2a054ed73c005fe2e64dc1882a0fe2f9aef817d59f30898efe4a80edf1330 \
                    size 1738477

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