# -*- 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           github 1.0
PortGroup           qmake5 1.0

# FIXME: support for Qt4 has been dropped in 3.2.0:
# https://github.com/communi/communi-desktop/commit/1414cb8c8a0e6a60bee5e1b7bd808cff18fc549d
# Find a version which works with Qt4.
github.setup        communi communi-desktop 512df86ef749cd9f45fc9bbc264f52a5374941b5
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             2022.08.14
revision            0

categories          irc
license             BSD
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer

description         IRC client for desktop environments
long_description    {*}${description}
homepage            https://communi.github.io

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

patchfiles-append   0001-Fix-install-paths.patch

post-patch {
    reinplace "s|@APPDIR@|${applications_dir}|" ${worksrcpath}/features/communi_installs.prf
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/features/communi_installs.prf
}

depends_lib-append  port:libcommuni

compiler.cxx_standard 2011

configure.args-append \
                    -config qt_no_framework
