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

if {(${os.platform} eq "darwin" && ${os.major} > 13) \
    || ${os.platform} ne "darwin"} {
    PortGroup       qt5 1.0

    github.setup    Faster3ck converseen 0.15.0.3 v
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    revision        0
    checksums       rmd160  e9e12717b56eeff19887ee5bf4c9955d82f440e8 \
                    sha256  c7da8d76c2f3c5051ff25e44e7f50b269a9b55fc27f8e332e2614125d4a53457 \
                    size    969481

    qt5.depends_component \
                    qttools

    compiler.cxx_standard   2017
} else {
    PortGroup       qt4 1.0

    # Version for legacy systems using Qt4.
    github.setup    Faster3ck converseen 0.9.2 v
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    revision        0
    checksums       rmd160  8fb30774f2105641c864fd5d828dc51bb218eb7c \
                    sha256  4ad8a612ff8dc693159743031b6bf14af966b163a155296ce809d1dc3789faee \
                    size    292007

    # https://github.com/Faster3ck/Converseen/issues/169
    patchfiles-append \
                    patch-fix-formats.diff
}

categories          graphics
license             GPL-3
maintainers         {mps @Schamschula} openmaintainer
description         Converseen is an open source batch image converter and resizer.
long_description    {*}${description} Thanks to the Magick++ image libraries it supports \
                    more than 100 image formats.

depends_lib-append  port:ImageMagick

app.icon            ${filespath}/Converseen.icns
